(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/my/pwd"],{134:function(e,n,t){"use strict";(function(e){t(5);s(t(4));var n=s(t(135));function s(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(1)["createPage"])},135:function(e,n,t){"use strict";t.r(n);var s=t(136),o=t(138);for(var i in o)"default"!==i&&function(e){t.d(n,e,(function(){return o[e]}))}(i);t(140);var u,r=t(11),a=Object(r["default"])(o["default"],s["render"],s["staticRenderFns"],!1,null,null,null,!1,s["components"],u);a.options.__file="pages/my/pwd.vue",n["default"]=a.exports},136:function(e,n,t){"use strict";t.r(n);var s=t(137);t.d(n,"render",(function(){return s["render"]})),t.d(n,"staticRenderFns",(function(){return s["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return s["recyclableRender"]})),t.d(n,"components",(function(){return s["components"]}))},137:function(e,n,t){"use strict";var s;t.r(n),t.d(n,"render",(function(){return o})),t.d(n,"staticRenderFns",(function(){return u})),t.d(n,"recyclableRender",(function(){return i})),t.d(n,"components",(function(){return s}));var o=function(){var e=this,n=e.$createElement;e._self._c},i=!1,u=[];o._withStripped=!0},138:function(e,n,t){"use strict";t.r(n);var s=t(139),o=t.n(s);for(var i in s)"default"!==i&&function(e){t.d(n,e,(function(){return s[e]}))}(i);n["default"]=o.a},139:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{code:"",phone:"",password:"",oldpassword:"",sending:!1,sendTime:"获取验证码",count:60,logining:!1,oldPwd:"",pwd:"",newpwd:"",username:""}},onLoad:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this;this.$Request.getA("/sys/user/info").then((function(n){0==n.code&&(e.phone=n.user.mobile,e.salt=n.user.salt,e.username=n.user.username)}))},sendMsg:function(){var n=this,t=this.phone;t?11!==t.length?this.$queue.showToast("请输入正确的手机号"):(this.$queue.showLoading("正在发送验证码..."),this.$Request.getT("/appLogin/sendMsg/"+t+"/forget").then((function(t){0===t.code?(n.sending=!0,n.$queue.showToast("验证码发送成功请注意查收"),n.countDown(),e.hideLoading()):(e.hideLoading(),e.showModal({showCancel:!1,title:"短信发送失败",content:t.msg?t.msg:"请一分钟后再获取验证码"}))}))):this.$queue.showToast("请输入手机号")},countDown:function(){var e=this.count;1===e?(this.count=60,this.sending=!1,this.sendTime="获取验证码"):(this.count=e-1,this.sending=!0,this.sendTime=e-1+"秒后重新获取",setTimeout(this.countDown.bind(this),1e3))},inputChange:function(e){e.currentTarget.dataset.key;this.pwd=e.detail.value},inputChanges:function(e){e.currentTarget.dataset.key;this.newpwd=e.detail.value},navBack:function(){e.navigateBack()},toLogin:function(){var n=this;if(console.log(this.pwd.length),6!=this.pwd.length)this.$queue.showToast("请输入六位数密码");else if(6!=this.newpwd.length)this.$queue.showToast("请再次输入六位数密码");else if(this.pwd!=this.newpwd)this.$queue.showToast("密码不一致");else{this.logining=!0,this.$queue.showLoading("正在修改密码中...");var t={mobile:this.phone,password:this.pwd,salt:this.salt,username:this.username};this.$Request.postJson("/sys/user/updateShop",t).then((function(t){e.hideLoading(),0===t.code?(n.$queue.showToast("密码修改成功！下次请使用新密码登录！"),setTimeout((function(){e.navigateBack()}),1e3)):e.showModal({showCancel:!1,title:"密码修改失败",content:t.msg})}))}}}};n.default=t}).call(this,t(1)["default"])},140:function(e,n,t){"use strict";t.r(n);var s=t(141),o=t.n(s);for(var i in s)"default"!==i&&function(e){t.d(n,e,(function(){return s[e]}))}(i);n["default"]=o.a},141:function(e,n,t){}},[[134,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/pwd.js.map