You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
54 KiB
3 lines
54 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-user-authentication-authentication"],{"10e9":function(t,e,r){t.exports=r.p+"static/card-03.png"},"15a1":function(t,e,r){t.exports=r.p+"static/card-01.png"},"1ea2":function(t,e,r){"use strict";var n=r("af9e"),a=r("1c06"),i=r("ada5"),o=r("5d6e"),u=Object.isExtensible,s=n((function(){u(1)}));t.exports=s||o?function(t){return!!a(t)&&((!o||"ArrayBuffer"!==i(t))&&(!u||u(t)))}:u},"1fcd":function(t,e,r){var n=r("ad03");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("967d").default;a("5be456e1",n,!0,{sourceMap:!1,shadowMode:!1})},"21bd":function(t,e,r){var n=r("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/* 水平间距 */\n/* 水平间距 */.wtgsubbtn[data-v-3fdf0814]{margin-top:%?80?%;width:%?702?%;height:%?98?%;background:#0d5dc9;box-shadow:%?0?% %?4?% %?13?% %?0?% rgba(14,94,157,.4);border-radius:%?49?%;border:1px solid #0d5dc9;font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?30?%;color:#fff;line-height:%?98?%}.wtgbox[data-v-3fdf0814]{background:#fff;height:%?1624?%}.jjyy[data-v-3fdf0814]{width:%?592?%;height:%?80?%;background:#f9f9f9;border-radius:%?10?%;margin-left:%?54?%;margin-top:%?21?%;font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?30?%;color:#e45050;line-height:%?40?%;padding:%?25?%}.jj[data-v-3fdf0814]{font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?30?%;color:#333;line-height:%?40?%;margin-left:%?54?%;margin-top:%?21?%}.shzwz[data-v-3fdf0814]{text-align:center;font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?36?%;color:#333;line-height:%?80?%}.shzimg[data-v-3fdf0814]{width:%?160?%;height:%?160?%;margin-top:%?119?%;margin-left:%?295?%}.shzbox[data-v-3fdf0814]{height:%?1624?%;background:#fff}.subbtn[data-v-3fdf0814]{margin-top:%?50?%;width:%?630?%;height:%?98?%;background:#0d5dc9;box-shadow:%?0?% %?4?% %?13?% %?0?% rgba(14,94,157,.4);border-radius:%?49?%;font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?30?%;color:#fff;line-height:%?98?%}.sfztp[data-v-3fdf0814]{margin-top:%?49?%;display:flex;justify-content:space-between}.sfzimg[data-v-3fdf0814]{width:%?332?%;height:%?216?%}.sfz[data-v-3fdf0814]{background:#fff;margin-top:%?20?%;padding:%?24?%}.sfzwz[data-v-3fdf0814]{font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?36?%;color:#333;line-height:%?40?%}[data-v-3fdf0814] .uni-forms-item{margin-bottom:%?24?%}[data-v-3fdf0814] .uni-forms-item__label{font-family:Alibaba PuHuiTi;font-weight:400;font-size:%?30?%;color:#333}.border[data-v-3fdf0814]{border:1px solid #eaeaea;margin-bottom:%?10?%}.input[data-v-3fdf0814]{margin-top:%?15?%;text-align:right}.box[data-v-3fdf0814]{padding:%?24?%;background:#fff}',""]),t.exports=e},2446:function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return n}));var n={uniForms:r("448f").default,uniFormsItem:r("f1be").default,uniPopup:r("5379").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",["0"==t.auth_status||t.zaitijiao?n("v-uni-view",{},[n("v-uni-view",{staticClass:"box"},[n("uni-forms",{ref:"form",attrs:{modelValue:t.formData,rules:t.rules,"label-width":"200rpx"}},[n("uni-forms-item",{attrs:{label:"姓名",name:"name"}},[n("v-uni-input",{staticClass:"input",attrs:{type:"text",placeholder:"请输入"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),n("v-uni-view",{staticClass:"border"}),n("uni-forms-item",{attrs:{label:"身份证",name:"name"}},[n("v-uni-input",{staticClass:"input",attrs:{type:"text",placeholder:"请输入"},model:{value:t.formData.card,callback:function(e){t.$set(t.formData,"card",e)},expression:"formData.card"}})],1),n("v-uni-view",{staticClass:"border"}),n("uni-forms-item",{attrs:{label:"车型",name:"name"}},[n("v-uni-picker",{attrs:{mode:"selector",value:t.index,range:t.carlist,"range-key":"name"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.bindPickerChange.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"input"},[t._v(t._s(t.carlist[t.carindex].name?t.carlist[t.carindex].name:"请选择"))])],1)],1)],1)],1),n("v-uni-view",{staticClass:"sfz"},[n("v-uni-view",{staticClass:"sfzwz"},[t._v("身份证照片")])],1),n("v-uni-view",{staticClass:"sfz"},[n("v-uni-view",{staticClass:"sfzwz"},[t._v("驾驶证照片")])],1),n("v-uni-view",{staticClass:"sfz"},[n("v-uni-view",{staticClass:"sfzwz"},[t._v("行驶证照片")]),n("v-uni-button",{staticClass:"subbtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.auth.apply(void 0,arguments)}}},[t._v("提交")])],1)],1):t._e(),"1"==t.auth_status?n("v-uni-view",{staticClass:"shzbox"},[n("v-uni-image",{staticClass:"shzimg",attrs:{src:r("49bc"),mode:""}}),n("v-uni-view",{staticClass:"shzwz"},[t._v("审核中")])],1):t._e(),"3"==t.auth_status&&1!=t.zaitijiao?n("v-uni-view",{staticClass:"wtgbox"},[n("v-uni-image",{staticClass:"shzimg",attrs:{src:r("e0ac"),mode:""}}),n("v-uni-view",{staticClass:"shzwz"},[t._v("未通过")]),n("v-uni-view",{staticClass:"jj"},[t._v("拒绝原因")]),n("v-uni-view",{staticClass:"jjyy"},[t._v(t._s(t.Info.reason))]),n("v-uni-button",{staticClass:"wtgsubbtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.renzheng.apply(void 0,arguments)}}},[t._v("重新认证")])],1):t._e(),"2"==t.auth_status?n("v-uni-view",{staticClass:"cgbox"},[n("v-uni-image",{staticClass:"shzimg",attrs:{src:r("d951"),mode:""}}),n("v-uni-view",{staticClass:"shzwz"},[t._v("认证成功,快去抢单吧~")]),n("v-uni-button",{staticClass:"wtgsubbtn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.ljqd.apply(void 0,arguments)}}},[t._v("立即抢单")])],1):t._e(),n("uni-popup",{ref:"permissions_box_popup",attrs:{"background-color":"#fff","mask-click":!1}},[n("v-uni-view",{staticClass:"permissions_box",style:{"padding-top":t.statusBarHeight+64+"px"}},[t._v("当您使用APP时,为了提供图片上传的功能,我们需要申请相机/存储权限。")])],1)],1)},i=[]},2634:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
e.default=function(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",f=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(M){l=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),u=new E(n||[]);return i(o,"_invoke",{value:k(t,r,u)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(M){return{type:"throw",arg:M}}}t.wrap=c;var h={};function m(){}function v(){}function p(){}var b={};l(b,u,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(S([])));y&&y!==r&&a.call(y,u)&&(b=y);var x=p.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var r;i(this,"_invoke",{value:function(i,o){function u(){return new e((function(r,u){(function r(i,o,u,s){var f=d(t[i],t,o);if("throw"!==f.type){var l=f.arg,c=l.value;return c&&"object"==(0,n.default)(c)&&a.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,u,s)}),(function(t){r("throw",t,u,s)})):e.resolve(c).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,s)}))}s(f.arg)})(i,o,r,u)}))}return r=r?r.then(u,u):u()}})}function k(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return D()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var u=j(o,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=d(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator["return"]&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=d(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,h;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function z(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(a.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:D}}function D(){return{value:void 0,done:!0}}return v.prototype=p,i(x,"constructor",{value:p,configurable:!0}),i(p,"constructor",{value:v,configurable:!0}),v.displayName=l(p,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,f,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new w(c(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(x),l(x,f,"Generator"),l(x,u,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(z),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),z(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;z(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t},r("6a54"),r("01a2"),r("e39c"),r("bf0f"),r("844d"),r("18f7"),r("de6c"),r("3872e"),r("4e9b"),r("114e"),r("c240"),r("926e"),r("7a76"),r("c9b5"),r("aa9c"),r("2797"),r("8a8d"),r("dc69"),r("f7a5");var n=function(t){return t&&t.__esModule?t:{default:t}}(r("fcf3"))},"2fdc":function(t,e,r){"use strict";function n(t,e,r,n,a,i,o){try{var u=t[i](o),s=u.value}catch(f){return void r(f)}u.done?e(s):Promise.resolve(s).then(n,a)}r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=this,r=arguments;return new Promise((function(a,i){var o=t.apply(e,r);function u(t){n(o,a,i,u,s,"next",t)}function s(t){n(o,a,i,u,s,"throw",t)}u(void 0)}))}},r("bf0f")},"335a5":function(t,e,r){t.exports=r.p+"static/card-02.png"},"3e64":function(t,e,r){"use strict";r("6a54");var n=r("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r("bf0f"),r("2797");var a,i=n(r("39d8")),o=n(r("2634")),u=n(r("2fdc")),s=n(r("2cd1")),f=uni.getSystemInfoSync(),l={data:function(){return{formDataxs:{sfzzm:r("15a1"),sfzfm:r("335a5"),jszzm:r("10e9"),jszfm:r("f7aa"),xszzm:r("ac36"),xszfm:r("4369")},formData:{car_type:""},carindex:"",auth_status:"",Info:{},zaitijiao:!1,carlist:[],statusBarHeight:0}},onLoad:function(t){console.log("this.auth_status",t),this.auth_status=t.auth_status},onReady:function(){this.statusBarHeight=f.statusBarHeight},onShow:function(){this.authInfo(),this.carTypeList()},methods:(a={recorderAuthModal:function(){var t=this;uni.showModal({title:"温馨提示",content:"为了提供图片上传的功能,我们需要申请相机/存储权限,请您确认授权,否则无法使用该功能~",cancelText:"关闭",confirmText:"去授权",success:function(e){t.$refs.permissions_box_popup.close("top"),e.confirm&&s.default.gotoAppPermissionSetting()}})},uploadFile1:function(t,e){var r=this;if("android"==uni.getSystemInfoSync().platform)return plus.android.checkPermission("android.permission.WRITE_EXTERNAL_STORAGE",(function(n){-1==n.checkResult?r.$refs.permissions_box_popup.open("top"):(tthat.$refs.permissions_box_popup.close("top"),r.uploadFile(t,e))}),(function(t){console.error("Error checking permission:",t.message)})),void r.requestAndroidPermission("android.permission.WRITE_EXTERNAL_STORAGE");r.uploadFile(t,e)}},(0,i.default)(a,"recorderAuthModal",(function(){var t=this;uni.showModal({title:"温馨提示",content:"为了提供图片上传的功能,我们需要申请相机/存储权限,请您确认授权,否则无法使用该功能~",cancelText:"关闭",confirmText:"去授权",success:function(e){t.$refs.permissions_box_popup.close("top"),e.confirm&&s.default.gotoAppPermissionSetting()}})})),(0,i.default)(a,"requestAndroidPermission",(function(t){var e=this;return(0,u.default)((0,o.default)().mark((function r(){var n,a;return(0,o.default)().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n=e,r.next=3,s.default.requestAndroidPermission(t);case 3:a=r.sent,1!=a?n.recorderAuthModal():n.$refs.permissions_box_popup.close("top");case 5:case"end":return r.stop()}}),r)})))()})),(0,i.default)(a,"bindPickerChange",(function(t){this.carindex=t.detail.value,console.log(t.detail.value),this.formData.car_type=this.carlist[t.detail.value].value})),(0,i.default)(a,"carTypeList",(function(){var t=this;this.$api.carTypeList().then((function(e){console.log(1245,e.data),t.carlist=e.data}))})),(0,i.default)(a,"renzheng",(function(){var t=this;console.log("this.Info.car_type",this.Info.car_type),this.zaitijiao=!0,this.formDataxs.sfzzm=this.Info.card_zm_img_url,this.formDataxs.sfzfm=this.Info.card_fm_img_url,this.formDataxs.jszzm=this.Info.driving_zm_img_url,this.formDataxs.jszfm=this.Info.driving_fm_url,this.formDataxs.xszzm=this.Info.drive_zm_url,this.formDataxs.xszfm=this.Info.drive_fm_img_url,this.carlist.forEach((function(e,r){e.value==t.Info.car_type&&(t.carindex=r)})),this.formData.card_zm_img=this.Info.card_zm_img,this.formData.card_fm_img=this.Info.card_fm_img,this.formData.driving_zm_img=this.Info.driving_zm_img,this.formData.driving_fm_img=this.Info.driving_fm_img,this.formData.drive_zm_img=this.Info.drive_zm_img,this.formData.drive_fm_img=this.Info.drive_fm_img,this.formData.name=this.Info.name,this.formData.card=this.Info.card,this.formData.car_type=this.Info.car_type})),(0,i.default)(a,"authInfo",(function(){var t=this;this.$api.authInfo().then((function(e){t.Info=e.data}))})),(0,i.default)(a,"auth",(function(){this.$api.auth(this.formData).then((function(t){uni.showToast({icon:"none",title:t.data.msg,duration:3e3}),200==t.code&&uni.switchTab({url:"/pages/user/index"})}))})),(0,i.default)(a,"uploadFile",(function(t,e){var r=this;uni.chooseImage({count:1,success:function(n){console.log("tempFilePaths",n);var a=n.tempFilePaths;uni.uploadFile({url:"https://logistics.njrenzhou.cn/api/uploadFile",filePath:a[0],name:"file",formData:{user:"test"},success:function(n){console.log(123),r.formDataxs[t]=JSON.parse(n.data).data.url,r.formData[e]=JSON.parse(n.data).data.id}})}})})),(0,i.default)(a,"ljqd",(function(){uni.switchTab({url:"/pages/index/index"})})),a)};e.default=l},4369:function(t,e,r){t.exports=r.p+"static/card-06.png"},"448f":function(t,e,r){"use strict";r.r(e);var n=r("48d8"),a=r("a682");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("c3ae");var o=r("828b"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"d3d14bf0",null,!1,n["a"],void 0);e["default"]=u.exports},"48d8":function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{staticClass:"uni-forms"},[e("v-uni-form",[this._t("default")],2)],1)},a=[]},"49bc":function(t,e,r){t.exports=r.p+"static/shenhe.png"},"4b4a":function(t,e,r){"use strict";r("6a54");var n=r("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("2634")),i=n(r("2fdc")),o=n(r("39d8"));r("64aa"),r("aa77"),r("bf0f"),r("c223"),r("2797"),r("5ef2"),r("d4b5"),r("aa9c"),r("de6c");var u=n(r("5864")),s=r("5725"),f=n(r("9b8e"));f.default.prototype.binddata=function(t,e,r){if(r)this.$refs[r].setValue(t,e);else{var n;for(var a in this.$refs){var i=this.$refs[a];if(i&&i.$options&&"uniForms"===i.$options.name){n=i;break}}if(!n)return console.error("当前 uni-froms 组件缺少 ref 属性");n.setValue(t,e)}};var l={name:"uniForms",emits:["validate","submit"],options:{virtualHost:!0},props:{value:{type:Object,default:function(){return null}},modelValue:{type:Object,default:function(){return null}},model:{type:Object,default:function(){return null}},rules:{type:Object,default:function(){return{}}},errShowType:{type:String,default:"undertext"},validateTrigger:{type:String,default:"submit"},labelPosition:{type:String,default:"left"},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:"left"},border:{type:Boolean,default:!1}},provide:function(){return{uniForm:this}},data:function(){return{formData:{},formRules:{}}},computed:{localData:function(){var t=this.model||this.modelValue||this.value;return t?(0,s.deepCopy)(t):{}}},watch:{rules:{handler:function(t,e){this.setRules(t)},deep:!0,immediate:!0}},created:function(){this.childrens=[],this.inputChildrens=[],this.setRules(this.rules)},methods:{setRules:function(t){this.formRules=Object.assign({},this.formRules,t),this.validator=new u.default(t)},setValue:function(t,e){var r=this.childrens.find((function(e){return e.name===t}));return r?(this.formData[t]=(0,s.getValue)(t,e,this.formRules[t]&&this.formRules[t].rules||[]),r.onFieldChange(this.formData[t])):null},validate:function(t,e){return this.checkAll(this.formData,t,e)},validateField:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;e=[].concat(e);var n={};return this.childrens.forEach((function(r){var a=(0,s.realName)(r.name);-1!==e.indexOf(a)&&(n=Object.assign({},n,(0,o.default)({},a,t.formData[a])))})),this.checkAll(n,[],r)},clearValidate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t=[].concat(t),this.childrens.forEach((function(e){if(0===t.length)e.errMsg="";else{var r=(0,s.realName)(e.name);-1!==t.indexOf(r)&&(e.errMsg="")}}))},submit:function(t,e,r){var n=this,a=function(t){var e=n.childrens.find((function(e){return e.name===t}));e&&void 0===n.formData[t]&&(n.formData[t]=n._getValue(t,n.dataValue[t]))};for(var i in this.dataValue)a(i);return r||console.warn("submit 方法即将废弃,请使用validate方法代替!"),this.checkAll(this.formData,t,e,"submit")},checkAll:function(t,e,r,n){var o=this;return(0,i.default)((0,a.default)().mark((function i(){var u,f,l,c,d,h,m,v,p,b,g;return(0,a.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(o.validator){i.next=2;break}return i.abrupt("return");case 2:for(l in u=[],f=function(t){var e=o.childrens.find((function(e){return(0,s.realName)(e.name)===t}));e&&u.push(e)},t)f(l);r||"function"!==typeof e||(r=e),!r&&"function"!==typeof r&&Promise&&(c=new Promise((function(t,e){r=function(r,n){r?e(r):t(n)}}))),d=[],h=JSON.parse(JSON.stringify(t)),i.t0=(0,a.default)().keys(u);case 10:if((i.t1=i.t0()).done){i.next=23;break}return m=i.t1.value,v=u[m],p=(0,s.realName)(v.name),i.next=16,v.onFieldChange(h[p]);case 16:if(b=i.sent,!b){i.next=21;break}if(d.push(b),"toast"!==o.errShowType&&"modal"!==o.errShowType){i.next=21;break}return i.abrupt("break",23);case 21:i.next=10;break;case 23:if(Array.isArray(d)&&0===d.length&&(d=null),Array.isArray(e)&&e.forEach((function(t){var e=(0,s.realName)(t),r=(0,s.getDataValue)(t,o.localData);void 0!==r&&(h[e]=r)})),"submit"===n?o.$emit("submit",{detail:{value:h,errors:d}}):o.$emit("validate",d),{},g=(0,s.rawData)(h,o.name),r&&"function"===typeof r&&r(d,g),!c||!r){i.next=33;break}return i.abrupt("return",c);case 33:return i.abrupt("return",null);case 34:case"end":return i.stop()}}),i)})))()},validateCheck:function(t){this.$emit("validate",t)},_getValue:s.getValue,_isRequiredField:s.isRequiredField,_setDataValue:s.setDataValue,_getDataValue:s.getDataValue,_realName:s.realName,_isRealName:s.isRealName,_isEqual:s.isEqual}};e.default=l},"4cea":function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",{staticClass:"uni-forms-item",class:["is-direction-"+t.localLabelPos,t.border?"uni-forms-item--border":"",t.border&&t.isFirstBorder?"is-first-border":""]},[t._t("label",[r("v-uni-view",{staticClass:"uni-forms-item__label",class:{"no-label":!t.label&&!t.required},style:{width:t.localLabelWidth,justifyContent:t.localLabelAlign}},[t.required?r("v-uni-text",{staticClass:"is-required"},[t._v("*")]):t._e(),r("v-uni-text",[t._v(t._s(t.label))])],1)]),r("v-uni-view",{staticClass:"uni-forms-item__content"},[t._t("default"),r("v-uni-view",{staticClass:"uni-forms-item__error",class:{"msg--active":t.msg}},[r("v-uni-text",[t._v(t._s(t.msg))])],1)],2)],2)},a=[]},5075:function(t,e,r){"use strict";var n=r("ae5c"),a=r("71e9"),i=r("e7e3"),o=r("52df"),u=r("81a7"),s=r("1fc1"),f=r("1297"),l=r("d67c"),c=r("5112"),d=r("7e91"),h=TypeError,m=function(t,e){this.stopped=t,this.result=e},v=m.prototype;t.exports=function(t,e,r){var p,b,g,y,x,_,w,k=r&&r.that,j=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_RECORD),z=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),S=n(e,k),D=function(t){return p&&d(p,"normal",t),new m(!0,t)},M=function(t){return j?(i(t),E?S(t[0],t[1],D):S(t[0],t[1])):E?S(t,D):S(t)};if(O)p=t.iterator;else if(z)p=t;else{if(b=c(t),!b)throw new h(o(t)+" is not iterable");if(u(b)){for(g=0,y=s(t);y>g;g++)if(x=M(t[g]),x&&f(v,x))return x;return new m(!1)}p=l(t,b)}_=O?t.next:p.next;while(!(w=a(_,p)).done){try{x=M(w.value)}catch(P){d(p,"throw",P)}if("object"==typeof x&&x&&f(v,x))return x}return new m(!1)}},"53f7":function(t,e,r){"use strict";var n=r("7658"),a=r("57e7");n("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),a)},5725:function(t,e,r){"use strict";r("6a54");var n=r("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.typeFilter=e.type=e.setDataValue=e.realName=e.rawData=e.objSet=e.objGet=e.name2arr=e.isRequiredField=e.isRealName=e.isNumber=e.isEqual=e.isBoolean=e.getValue=e.getDataValueType=e.getDataValue=e.deepCopy=void 0;var a=n(r("fcf3"));r("d4b5"),r("aa77"),r("bf0f"),r("64aa"),r("473f"),r("5c47"),r("0506"),r("a1c1"),r("fd3c"),r("7f48"),r("c9b5"),r("ab80");e.deepCopy=function(t){return JSON.parse(JSON.stringify(t))};var i=function(t){return"int"===t||"double"===t||"number"===t||"timestamp"===t};e.typeFilter=i;e.getValue=function(t,e,r){var n=r.find((function(t){return t.format&&i(t.format)})),a=r.find((function(t){return t.format&&"boolean"===t.format||"bool"===t.format}));return n&&(e=e||0===e?c(Number(e))?Number(e):e:null),a&&(e=!!d(e)&&e),e};e.setDataValue=function(t,e,r){return e[t]=r,r||""};var o=function(t,e){return l(e,t)};e.getDataValue=o;e.getDataValueType=function(t,e){var r=o(t,e);return{type:h(r),value:r}};e.realName=function(t){var e=f(t);if("object"===(0,a.default)(e)&&Array.isArray(e)&&e.length>1){var r=e.reduce((function(t,e){return t+"#".concat(e)}),"_formdata_");return r}return e[0]||t};e.isRealName=function(t){return/^_formdata_#*/.test(t)};e.rawData=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=JSON.parse(JSON.stringify(t)),r={};for(var n in e){var a=u(n);s(r,a,e[n])}return r};var u=function(t){var e=t.replace("_formdata_#","");return e=e.split("#").map((function(t){return c(t)?Number(t):t})),e};e.name2arr=u;var s=function(t,e,r){return"object"!==(0,a.default)(t)||f(e).reduce((function(t,e,n,a){return n===a.length-1?(t[e]=r,null):(e in t||(t[e]=/^[0-9]{1,}$/.test(a[n+1])?[]:{}),t[e])}),t),t};function f(t){return Array.isArray(t)?t:t.replace(/\[/g,".").replace(/\]/g,"").split(".")}e.objSet=s;var l=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"undefined",n=f(e),a=n.reduce((function(t,e){return(t||{})[e]}),t);return a&&void 0===a?r:a};e.objGet=l;var c=function(t){return!isNaN(Number(t))};e.isNumber=c;var d=function(t){return"boolean"===typeof t};e.isBoolean=d;e.isRequiredField=function(t){for(var e=!1,r=0;r<t.length;r++){var n=t[r];if(n.required){e=!0;break}}return e};var h=function(t){var e={};return"Boolean Number String Function Array Date RegExp Object Error".split(" ").map((function(t,r){e["[object "+t+"]"]=t.toLowerCase()})),null==t?t+"":"object"===(0,a.default)(t)||"function"===typeof t?e[Object.prototype.toString.call(t)]||"object":(0,a.default)(t)};e.type=h;e.isEqual=function(t,e){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;var r=toString.call(t),n=toString.call(e);if(r!==n)return!1;switch(r){case"[object RegExp]":case"[object String]":return""+t===""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}if("[object Object]"==r){var a=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(e);if(a.length!=i.length)return!1;for(var o=0;o<a.length;o++){var u=a[o];if(t[u]!==e[u])return!1}return!0}return"[object Array]"==r?t.toString()==e.toString():void 0}},"57e7":function(t,e,r){"use strict";var n=r("e37c"),a=r("e4ca"),i=r("a74c"),o=r("ae5c"),u=r("b720"),s=r("1eb8"),f=r("5075"),l=r("0cc2"),c=r("97ed"),d=r("437f"),h=r("ab4a"),m=r("d0b1").fastKey,v=r("235c"),p=v.set,b=v.getterFor;t.exports={getConstructor:function(t,e,r,l){var c=t((function(t,a){u(t,d),p(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),h||(t.size=0),s(a)||f(a,t[l],{that:t,AS_ENTRIES:r})})),d=c.prototype,v=b(e),g=function(t,e,r){var n,a,i=v(t),o=y(t,e);return o?o.value=r:(i.last=o={index:a=m(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=o),n&&(n.next=o),h?i.size++:t.size++,"F"!==a&&(i.index[a]=o)),t},y=function(t,e){var r,n=v(t),a=m(e);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key===e)return r};return i(d,{clear:function(){var t=v(this),e=t.first;while(e)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),e=e.next;t.first=t.last=void 0,t.index=n(null),h?t.size=0:this.size=0},delete:function(t){var e=v(this),r=y(this,t);if(r){var n=r.next,a=r.previous;delete e.index[r.index],r.removed=!0,a&&(a.next=n),n&&(n.previous=a),e.first===r&&(e.first=n),e.last===r&&(e.last=a),h?e.size--:this.size--}return!!r},forEach:function(t){var e,r=v(this),n=o(t,arguments.length>1?arguments[1]:void 0);while(e=e?e.next:r.first){n(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!y(this,t)}}),i(d,r?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),h&&a(d,"size",{configurable:!0,get:function(){return v(this).size}}),c},setStrong:function(t,e,r){var n=e+" Iterator",a=b(e),i=b(n);l(t,e,(function(t,e){p(this,{type:n,target:t,state:a(t),kind:e,last:void 0})}),(function(){var t=i(this),e=t.kind,r=t.last;while(r&&r.removed)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?c("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,c(void 0,!0))}),r?"entries":"values",!r,!0),d(e)}}},5864:function(t,e,r){"use strict";r("6a54");var n=r("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("acb1")),i=n(r("cad9")),o=n(r("2634")),u=n(r("2fdc")),s=n(r("80b1")),f=n(r("efe5")),l=n(r("fcf3"));r("23f4"),r("7d2f"),r("5c47"),r("9c4e"),r("ab80"),r("bf0f"),r("a1c1"),r("dc8a"),r("e966"),r("c9b5"),r("2c10"),r("0506"),r("9db6"),r("bd06"),r("f3f7"),r("18f7"),r("de6c"),r("c223"),r("5ef2"),r("aa9c"),r("8f71"),r("d4b5");var c={email:/^\S+?@\S+?\.\S+?$/,idcard:/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i")},d={int:"integer",bool:"boolean",double:"number",long:"number",password:"string"};function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=["label"];r.forEach((function(e){void 0===t[e]&&(t[e]="")}));var n=e;for(var a in t){var i=new RegExp("{"+a+"}");n=n.replace(i,t[a])}return n}var m={integer:function(t){return m.number(t)&&parseInt(t,10)===t},string:function(t){return"string"===typeof t},number:function(t){return!isNaN(t)&&"number"===typeof t},boolean:function(t){return"boolean"===typeof t},float:function(t){return m.number(t)&&!m.integer(t)},array:function(t){return Array.isArray(t)},object:function(t){return"object"===(0,l.default)(t)&&!m.array(t)},date:function(t){return t instanceof Date},timestamp:function(t){return!(!this.integer(t)||Math.abs(t).toString().length>16)},file:function(t){return"string"===typeof t.url},email:function(t){return"string"===typeof t&&!!t.match(c.email)&&t.length<255},url:function(t){return"string"===typeof t&&!!t.match(c.url)},pattern:function(t,e){try{return new RegExp(t).test(e)}catch(r){return!1}},method:function(t){return"function"===typeof t},idcard:function(t){return"string"===typeof t&&!!t.match(c.idcard)},"url-https":function(t){return this.url(t)&&t.startsWith("https://")},"url-scheme":function(t){return t.startsWith("://")},"url-web":function(t){return!1}},v=function(){function t(e){(0,s.default)(this,t),this._message=e}return(0,f.default)(t,[{key:"validateRule",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r,n,a,i){var u,s,f,l,c,d,h,m,v;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(u=null,s=r.rules,f=s.findIndex((function(t){return t.required})),!(f<0)){t.next=8;break}if(null!==n&&void 0!==n){t.next=6;break}return t.abrupt("return",u);case 6:if("string"!==typeof n||n.length){t.next=8;break}return t.abrupt("return",u);case 8:if(l=this._message,void 0!==s){t.next=11;break}return t.abrupt("return",l["default"]);case 11:c=0;case 12:if(!(c<s.length)){t.next=35;break}if(d=s[c],h=this._getValidateType(d),Object.assign(d,{label:r.label||'["'.concat(e,'"]')}),!p[h]){t.next=20;break}if(u=p[h](d,n,l),null==u){t.next=20;break}return t.abrupt("break",35);case 20:if(!d.validateExpr){t.next=26;break}if(m=Date.now(),v=d.validateExpr(n,i,m),!1!==v){t.next=26;break}return u=this._getMessage(d,d.errorMessage||this._message["default"]),t.abrupt("break",35);case 26:if(!d.validateFunction){t.next=32;break}return t.next=29,this.validateFunction(d,n,a,i,h);case 29:if(u=t.sent,null===u){t.next=32;break}return t.abrupt("break",35);case 32:c++,t.next=12;break;case 35:return null!==u&&(u=l.TAG+u),t.abrupt("return",u);case 37:case"end":return t.stop()}}),t,this)})));return function(e,r,n,a,i){return t.apply(this,arguments)}}()},{key:"validateFunction",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r,n,a,i){var u,s,f;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return u=null,t.prev=1,s=null,t.next=5,e.validateFunction(e,r,a||n,(function(t){s=t}));case 5:f=t.sent,(s||"string"===typeof f&&f||!1===f)&&(u=this._getMessage(e,s||f,i)),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),u=this._getMessage(e,t.t0.message,i);case 12:return t.abrupt("return",u);case 13:case"end":return t.stop()}}),t,this,[[1,9]])})));return function(e,r,n,a,i){return t.apply(this,arguments)}}()},{key:"_getMessage",value:function(t,e,r){return h(t,e||t.errorMessage||this._message[r]||e["default"])}},{key:"_getValidateType",value:function(t){var e="";return t.required?e="required":t.format?e="format":t.arrayType?e="arrayTypeFormat":t.range?e="range":void 0!==t.maximum||void 0!==t.minimum?e="rangeNumber":void 0!==t.maxLength||void 0!==t.minLength?e="rangeLength":t.pattern?e="pattern":t.validateFunction&&(e="validateFunction"),e}}]),t}(),p={required:function(t,e,r){return t.required&&function(t,e){return void 0===t||null===t||("string"===typeof t&&!t||(!(!Array.isArray(t)||t.length)||"object"===e&&!Object.keys(t).length))}(e,t.format||(0,l.default)(e))?h(t,t.errorMessage||r.required):null},range:function(t,e,r){for(var n=t.range,a=t.errorMessage,i=new Array(n.length),o=0;o<n.length;o++){var u=n[o];m.object(u)&&void 0!==u.value?i[o]=u.value:i[o]=u}var s=!1;return Array.isArray(e)?s=new Set(e.concat(i)).size===i.length:i.indexOf(e)>-1&&(s=!0),s?null:h(t,a||r["enum"])},rangeNumber:function(t,e,r){if(!m.number(e))return h(t,t.errorMessage||r.pattern.mismatch);var n=t.minimum,a=t.maximum,i=t.exclusiveMinimum,o=t.exclusiveMaximum,u=i?e<=n:e<n,s=o?e>=a:e>a;return void 0!==n&&u?h(t,t.errorMessage||r["number"][i?"exclusiveMinimum":"minimum"]):void 0!==a&&s?h(t,t.errorMessage||r["number"][o?"exclusiveMaximum":"maximum"]):void 0!==n&&void 0!==a&&(u||s)?h(t,t.errorMessage||r["number"].range):null},rangeLength:function(t,e,r){if(!m.string(e)&&!m.array(e))return h(t,t.errorMessage||r.pattern.mismatch);var n=t.minLength,a=t.maxLength,i=e.length;return void 0!==n&&i<n?h(t,t.errorMessage||r["length"].minLength):void 0!==a&&i>a?h(t,t.errorMessage||r["length"].maxLength):void 0!==n&&void 0!==a&&(i<n||i>a)?h(t,t.errorMessage||r["length"].range):null},pattern:function(t,e,r){return m["pattern"](t.pattern,e)?null:h(t,t.errorMessage||r.pattern.mismatch)},format:function(t,e,r){var n=Object.keys(m),a=d[t.format]?d[t.format]:t.format||t.arrayType;return n.indexOf(a)>-1&&!m[a](e)?h(t,t.errorMessage||r.typeError):null},arrayTypeFormat:function(t,e,r){if(!Array.isArray(e))return h(t,t.errorMessage||r.typeError);for(var n=0;n<e.length;n++){var a=e[n],i=this.format(t,a,r);if(null!==i)return i}return null}},b=function(t){(0,a.default)(r,t);var e=(0,i.default)(r);function r(t,n){var a;return(0,s.default)(this,r),a=e.call(this,r.message),a._schema=t,a._options=n||null,a}return(0,f.default)(r,[{key:"updateSchema",value:function(t){this._schema=t}},{key:"validate",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r){var n;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=this._checkFieldInSchema(e),n){t.next=5;break}return t.next=4,this.invokeValidate(e,!1,r);case 4:n=t.sent;case 5:return t.abrupt("return",n.length?n[0]:null);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"validateAll",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r){var n;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=this._checkFieldInSchema(e),n){t.next=5;break}return t.next=4,this.invokeValidate(e,!0,r);case 4:n=t.sent;case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"validateUpdate",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r){var n;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=this._checkFieldInSchema(e),n){t.next=5;break}return t.next=4,this.invokeValidateUpdate(e,!1,r);case 4:n=t.sent;case 5:return t.abrupt("return",n.length?n[0]:null);case 6:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}()},{key:"invokeValidate",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r,n){var a,i,u,s,f;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=[],i=this._schema,t.t0=(0,o.default)().keys(i);case 3:if((t.t1=t.t0()).done){t.next=15;break}return u=t.t1.value,s=i[u],t.next=8,this.validateRule(u,s,e[u],e,n);case 8:if(f=t.sent,null==f){t.next=13;break}if(a.push({key:u,errorMessage:f}),r){t.next=13;break}return t.abrupt("break",15);case 13:t.next=3;break;case 15:return t.abrupt("return",a);case 16:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"invokeValidateUpdate",value:function(){var t=(0,u.default)((0,o.default)().mark((function t(e,r,n){var a,i,u;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=[],t.t0=(0,o.default)().keys(e);case 2:if((t.t1=t.t0()).done){t.next=13;break}return i=t.t1.value,t.next=6,this.validateRule(i,this._schema[i],e[i],e,n);case 6:if(u=t.sent,null==u){t.next=11;break}if(a.push({key:i,errorMessage:u}),r){t.next=11;break}return t.abrupt("break",13);case 11:t.next=2;break;case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"_checkFieldInSchema",value:function(t){var e=Object.keys(t),n=Object.keys(this._schema);if(new Set(e.concat(n)).size===n.length)return"";var a=e.filter((function(t){return n.indexOf(t)<0})),i=h({field:JSON.stringify(a)},r.message.TAG+r.message["defaultInvalid"]);return[{key:"invalid",errorMessage:i}]}}]),r}(v);b.message=new function(){return{TAG:"",default:"验证错误",defaultInvalid:"提交的字段{field}在数据库中并不存在",validateFunction:"验证无效",required:"{label}必填",enum:"{label}超出范围",timestamp:"{label}格式无效",whitespace:"{label}不能为空",typeError:"{label}类型无效",date:{format:"{label}日期{value}格式无效",parse:"{label}日期无法解析,{value}无效",invalid:"{label}日期{value}无效"},length:{minLength:"{label}长度不能少于{minLength}",maxLength:"{label}长度不能超过{maxLength}",range:"{label}必须介于{minLength}和{maxLength}之间"},number:{minimum:"{label}不能小于{minimum}",maximum:"{label}不能大于{maximum}",exclusiveMinimum:"{label}不能小于等于{minimum}",exclusiveMaximum:"{label}不能大于等于{maximum}",range:"{label}必须介于{minimum}and{maximum}之间"},pattern:{mismatch:"{label}格式不匹配"}}};var g=b;e.default=g},"5d6e":function(t,e,r){"use strict";var n=r("af9e");t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},"62b0":function(t,e,r){"use strict";r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(e&&("object"===(0,n.default)(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.default)(t)},r("7a76"),r("c9b5");var n=i(r("fcf3")),a=i(r("f478"));function i(t){return t&&t.__esModule?t:{default:t}}},"65b0":function(t,e,r){var n=r("21bd");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("967d").default;a("4d04fc31",n,!0,{sourceMap:!1,shadowMode:!1})},"6c31":function(t,e,r){"use strict";r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},r("bf0f"),r("7996"),r("6a88")},7658:function(t,e,r){"use strict";var n=r("8bdb"),a=r("85c1"),i=r("bb80"),o=r("8466"),u=r("81a9"),s=r("d0b1"),f=r("5075"),l=r("b720"),c=r("474f"),d=r("1eb8"),h=r("1c06"),m=r("af9e"),v=r("29ba"),p=r("181d"),b=r("dcda");t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),y=-1!==t.indexOf("Weak"),x=g?"set":"add",_=a[t],w=_&&_.prototype,k=_,j={},O=function(t){var e=i(w[t]);u(w,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(y&&!h(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return y&&!h(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(y&&!h(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})},z=o(t,!c(_)||!(y||w.forEach&&!m((function(){(new _).entries().next()}))));if(z)k=r.getConstructor(e,t,g,x),s.enable();else if(o(t,!0)){var E=new k,S=E[x](y?{}:-0,1)!==E,D=m((function(){E.has(1)})),M=v((function(t){new _(t)})),P=!y&&m((function(){var t=new _,e=5;while(e--)t[x](e,e);return!t.has(-0)}));M||(k=e((function(t,e){l(t,w);var r=b(new _,t,k);return d(e)||f(e,r[x],{that:r,AS_ENTRIES:g}),r})),k.prototype=w,w.constructor=k),(D||P)&&(O("delete"),O("has"),g&&O("get")),(P||S)&&O(x),y&&w.clear&&delete w.clear}return j[t]=k,n({global:!0,constructor:!0,forced:k!==_},j),p(k,t),y||r.setStrong(k,t,g),k}},"7f48":function(t,e,r){"use strict";var n=r("8bdb"),a=r("af9e"),i=r("8449").f,o=a((function(){return!Object.getOwnPropertyNames(1)}));n({target:"Object",stat:!0,forced:o},{getOwnPropertyNames:i})},"8ef3":function(t,e,r){"use strict";var n=r("1fcd"),a=r.n(n);a.a},"9d13":function(t,e,r){"use strict";r.r(e);var n=r("dec5"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},a682:function(t,e,r){"use strict";r.r(e);var n=r("4b4a"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},ac36:function(t,e,r){t.exports=r.p+"static/card-05.png"},acb1:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,n.default)(t,e)},r("7a76"),r("c9b5"),r("6a54");var n=function(t){return t&&t.__esModule?t:{default:t}}(r("e668"))},ad03:function(t,e,r){var n=r("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/* 水平间距 */\n/* 水平间距 */.uni-forms-item[data-v-7b4c51d5]{position:relative;display:flex;margin-bottom:22px;flex-direction:row}.uni-forms-item__label[data-v-7b4c51d5]{display:flex;flex-direction:row;align-items:center;text-align:left;font-size:14px;color:#606266;height:36px;padding:0 12px 0 0;vertical-align:middle;flex-shrink:0;box-sizing:border-box}.uni-forms-item__label.no-label[data-v-7b4c51d5]{padding:0}.uni-forms-item__content[data-v-7b4c51d5]{position:relative;font-size:14px;flex:1;box-sizing:border-box;flex-direction:row}.uni-forms-item .uni-forms-item__nuve-content[data-v-7b4c51d5]{display:flex;flex-direction:column;flex:1}.uni-forms-item__error[data-v-7b4c51d5]{color:#f56c6c;font-size:12px;line-height:1;padding-top:4px;position:absolute;top:100%;left:0;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-transform:translateY(-100%);transform:translateY(-100%);opacity:0}.uni-forms-item__error .error-text[data-v-7b4c51d5]{color:#f56c6c;font-size:12px}.uni-forms-item__error.msg--active[data-v-7b4c51d5]{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uni-forms-item.is-direction-left[data-v-7b4c51d5]{flex-direction:row}.uni-forms-item.is-direction-top[data-v-7b4c51d5]{flex-direction:column}.uni-forms-item.is-direction-top .uni-forms-item__label[data-v-7b4c51d5]{padding:0 0 8px;line-height:1.5715;text-align:left;white-space:normal}.uni-forms-item .is-required[data-v-7b4c51d5]{color:#dd524d;font-weight:700}.uni-forms-item--border[data-v-7b4c51d5]{margin-bottom:0;padding:10px 0;border-top:1px #eee solid}.uni-forms-item--border .uni-forms-item__content[data-v-7b4c51d5]{flex-direction:column;justify-content:flex-start;align-items:flex-start}.uni-forms-item--border .uni-forms-item__content .uni-forms-item__error[data-v-7b4c51d5]{position:relative;top:5px;left:0;padding-top:0}.is-first-border[data-v-7b4c51d5]{border:none}',""]),t.exports=e},c238:function(t,e,r){"use strict";var n=r("af9e");t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},c3ae:function(t,e,r){"use strict";var n=r("c861"),a=r.n(n);a.a},c861:function(t,e,r){var n=r("e080");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("967d").default;a("e33cc240",n,!0,{sourceMap:!1,shadowMode:!1})},cad9:function(t,e,r){"use strict";r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=(0,a.default)();return function(){var r,a=(0,n.default)(t);if(e){var o=(0,n.default)(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return(0,i.default)(this,r)}},r("6a88"),r("bf0f"),r("7996");var n=o(r("f1f8")),a=o(r("6c31")),i=o(r("62b0"));function o(t){return t&&t.__esModule?t:{default:t}}},d0b1:function(t,e,r){"use strict";var n=r("8bdb"),a=r("bb80"),i=r("11bf"),o=r("1c06"),u=r("338c"),s=r("d6b1").f,f=r("80bb"),l=r("8449"),c=r("1ea2"),d=r("d7b4"),h=r("c238"),m=!1,v=d("meta"),p=0,b=function(t){s(t,v,{value:{objectID:"O"+p++,weakData:{}}})},g=t.exports={enable:function(){g.enable=function(){},m=!0;var t=f.f,e=a([].splice),r={};r[v]=1,t(r).length&&(f.f=function(r){for(var n=t(r),a=0,i=n.length;a<i;a++)if(n[a]===v){e(n,a,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,v)){if(!c(t))return"F";if(!e)return"E";b(t)}return t[v].objectID},getWeakData:function(t,e){if(!u(t,v)){if(!c(t))return!0;if(!e)return!1;b(t)}return t[v].weakData},onFreeze:function(t){return h&&m&&c(t)&&!u(t,v)&&b(t),t}};i[v]=!0},d951:function(t,e,r){t.exports=r.p+"static/renzhengchenggong.png"},dec5:function(t,e,r){"use strict";r("6a54");var n=r("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(r("fcf3")),i=n(r("2634")),o=n(r("39d8")),u=n(r("2fdc"));r("64aa"),r("aa9c"),r("bf0f"),r("2797"),r("dd2b");var s={name:"uniFormsItem",options:{virtualHost:!0},provide:function(){return{uniFormItem:this}},inject:{form:{from:"uniForm",default:null}},props:{rules:{type:Array,default:function(){return null}},name:{type:[String,Array],default:""},required:{type:Boolean,default:!1},label:{type:String,default:""},labelWidth:{type:[String,Number],default:""},labelAlign:{type:String,default:""},errorMessage:{type:[String,Boolean],default:""},leftIcon:String,iconColor:{type:String,default:"#606266"}},data:function(){return{errMsg:"",userRules:null,localLabelAlign:"left",localLabelWidth:"65px",localLabelPos:"left",border:!1,isFirstBorder:!1}},computed:{msg:function(){return this.errorMessage||this.errMsg}},watch:{"form.formRules":function(t){this.init()},"form.labelWidth":function(t){this.localLabelWidth=this._labelWidthUnit(t)},"form.labelPosition":function(t){this.localLabelPos=this._labelPosition()},"form.labelAlign":function(t){}},created:function(){var t=this;this.init(!0),this.name&&this.form&&this.$watch((function(){var e=t.form._getDataValue(t.name,t.form.localData);return e}),(function(e,r){var n=t.form._isEqual(e,r);if(!n){var a=t.itemSetValue(e);t.onFieldChange(a,!1)}}),{immediate:!1})},destroyed:function(){this.__isUnmounted||this.unInit()},methods:{setRules:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.userRules=t,this.init(!1)},setValue:function(){},onFieldChange:function(t){var e=arguments,r=this;return(0,u.default)((0,i.default)().mark((function n(){var a,u,s,f,l,c,d,h,m,v,p,b;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=!(e.length>1&&void 0!==e[1])||e[1],u=r.form,s=u.formData,u.localData,f=u.errShowType,l=u.validateCheck,c=u.validateTrigger,d=u._isRequiredField,h=u._realName,m=h(r.name),t||(t=r.form.formData[m]),v=r.itemRules.rules&&r.itemRules.rules.length,r.validator&&v&&0!==v){n.next=7;break}return n.abrupt("return");case 7:if(p=d(r.itemRules.rules||[]),b=null,"bind"!==c&&!a){n.next=18;break}return n.next=12,r.validator.validateUpdate((0,o.default)({},m,t),s);case 12:b=n.sent,p||void 0!==t&&""!==t||(b=null),b&&b.errorMessage?("undertext"===f&&(r.errMsg=b?b.errorMessage:""),"toast"===f&&uni.showToast({title:b.errorMessage||"校验错误",icon:"none"}),"modal"===f&&uni.showModal({title:"提示",content:b.errorMessage||"校验错误"})):r.errMsg="",l(b||null),n.next=19;break;case 18:r.errMsg="";case 19:return n.abrupt("return",b||null);case 20:case"end":return n.stop()}}),n)})))()},init:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.form||{},r=e.validator,n=e.formRules,i=e.childrens,o=(e.formData,e.localData),u=e._realName,s=e.labelWidth,f=e._getDataValue;e._setDataValue;if(this.localLabelAlign=this._justifyContent(),this.localLabelWidth=this._labelWidthUnit(s),this.localLabelPos=this._labelPosition(),this.form&&t&&i.push(this),r&&n){this.form.isFirstBorder||(this.form.isFirstBorder=!0,this.isFirstBorder=!0),this.group&&(this.group.isFirstBorder||(this.group.isFirstBorder=!0,this.isFirstBorder=!0)),this.border=this.form.border;var l=u(this.name),c=this.userRules||this.rules;"object"===(0,a.default)(n)&&c&&(n[l]={rules:c},r.updateSchema(n));var d=n[l]||{};this.itemRules=d,this.validator=r,this.itemSetValue(f(this.name,o))}},unInit:function(){var t=this;if(this.form){var e=this.form,r=e.childrens,n=e.formData,a=e._realName;r.forEach((function(e,r){e===t&&(t.form.childrens.splice(r,1),delete n[a(e.name)])}))}},itemSetValue:function(t){var e=this.form._realName(this.name),r=this.itemRules.rules||[],n=this.form._getValue(e,t,r);return this.form._setDataValue(e,this.form.formData,n),n},clearValidate:function(){this.errMsg=""},_isRequired:function(){return this.required},_justifyContent:function(){if(this.form){var t=this.form.labelAlign,e=this.labelAlign?this.labelAlign:t;if("left"===e)return"flex-start";if("center"===e)return"center";if("right"===e)return"flex-end"}return"flex-start"},_labelWidthUnit:function(t){return this.num2px(this.labelWidth?this.labelWidth:t||(this.label?65:"auto"))},_labelPosition:function(){return this.form&&this.form.labelPosition||"left"},isTrigger:function(t,e,r){return"submit"!==t&&t?"bind":void 0===t?"bind"!==e?e?"submit":""===r?"bind":"submit":"bind":"submit"},num2px:function(t){return"number"===typeof t?"".concat(t,"px"):t}}};e.default=s},e080:function(t,e,r){var n=r("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/* 水平间距 */\n/* 水平间距 */',""]),t.exports=e},e0ac:function(t,e,r){t.exports=r.p+"static/weitongguo.png"},e668:function(t,e,r){"use strict";function n(t,r){return e.default=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,r)}r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,r("8a8d")},ec4c:function(t,e,r){"use strict";r.r(e);var n=r("2446"),a=r("eeba");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("f32e");var o=r("828b"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"3fdf0814",null,!1,n["a"],void 0);e["default"]=u.exports},eeba:function(t,e,r){"use strict";r.r(e);var n=r("3e64"),a=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},f1be:function(t,e,r){"use strict";r.r(e);var n=r("4cea"),a=r("9d13");for(var i in a)["default"].indexOf(i)<0&&function(t){r.d(e,t,(function(){return a[t]}))}(i);r("8ef3");var o=r("828b"),u=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"7b4c51d5",null,!1,n["a"],void 0);e["default"]=u.exports},f1f8:function(t,e,r){"use strict";function n(t){return e.default=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,r("8a8d"),r("926e")},f32e:function(t,e,r){"use strict";var n=r("65b0"),a=r.n(n);a.a},f3f7:function(t,e,r){"use strict";r("53f7")},f478:function(t,e,r){"use strict";r("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},r("7a76"),r("c9b5")},f7aa:function(t,e,r){t.exports=r.p+"static/card-04.png"}}]); |