1 line
7.8 KiB
JavaScript
1 line
7.8 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_phone-index"],{"1ab3":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{disabled:!1,text:"获取验证码"}},methods:{sendCode:function(){var t=this;if(!this.disabled){this.disabled=!0;var e=60;this.text="剩余 "+e+"s";var n=setInterval((function(){e-=1,e<0&&clearInterval(n),t.text="剩余 "+e+"s",t.text<"剩余 0s"&&(t.disabled=!1,t.text="重新获取")}),1e3)}}}};e.default=i},"2b5d":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47"),n("0506");var a=i(n("2634")),s=i(n("2fdc")),o=i(n("9b1b")),r=i(n("1ab3")),c=n("02aa"),d=n("672a"),u=n("8f59"),l=n("96e0"),f=i(n("283c")),p=n("e44d"),h={mixins:[r.default],components:{Verify:f.default},data:function(){return{phone:"",captcha:"",key:"",codeVal:""}},computed:(0,o.default)((0,o.default)({},(0,u.mapGetters)(["isLogin","viewColor"])),(0,l.configMap)(["wechat_phone_switch"])),onLoad:function(){this.isLogin||(0,p.toLogin)()},methods:{editPwd:function(){var t=this;return t.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(t.phone)?t.captcha?void(0,c.bindingPhone)({phone:t.phone,sms_code:t.captcha}).then((function(e){if(void 0===e.data||!e.data.is_bind)return t.$util.Tips({title:"绑定成功!",icon:"success"},{tab:5,url:"/pages/users/user_info/index"});uni.showModal({title:"是否绑定账号",content:e.message,confirmText:"绑定",success:function(e){if(e.confirm)(0,c.bindingPhone)({phone:t.phone,captcha:t.captcha,step:1}).then((function(e){return t.$util.Tips({title:e.message,icon:"success"},{tab:5,url:"/pages/users/user_info/index"})})).catch((function(e){return t.$util.Tips({title:e})}));else if(e.cancel)return t.$util.Tips({title:"您已取消绑定!"},{tab:5,url:"/pages/users/user_info/index"})}})})).catch((function(e){return t.$util.Tips({title:e})})):t.$util.Tips({title:"请填写验证码"}):t.$util.Tips({title:"请输入正确的手机号码!"}):t.$util.Tips({title:"请填写手机号码!"})},code:function(t){var e=this;return(0,s.default)((0,a.default)().mark((function n(){var i;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e,i.phone){n.next=3;break}return n.abrupt("return",i.$util.Tips({title:"请填写手机号码!"}));case 3:if(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(i.phone)){n.next=5;break}return n.abrupt("return",i.$util.Tips({title:"请输入正确的手机号码!"}));case 5:return e.disabled=!0,n.next=8,(0,d.registerVerify)({phone:i.phone,key:i.key,code:i.captcha,type:"binding",captchaType:"blockPuzzle",captchaVerification:t.captchaVerification}).then((function(t){e.disabled=!1,i.$util.Tips({title:t.message}),i.sendCode()})).catch((function(t){return e.disabled=!1,i.$util.Tips({title:t})}));case 8:case"end":return n.stop()}}),n)})))()},success:function(t){this.$refs.verify.hide(),this.code(t)},handleVerify:function(){this.$refs.verify.show()}}};e.default=h},"2ec5":function(t,e,n){"use strict";t.exports=function(t,e){return e||(e={}),t=t&&t.__esModule?t.default:t,"string"!==typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},"51a7":function(t,e,n){"use strict";n.r(e);var i=n("8fc7"),a=n("8fb0");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("a0eb0");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"23a0d849",null,!1,i["a"],void 0);e["default"]=r.exports},"574c":function(t,e,n){var i=n("9e2b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("4e472c96",i,!0,{sourceMap:!1,shadowMode:!1})},"8fb0":function(t,e,n){"use strict";n.r(e);var i=n("2b5d"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},"8fc7":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d
|