cyywl_shop_app/dist/static/js/pages-users-user_phone-inde...

1 line
8.0 KiB
JavaScript
Raw Normal View History

2023-06-09 11:16:57 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_phone-index"],{2668:function(t,e,n){var i=n("8c22");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("061fc092",i,!0,{sourceMap:!1,shadowMode:!1})},"2d01":function(t,e,n){"use strict";var i=n("2668"),a=n.n(i);a.a},"30d0":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("c7eb")),s=i(n("1da1"));n("ac1f"),n("00b4");var o=i(n("430f")),c=n("bed0"),r=n("1939"),u=n("26cb"),d={mixins:[o.default],components:{},data:function(){return{phone:"",captcha:"",isAuto:!1,isShowAuth:!1,key:"",isNew:!0,timer:"",text:"获取验证码",nums:60}},mounted:function(){},computed:(0,u.mapGetters)(["isLogin","userInfo"]),onLoad:function(){this.isLogin||(0,r.toLogin)()},methods:{getTimes:function(){this.nums=this.nums-1,this.text="剩余 "+this.nums+"s",this.nums<0&&clearInterval(this.timer),this.text="剩余 "+this.nums+"s",this.text<"剩余 0s"&&(this.disabled=!1,this.text="重新获取")},onLoadFun:function(){},authColse:function(t){this.isShowAuth=t},next:function(){var t=this;if(uni.hideLoading(),this.isNew=!1,this.captcha="",clearInterval(this.timer),this.disabled=!1,this.text="获取验证码",uni.showLoading({title:"加载中",mask:!0}),!this.captcha)return this.$util.Tips({title:"请填写验证码"});(0,c.bindingVerify)({phone:this.userInfo.phone,captcha:this.captcha}).then((function(e){uni.hideLoading(),t.isNew=!1,t.captcha="",clearInterval(t.timer),t.disabled=!1,t.text="获取验证码"})).catch((function(e){return t.$util.Tips({title:e})}))},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 uni.showModal({title:"是否更换绑定账号",confirmText:"绑定",success:function(e){if(e.confirm)(0,c.bindingPhone)({phone:t.phone,captcha:t.captcha}).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"})}}):t.$util.Tips({title:"请填写验证码"}):t.$util.Tips({title:"请输入正确的手机号码!"}):t.$util.Tips({title:"请填写手机号码!"})},code:function(){var t=this;return(0,s.default)((0,a.default)().mark((function e(){var n;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.nums=60,uni.showLoading({title:"加载中",mask:!0}),n=t,n.isNew){e.next=8;break}if(n.phone){e.next=6;break}return e.abrupt("return",n.$util.Tips({title:"请填写手机号码!"}));case 6:if(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(n.phone)){e.next=8;break}return e.abrupt("return",n.$util.Tips({title:"请输入正确的手机号码!"}));case 8:return e.next=10,(0,c.registerVerify)(n.isNew?n.userInfo.phone:n.phone).then((function(t){n.$util.Tips({title:t.message}),n.timer=setInterval(n.getTimes,1e3),n.disabled=!0,uni.hideLoading()})).catch((function(t){return n.$util.Tips({title:t})}));case 10:case"end":return e.stop()}}),e)})))()}}};e.default=d},"430f":function(t,e,n){"use strict";n("7a82"),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},"8c22":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件),方便用户通过搭积