require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_pwd_edit/index"],{1563:function(t,e,n){},2333:function(t,e,n){"use strict";n.r(e);var i=n("851c"),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a},"3a5f":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("f076");i(n("3240"));var o=i(n("590c"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"3b05":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},o=[]},"590c":function(t,e,n){"use strict";n.r(e);var i=n("3b05"),o=n("2333");for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("a06a");var u=n("828b"),a=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=a.exports},"851c":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("7eb4")),r=i(n("ee10")),u=i(n("0293")),a=n("360a"),s=n("92f9"),c=n("5088"),f=n("8f59"),d=i(n("89cc")),l=n("4d38"),h={mixins:[u.default,d.default],components:{Verify:function(){n.e("pages/users/components/verify/verify").then(function(){return resolve(n("2e78"))}.bind(null,n)).catch(n.oe)}},data:function(){return{captchaType:l.CAPTCHA_TYPE,userInfo:{},phone:"",password:"",qr_password:"",isAuto:!1,isShowAuth:!1,key:""}},computed:(0,f.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,e){},deep:!0}},onLoad:function(){this.isLogin?(this.getUserInfo(),this.getVerifyCode()):(0,c.toLogin)()},onShow:function(){t.removeStorageSync("form_type_cart")},methods:{onLoadFun:function(t){this.getUserInfo(),this.getVerifyCode(),this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},getVerifyCode:function(){var t=this;(0,a.verifyCode)().then((function(e){t.$set(t,"key",e.data.key)}))},getUserInfo:function(){var t=this;(0,s.getUserInfo)().then((function(e){var n=e.data.phone,i=n.substr(0,3)+"****"+n.substr(7);t.$set(t,"userInfo",e.data),t.phone=i}))},success:function(t){var e=this;this.$refs.verify.hide(),(0,s.getCodeApi)().then((function(n){e.keyCode=n.data.key,e.getCode(t)})).catch((function(t){e.$util.Tips({title:t})}))},code:function(t){if(!this.userInfo.phone)return this.$util.Tips({title:"手机号码不存在,无法发送验证码！"});this.$refs.verify.show()},getCode:function(t){var e=this;return(0,r.default)(o.default.mark((function n(){var i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=e,n.next=3,(0,a.registerVerify)({phone:i.userInfo.phone,type:"reset",key:i.key,captchaType:l.CAPTCHA_TYPE,captchaVerification:t.captchaVerification}).then((function(t){i.$util.Tips({title:t.msg}),i.sendCode()})).catch((function(t){e.$refs.verify.refresh(),i.$util.Tips({title:t})}));case 3:case"end":return n.stop()}}),n)})))()},editPwd:function(e){var n=this,i=e.detail.value.password,o=e.detail.value.qr_password,r=e.detail.value.captcha;return i?o!=i?n.$util.Tips({title:"两次输入的密码不一致！"}):r?void(0,a.phoneRegisterReset)({account:n.userInfo.phone,captcha:r,password:i}).then((function(e){t.reLaunch({url:"/pages/users/login/index"})})).catch((function(t){return n.$util.Tips({title:t})})):n.$util.Tips({title:"请输入验证码"}):n.$util.Tips({title:"请输入新密码"})}}};e.default=h}).call(this,n("df3c")["default"])},a06a:function(t,e,n){"use strict";var i=n("1563"),o=n.n(i);o.a}},[["3a5f","common/runtime","common/vendor"]]]);