require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_phone/index"],{"03ba":function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=n(i("0293")),s=i("360a"),u=i("5088"),o=i("8f59"),a=n(i("89cc")),r=i("4d38"),f={mixins:[c.default,a.default],components:{Verify:function(){i.e("pages/users/components/verify/verify").then(function(){return resolve(i("2e78"))}.bind(null,i)).catch(i.oe)}},data:function(){return{captchaType:r.CAPTCHA_TYPE,phone:"",captcha:"",isAuto:!1,isShowAuth:!1,key:"",authKey:"",type:0,show:!1}},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(t){this.isLogin?this.getVerifyCode():(0,u.toLogin)(),this.authKey=t.key||"",this.url=t.url||"",this.type=t.type||0},onShow:function(){t.removeStorageSync("form_type_cart")},methods:{onLoadFun:function(){this.getVerifyCode(),this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},getVerifyCode:function(){var t=this;(0,s.verifyCode)().then((function(e){t.$set(t,"key",e.data.key)}))},editPwd:function(){var e=this;return e.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(e.phone)?e.captcha?void(0==this.type?(0,s.bindingUserPhone)({phone:e.phone,captcha:e.captcha}).then((function(i){if(void 0===i.data||!i.data.is_bind)return e.$util.Tips({title:"绑定成功",icon:"success"},{tab:5,url:"/pages/users/user_info/index"});t.showModal({title:"是否绑定账号",content:i.msg,confirmText:"绑定",success:function(t){if(t.confirm)(0,s.bindingUserPhone)({phone:e.phone,captcha:e.captcha,step:1}).then((function(t){return e.$util.Tips({title:t.msg,icon:"success"},{tab:5,url:"/pages/users/user_info/index"})})).catch((function(t){return e.$util.Tips({title:t})}));else if(t.cancel)return e.$util.Tips({title:"您已取消绑定！"},{tab:5,url:"/pages/users/user_info/index"})}})})).catch((function(t){return e.$util.Tips({title:t})})):(0,s.updatePhone)({phone:e.phone,captcha:e.captcha}).then((function(t){return e.$util.Tips({title:t.msg,icon:"success"},{tab:5,url:"/pages/users/user_info/index"})})).catch((function(t){return e.$util.Tips({title:t})}))):e.$util.Tips({title:"请填写验证码"}):e.$util.Tips({title:"请输入正确的手机号码！"}):e.$util.Tips({title:"请填写手机号码！"})},success:function(t){var e=this;this.$refs.verify.hide();var i=this;(0,s.verifyCode)().then((function(n){(0,s.registerVerify)({phone:i.phone,type:"reset",key:n.data.key,captchaType:r.CAPTCHA_TYPE,captchaVerification:t.captchaVerification}).then((function(t){i.$util.Tips({title:t.msg}),i.sendCode()})).catch((function(t){return e.$refs.verify.refresh(),i.$util.Tips({title:t})}))}))},code:function(){return this.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.phone)?void this.$refs.verify.show():this.$util.Tips({title:"请输入正确的手机号码！"}):this.$util.Tips({title:"请填写手机号码！"})}}};e.default=f}).call(this,i("df3c")["default"])},"33cc":function(t,e,i){"use strict";i.r(e);var n=i("acab"),c=i("a5cb");for(var s in c)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return c[t]}))}(s);i("c098");var u=i("828b"),o=Object(u["a"])(c["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=o.exports},"4af5":function(t,e,i){"use strict";(function(t,e){var n=i("47a9");i("f076");n(i("3240"));var c=n(i("33cc"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(c.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},a5cb:function(t,e,i){"use strict";i.r(e);var n=i("03ba"),c=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=c.a},acab:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return c})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},c=[]},c098:function(t,e,i){"use strict";var n=i("d8fe"),c=i.n(n);c.a},d8fe:function(t,e,i){}},[["4af5","common/runtime","common/vendor"]]]);