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.
1 line
6.5 KiB
1 line
6.5 KiB
![]()
1 year ago
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["AppletCode/pages/index/index"],{"0194":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var o={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"e4f7"))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"cc5a"))}},a=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.current=0},e.e1=function(t){e.animation=!0},e.e2=function(t){e.current=1},e.e3=function(t){e.current=0})},i=[]},"5cb7":function(e,t,n){},"8de3":function(e,t,n){"use strict";(function(e){var o=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n("2eee")),i=o(n("c973")),r=o(n("76d8")),c=o(n("dbc7")),s={data:function(){return{replace:{phone:"",token:"",verification:""},replacePhone:"",replacePhoneToken:"",Verification:"",postData:{name:"",phone:e.getStorageSync("phone"),qrCode:"",plateNumber:"",remark:"",createSource:"XOIL_DRIVER_COMPANY_WECHAT_APPLET",selfOperatedOrOutsourced:"0"},timerNumber:0,timer:null,basicsData:null,fromSwitchingState:!0,fromStyle:{height:"",nameType:!0,plateNumberType:!0,phoneType:!0,replacePhoneType:!0},animation:!1,current:0,styles:null,qh:n("75af"),codeBg:n("f751")}},mounted:function(){var t=this;this.styles=e.getMenuButtonBoundingClientRect(),Object.keys(this.styles).forEach((function(e){t.styles[e]=t.styles[e]})),this.resize(),console.log(this.styles)},onLoad:function(e){this.basicsData=JSON.parse(e.details),this.postData.selfOperatedOrOutsourced=this.basicsData.selfOperatedOrOutsourced,this.init()},onHide:function(){console.log("000"),e.clearStorageSync()},watch:{animation:function(e){var t=this;e&&setTimeout((function(){t.animation=!1,t.fromSwitchingState=!t.fromSwitchingState,t.clearReplaceFn()}),500)}},methods:{closeFn:function(){this.$refs.popup.close(),this.animation=!0},replacePhoneFn:function(){var t=this;this.checkFn("replacePhone"),this.fromStyle.replacePhoneType?c.default.checkCodeWithDel({code:this.replace.verification,verifyCodeToken:this.replace.token}).then((function(n){2e4==n.code&&(e.showToast({title:"更换成功",icon:"success"}),t.postData.phone=t.replace.phone,t.animation=!0,t.postData.name="",t.postData.remark="",t.postData.plateNumber="")})):e.showToast({title:"请输入正确手机号",icon:"error"})},clearReplaceFn:function(){var e=this;Object.keys(this.replace).forEach((function(t){e.replace[t]=""}))},codeClick:function(){var t=this;0===this.timerNumber&&(this.checkFn("replacePhone"),this.replace.phone?c.default.loginSmsCode({phone:this.replace.phone}).then((function(n){2e4==n.code&&(t.countDown(),e.showToast({title:"验证码已发送到您的手机",icon:"success"}),t.replace.token=n.data.verifyCodeToken)})):e.showToast({title:"请输入正确手机号",icon:"error"}))},countDown:function(){var e=this;this.timerNumber=60,this.timer=setInterval((function(){0==e.timerNumber?clearInterval(e.timer):e.timerNumber-=1}),1e3)},checkFn:function(e){switch(e){case"name":this.fromStyle.nameType=/(^[\u4e00-\u9fa5]{1}[\u4e00-\u9fa5\.·。]{0,18}[\u4e00-\u9fa5]{1}$)|(^[a-zA-Z]{1}[a-zA-Z\s]{0,18}[a-zA-Z]{1}$)/.test(this.postData.name);break;case"plateNumber":this.fromStyle.plateNumberType=/^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1})$/.test(this.postData.plateNumber);break;case"phone":this.fromStyle.phoneType=/^1[3456789]\d{9}$/.test(this.postData.phone);break;case"replacePhone":this.fromStyle.replacePhoneType=/^1[3456789]\d{9}$/.test(this.replace.phone);break}},submit:function(){this.checkFn("name"),this.checkFn("plateNumber"),this.fromStyle.nameType&&this.fromStyle.plateNumberType?c.defa
|