(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/balance/password"],{"285f":function(t,e,s){"use strict";s.r(e);var r=s("39e1"),a=s("eeed");for(var n in a)"default"!==n&&function(t){s.d(e,t,(function(){return a[t]}))}(n);s("622b");var o,i=s("f0c5"),u=Object(i["a"])(a["default"],r["b"],r["c"],!1,null,"cc6b1214",null,!1,r["a"],o);e["default"]=u.exports},"39e1":function(t,e,s){"use strict";var r;s.d(e,"b",(function(){return a})),s.d(e,"c",(function(){return n})),s.d(e,"a",(function(){return r}));var a=function(){var t=this,e=t.$createElement;t._self._c},n=[]},"622b":function(t,e,s){"use strict";var r=s("6f4a"),a=s.n(r);a.a},"6f4a":function(t,e,s){},c9c8:function(t,e,s){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s("2f62");function a(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,r)}return s}function n(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?a(Object(s),!0).forEach((function(e){o(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):a(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function o(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var i={name:"password",data:function(){return{is_success:!1,old_pay_password:"",pay_password:"",verify_pay_password:"",haveBackground:!1,isPassword:!1}},computed:n(n({},(0,r.mapState)({userInfo:function(t){return t.user.info},mall:function(t){return t.mallConfig.mall}})),{},{inputPass:function(){return this.userInfo&&this.userInfo.is_pay_password?this.old_pay_password.length+this.pay_password.length+this.verify_pay_password.length==18:this.pay_password.length+this.verify_pay_password.length==12}}),onLoad:function(){var e=this;e.$request({url:e.$api.balance.index}).then((function(e){0===e.code&&0==e.data.setting.is_pay_password&&(t.showToast({icon:"none",title:"支付密码功能未开启"}),setTimeout((function(){t.navigateBack()}),1e3))})),this.isPassword=!0},methods:{toForget:function(){t.navigateTo({url:"/pages/balance/forget"})},toIndex:function(){t.reLaunch({url:"/pages/index/index"})},modify:function(){var e=this;if(this.inputPass)if(this.verify_pay_password=this.verify_pay_password.trim(),this.pay_password=this.pay_password.trim(),this.old_pay_password=this.old_pay_password.trim(),this.pay_password===this.verify_pay_password){this.$showLoading({type:"global",text:"设置中..."});var s={pay_password:this.pay_password,verify_pay_password:this.verify_pay_password};this.userInfo.is_pay_password&&(s.old_pay_password=this.old_pay_password),this.$request({url:this.userInfo.is_pay_password?this.$api.member.update_password:this.$api.member.set_password,method:"post",data:s}).then((function(s){e.$hideLoading(),0===s.code?(e.is_success=!0,e.$store.dispatch("user/refresh"),t.showToast({title:s.msg,type:"success"})):t.showToast({icon:"none",title:s.msg})}))}else t.showToast({icon:"none",title:"两次输入的密码不一致"})}}};e.default=i}).call(this,s("543d")["default"])},e337:function(t,e,s){"use strict";(function(t){s("2d0a");r(s("66fd"));var e=r(s("285f"));function r(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,s("543d")["createPage"])},eeed:function(t,e,s){"use strict";s.r(e);var r=s("c9c8"),a=s.n(r);for(var n in r)"default"!==n&&function(t){s.d(e,t,(function(){return r[t]}))}(n);e["default"]=a.a}},[["e337","common/runtime","common/vendor"]]]);