| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60eb7f90"],{"1f77":function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return o}));var a=r("751a");function s(e){return Object(a["a"])({url:"/api/member/info",data:e,forceLogin:!0})}function n(e){return Object(a["a"])({url:"/api/member/modifynickname",data:e,forceLogin:!0})}function o(e){return Object(a["a"])({url:"/api/member/modifyheadimg",data:e,forceLogin:!0})}},"29a7":function(e,t,r){"use strict";r("815d")},"2a50":function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"h",(function(){return n})),r.d(t,"g",(function(){return o})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"i",(function(){return c})),r.d(t,"c",(function(){return u})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return p}));var a=r("751a");function s(e){return Object(a["a"])({url:"/api/member/modifypassword",data:e,forceLogin:!0})}function n(e){return Object(a["a"])({url:"/api/member/bindmobliecode",data:e,forceLogin:!0})}function o(e){return Object(a["a"])({url:"/api/member/modifymobile",data:e,forceLogin:!0})}function i(e){return Object(a["a"])({url:"/api/member/checkemail",data:e,forceLogin:!0})}function l(e){return Object(a["a"])({url:"/api/member/modifyemail",data:e,forceLogin:!0})}function c(e){return Object(a["a"])({url:"/api/member/verifypaypwdcode",data:e,forceLogin:!0})}function u(e){return Object(a["a"])({url:"/api/member/modifypaypassword",data:e,forceLogin:!0})}function m(e){return Object(a["a"])({url:"/api/member/paypwdcode",data:e,forceLogin:!0})}function p(e){return Object(a["a"])({url:"/api/member/pwdmobliecode",data:e,forceLogin:!0})}},"2e91":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r("4d20");function a(e,t,r,a,s,n,o){try{var i=e[n](o),l=i.value}catch(c){return void r(c)}i.done?t(l):Promise.resolve(l).then(a,s)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(s,n){var o=e.apply(t,r);function i(e){a(o,s,n,i,l,"next",e)}function l(e){a(o,s,n,i,l,"throw",e)}i(void 0)}))}}},"6a61":function(e,t,r){var a=function(e){"use strict";var t,r=Object.prototype,a=r.hasOwnProperty,s="function"===typeof Symbol?Symbol:{},n=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",i=s.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(T){l=function(e,t,r){return e[t]=r}}function c(e,t,r,a){var s=t&&t.prototype instanceof y?t:y,n=Object.create(s.prototype),o=new j(a||[]);return n._invoke=_(e,r,o),n}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var m="suspendedStart",p="suspendedYield",d="executing",f="completed",h={};function y(){}function g(){}function v(){}var b={};b[n]=function(){return this};var w=Object.getPrototypeOf,F=w&&w(w(O([])));F&&F!==r&&a.call(F,n)&&(b=F);var k=v.prototype=y.prototype=Object.create(b);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(s,n,o,i){var l=u(e[s],e,n);if("throw"!==l.type){var c=l.arg,m=c.value;return m&&"object"===typeof m&&a.call(m,"__await")?t.resolve(m.__await).then((function(e){r("next",e,o,i)}),(function(e){r("throw",e,o,i)})):t.resolve(m).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,i)}))}i(l.arg)}var s;function n(e,a){function n(){return new t((function(t,s){r(e,a,t,s)}))}return s=s?s.then(n,n):n()}this._invoke=n}function _(e,t,r){var a=m;return function(s,n){if(a===d)throw new Error("Generator is already running");if(a===f){if("throw"===s)throw n;return L()}r.method=s,r.arg=n;while(1){var o=r.delegate;if(o){var i=C(o,r);if(i){if(i===h)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===m)throw a=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=d;var l=u(e,t,r);if("normal"===l.type){if(a=r.done?f:p,l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=f,r.method="throw",r.arg=l.arg)}}}function C(e,r){var a=e.iterator[r.method];if(a===t){if(r.delegate=null,"throw"===r.method){if(e.iterator["return"]&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var s=u(a,e.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,h;var n=s.arg;return n?n.done?(r[e.resultName]=n.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function O(e){if(e){var r=e[n];if(r)return r.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var s=-1,o=function r(){while(++s<e.length)if(a.call(e,s))return r.value=e[s],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:L}}function L(){return{value:t,done:!0}}return g.prototype=k.constructor=v,v.constructor=g,g.displayName=l(v,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,i,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},P(x.prototype),x.prototype[o]=function(){return this},e.AsyncIterator=x,e.async=function(t,r,a,s,n){void 0===n&&(n=Promise);var o=new x(c(t,r,a,s),n);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},P(k),l(k,i,"Generator"),k[n]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){while(t.length){var a=t.pop();if(a in e)return r.value=a,r.done=!1,r}return r.done=!0,r}},e.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function s(a,s){return i.type="throw",i.arg=e,r.next=a,s&&(r.method="next",r.arg=t),!!s}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return s("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return s(o.catchLoc,!0);if(this.prev<o.finallyLoc)return s(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return s(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return s(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc<=this.prev&&a.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var n=s;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=e,o.arg=t,n?(this.method="next",this.next=n.finallyLoc,h):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var s=a.arg;E(r)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:O(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=a}catch(s){Function("r","regeneratorRuntime = r")(a)}},"815d":function(e,t,r){},bb1c:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"box"},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.yes,expression:"yes"}],staticClass:"null-page"}),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"security"},["all"==e.type?r("div",{staticClass:"item-wrap"},[r("div",{staticClass:"item"},[e._m(0),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(t){return e.edit("password")}}},[e._v("修改")])],1)]),r("div",{staticClass:"item"},[e._m(1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(t){return e.edit("tell")}}},[e._v("修改")])],1)])]):e._e(),"password"==e.type?r("div",{staticClass:"edit"},[r("div",{staticClass:"title"},[e._v("修改登录密码")]),e.memberInfo.password?r("div",[r("div",{staticClass:"pass-form"},[r("el-form",{ref:"passWordRef",attrs:{model:e.passWordForm,rules:e.passWordRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"原密码",prop:"oldPass"}},[r("el-input",{attrs:{type:"password",placeholder:"当前密码"},model:{value:e.passWordForm.oldPass,callback:function(t){e.$set(e.passWordForm,"oldPass",t)},expression:"passWordForm.oldPass"}})],1),r("el-form-item",{attrs:{label:"新密码",prop:"pass"}},[r("el-input",{attrs:{type:"password",placeholder:"新密码"},model:{value:e.passWordForm.pass,callback:function(t){e.$set(e.passWordForm,"pass",t)},expression:"passWordForm.pass"}})],1),r("el-form-item",{attrs:{label:"确认密码",prop:"checkPass"}},[r("el-input",{attrs:{type:"password",placeholder:"请确认新密码"},model:{value:e.passWordForm.checkPass,callback:function(t){e.$set(e.passWordForm,"checkPass",t)},expression:"passWordForm.checkPass"}})],1)],1)],1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")]),r("el-button",{on:{click:function(t){e.type="all"}}},[e._v("取消")])],1)]):r("div",{staticClass:"tell-pass"},[r("el-form",{ref:"tellPassRef",attrs:{model:e.tellPassForm,rules:e.tellPassRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"验证码",prop:"code"}},[r("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"4"},model:{value:e.tellPassForm.code,callback:function(t){e.$set(e.tellPassForm,"code",t)},expression:"tellPassForm.code"}},[r("template",{slot:"append"},[r("img",{staticClass:"captcha",attrs:{src:e.captcha.img,mode:""},on:{click:e.getcaptcha}})])],2)],1),r("el-form-item",{attrs:{label:"动态码",prop:"tellPassDynacode"}},[r("el-input",{attrs:{placeholder:"请输入动态码"},model:{value:e.tellPassForm.tellPassDynacode,callback:function(t){e.$set(e.tellPassForm,"tellPassDynacode",t)},expression:"tellPassForm.tellPassDynacode"}},[r("template",{slot:"append"},[r("el-button",{attrs:{type:"primary"},on:{click:e.getTellPassCode}},[e._v(e._s(e.tellPassForm.tellPassCodeText))])],1)],2)],1),r("p",{staticClass:"tell-code"},[e._v("点击“获取动态码”,将会向您已绑定的手机号"+e._s(e._f("mobile")(e.memberInfo.mobile))+"发送验证码")]),r("el-form-item",{attrs:{label:"新密码",prop:"pass"}},[r("el-input",{attrs:{type:"password",placeholder:"新密码"},model:{value:e.tellPassForm.pass,callback:function(t){e.$set(e.tellPassForm,"pass",t)},expression:"tellPassForm.pass"}})],1),r("el-form-item",{attrs:{label:"确认密码",prop:"checkPass"}},[r("el-input",{attrs:{type:"password",placeholder:"请确认新密码"},model:{value:e.tellPassForm.checkPass,callback:function(t){e.$set(e.tellPassForm,"checkPass",t)},expression:"tellPassForm.checkPass"}})],1)],1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary"},on:{click:e.tellPassSave}},[e._v("保存")]),r("el-button",{on:{click:function(t){e.type="all"}}},[e._v("取消")])],1)],1)]):e._e(),"email"==e.type?r("div",{staticClass:"edit"},[r("div",{staticClass:"title"},[e._v("绑定邮箱")]),r("div",{staticClass:"pass-form"},[r("el-form",{ref:"emailRef",attrs:{model:e.emailForm,rules:e.emailRules,"label-width":"100px"}},[e.emailForm.currEmail?r("el-form-item",{attrs:{label:"当前邮箱",prop:"email"}},[r("p",[e._v(e._s(e.emailForm.currEmail))])]):e._e(),r("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[r("el-input",{attrs:{type:"email",placeholder:"请输入邮箱"},model:{value:e.emailForm.email,callback:function(t){e.$set(e.emailForm,"email",t)},expression:"emailForm.email"}})],1),r("el-form-item",{attrs:{label:"验证码",prop:"code"}},[r("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"4"},model:{value:e.emailForm.code,callback:function(t){e.$set(e.emailForm,"code",t)},expression:"emailForm.code"}},[r("template",{slot:"append"},[r("img",{staticClass:"captcha",attrs:{src:e.captcha.img,mode:""},on:{click:e.getcaptcha}})])],2)],1),r("el-form-item",{attrs:{label:"动态码",prop:"emailDynacode"}},[r("el-input",{attrs:{placeholder:"请输入动态码"},model:{value:e.emailForm.emailDynacode,callback:function(t){e.$set(e.emailForm,"emailDynacode",t)},expression:"emailForm.emailDynacode"}},[r("template",{slot:"append"},[r("el-button",{attrs:{type:"primary"},on:{click:e.getEmailCode}},[e._v(e._s(e.emailForm.emailCodeText))])],1)],2)],1)],1)],1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary"},on:{click:e.bindEmail}},[e._v("保存")]),r("el-button",{on:{click:function(t){e.type="all"}}},[e._v("取消")])],1)]):e._e(),"tell"==e.type?r("div",{staticClass:"edit"},[r("div",{staticClass:"title"},[e._v("绑定手机号")]),r("div",{staticClass:"pass-form"},[r("el-form",{ref:"tellRef",attrs:{model:e.tellForm,rules:e.tellRules,"label-width":"100px"}},[e.tellForm.currTell?r("el-form-item",{attrs:{label:"当前手机号",prop:"email"}},[r("p",[e._v(e._s(e.tellForm.currTell))])]):e._e(),r("el-form-item",{attrs:{label:"手机号",prop:"tell"}},[r("el-input",{attrs:{type:"tell",placeholder:"请输入手机号"},model:{value:e.tellForm.tell,callback:function(t){e.$set(e.tellForm,"tell",t)},expression:"tellForm.tell"}})],1),r("el-form-item",{attrs:{label:"验证码",prop:"code"}},[r("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"4"},model:{value:e.tellForm.code,callback:function(t){e.$set(e.tellForm,"code",t)},expression:"tellForm.code"}},[r("template",{slot:"append"},[r("img",{staticClass:"captcha",attrs:{src:e.captcha.img,mode:""},on:{click:e.getcaptcha}})])],2)],1),r("el-form-item",{attrs:{label:"动态码",prop:"tellDynacode"}},[r("el-input",{attrs:{placeholder:"请输入动态码"},model:{value:e.tellForm.tellDynacode,callback:function(t){e.$set(e.tellForm,"tellDynacode",t)},expression:"tellForm.tellDynacode"}},[r("template",{slot:"append"},[r("el-button",{attrs:{type:"primary"},on:{click:e.gettellCode}},[e._v(e._s(e.tellForm.tellCodeText))])],1)],2)],1)],1)],1),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary"},on:{click:e.bindtell}},[e._v("保存")]),r("el-button",{on:{click:function(t){e.type="all"}}},[e._v("取消")])],1)]):e._e(),"payPassWord"==e.type?r("div",{staticClass:"edit-pay"},[r("div",{staticClass:"title"},[e._v("绑定支付密码")]),r("div",{staticClass:"container"},[0!=e.step?r("div",{staticClass:"name"},[e._v("请输入6位支付密码,建议不要使用重复或连续数字")]):e.isSend?r("div",{staticClass:"name"},[e._v("验证码已发送至"+e._s(e._f("mobile")(e.tellForm.currTell)))]):e._e(),r("div",{staticClass:"password-wrap"},[0==e.step?r("el-input",{ref:"input",attrs:{maxlength:0==e.step?4:6,"auto-focus":!0,placeholder:e.palceText},on:{change:e.input},model:{value:e.payInput,callback:function(t){e.payInput=t},expression:"payInput"}}):r("el-input",{ref:"input",attrs:{maxlength:0==e.step?4:6,"auto-focus":!0,type:"password",placeholder:e.palceText},on:{change:e.input},model:{value:e.payInput,callback:function(t){e.payInput=t},expression:"payInput"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:0==e.step,expression:"step == 0"}],staticClass:"dynacode",on:{click:e.sendMobileCode}},[e._v(e._s(e.payCodeText))])],1)]),r("div",{staticClass:"btn"},[r("el-button",{attrs:{type:"primary",disabled:e.isClick},on:{click:e.bindPayPwd}},[e._v("保存")]),r("el-button",{on:{click:function(t){e.type="all"}}},[e._v("取消")])],1)]):e._e()])])},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"item-content"},[r("i",{staticClass:"iconfont iconxiugaidenglumima"}),r("div",{staticClass:"name-wrap"},[r("div",{staticClass:"name"},[e._v("登录密码")]),r("div",{staticClass:"content"},[e._v("互联网账号存在被盗风险,建议您定期更改密码以保护账户安全")])])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"item-content"},[r("i",{staticClass:"iconfont iconshoujiyanzheng"}),r("div",{staticClass:"name-wrap"},[r("div",{staticClass:"name"},[e._v("手机验证")]),r("div",{staticClass:"content"},[e._v("验证后,可用于快速找回登录密码及支付密码,接收账户余额变动提醒")])])])}],n=(r("6a22"),r("80cf"),r("6a61"),r("2e91")),o=r("2a50"),i=r("1f77"),l=r("37cb"),c={name:"security",components:{},data:function(){var e=this,t=function(t,r,a){""===r?a(new Error("请输入新密码")):r==e.passWordForm.oldPass?a(new Error("新密码不能与原密码相同!")):(""!==e.passWordForm.checkPass&&e.$refs.passWordRef.validateField("checkPass"),a())},r=function(t,r,a){""===r?a(new Error("请再次输入密码")):r!==e.passWordForm.pass?a(new Error("两次输入密码不一致!")):a()},a=function(t,r,a){""===r?a(new Error("请输入新密码")):r==e.tellPassForm.oldPass?a(new Error("新密码不能与原密码相同!")):(""!==e.tellPassForm.checkPass&&e.$refs.tellPassRef.validateField("checkPass"),a())},s=function(t,r,a){""===r?a(new Error("请再次输入密码")):r!==e.tellPassForm.pass?a(new Error("两次输入密码不一致!")):a()},n=function(e,t,r){var a=/^\w+@\w+(\.\w+)+$/;if(a.test(t))return r();r(new Error("请输入正确的的邮箱"))},o=function(e,t,r){var a=/^1[3|4|5|6|7|8|9][0-9]{9}$/;if(a.test(t))return r();r(new Error("请输入正确的手机号"))};return{type:"all",passWordForm:{oldPass:"",pass:"",checkPass:""},emailForm:{email:"",code:"",emailDynacode:"",emailCodeText:"",key:"",currEmail:""},passWordRules:{oldPass:[{required:!0,message:"请输入原密码",trigger:"blur"}],pass:[{required:!0,validator:t,trigger:"blur"}],checkPass:[{required:!0,validator:r,trigger:"blur"}]},emailRules:{email:[{required:!0,message:"请输入正确的邮箱",trigger:"blur"},{validator:n,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],emailDynacode:[{required:!0,message:"请输入动态验证码",trigger:"blur"}]},captcha:{id:"",img:""},seconds:120,timer:null,isSend:!1,isMobileSend:!1,tellForm:{tell:"",code:"",tellDynacode:"",tellCodeText:"",key:"",currTell:""},tellRules:{tell:[{required:!0,message:"请输入正确的手机号",trigger:"blur"},{validator:o,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}],tellDynacode:[{required:!0,message:"请输入动态验证码",trigger:"blur"}]},isClick:!0,payCodeText:"获取验证码",step:0,payCode:"",payPassword:"",payRepassword:"",payKey:"",payInput:"",palceText:"输入短信验证码",memberInfo:{},tellPassForm:{code:"",tellPassCodeText:"",key:"",tellPassDynacode:"",pass:"",checkPass:""},tellPassRules:{code:[{required:!0,message:"请输入验证码",trigger:"blur"}],tellPassDynacode:[{required:!0,message:"请输入动态验证码",trigger:"blur"}],pass:[{required:!0,validator:a,trigger:"blur"}],checkPass:[{required:!0,validator:s,trigger:"blur"}]},loading:!0,yes:!0}},created:function(){this.getcaptcha(),this.seconds=120,this.tellForm.tellCodeText="获取动态码",this.emailForm.emailCodeText="获取动态码",this.tellPassForm.tellPassCodeText="获取动态码",this.isSend=!1,this.isMobileSend=!1,clearInterval(this.timer),this.getInfo()},mounted:function(){var e=this;setTimeout((function(){e.yes=!1}),300)},methods:{getInfo:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["b"])().then((function(t){0==t.code&&(e.memberInfo=t.data,e.emailForm.currEmail=t.data.email,e.tellForm.currTell=t.data.mobile),e.loading=!1})).catch((function(t){e.loading=!1,e.$message.error(t.message)}));case 2:case"end":return t.stop()}}),t)})))()},edit:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,t.getInfo();case 2:"payPassWord"==e?t.tellForm.currTell?t.type=e:t.$confirm("你还未绑定手机号,请先绑定手机号?","提示信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(e){"confirm"?t.type="tell":t.type="all"})):t.type=e;case 3:case"end":return r.stop()}}),r)})))()},getcaptcha:function(){var e=this;Object(l["b"])({captcha_id:this.captcha.id}).then((function(t){t.code>=0&&(e.captcha=t.data,e.captcha.img=e.captcha.img.replace(/\r\n/g,""))})).catch((function(t){e.$message.error(t.message)}))},save:function(){var e=this;this.$refs.passWordRef.validate((function(t){if(!t)return!1;Object(o["d"])({new_password:e.passWordForm.pass,old_password:e.passWordForm.oldPass}).then((function(t){e.$message({message:"修改密码成功",type:"success"}),e.type="all",e.$store.dispatch("member/member_detail",{refresh:1}),e.passWordForm.pass="",e.passWordForm.oldPass="",e.passWordForm.checkPass=""})).catch((function(t){e.$message.error(t.message)}))}))},getCheckEmail:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["a"])({email:e.emailForm.email}).then((function(t){return 0==t.code||(e.$message({message:t.message,type:"success"}),!1)})).catch((function(t){e.$message.error(t.message)}));case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})))()},bindEmail:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.emailRef.validate((function(t){if(!t)return!1;Object(o["b"])({email:e.emailForm.email,captcha_id:e.captcha.id,captcha_code:e.emailForm.code,code:e.emailForm.emailDynacode,key:e.emailForm.key}).then((function(t){0==t.code&&(e.$message({message:"邮箱绑定成功",type:"success"}),e.type="all",e.emailForm.email="",e.emailForm.code="",e.emailForm.emailDynacode="",clearInterval(e.timer),e.getcaptcha())})).catch((function(t){e.getcaptcha(),e.$message.error(t.message)}))}));case 1:case"end":return t.stop()}}),t)})))()},gettellCode:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.isMobileSend){t.next=6;break}return e.isMobileSend=!0,t.next=4,Object(o["h"])({mobile:e.tellForm.tell,captcha_id:e.captcha.id,captcha_code:e.tellForm.code}).then((function(t){var r=t.data;r.key?(120==e.seconds&&null==e.timer&&(e.timer=setInterval((function(){e.seconds--,e.tellForm.tellCodeText="已发送("+e.seconds+"s)"}),1e3)),e.tellForm.key=r.key):(e.$message({message:t.message,type:"warning"}),e.isMobileSend=!1)})).catch((function(t){e.getcaptcha(),e.$message.error(t.message),"当前手机号已存在"==t.message&&(e.isMobileSend=!1)}));case 4:t.next=7;break;case 6:e.$message({message:"请勿重复点击",type:"warning"});case 7:case"end":return t.stop()}}),t)})))()},bindtell:function(){var e=this;this.$refs.tellRef.validate((function(t){if(!t)return!1;Object(o["g"])({mobile:e.tellForm.tell,captcha_id:e.captcha.id,captcha_code:e.tellForm.code,code:e.tellForm.tellDynacode,key:e.tellForm.key}).then((function(t){0==t.code&&(e.$message({message:"手机号绑定成功",type:"success"}),e.type="all",e.tellForm.email="",e.tellForm.code="",e.tellForm.emailDynacode="",clearInterval(e.timer),e.getcaptcha())})).catch((function(t){e.getcaptcha(),e.$message.error(t.message)}))}))},input:function(e){this.isClick=!1,0==this.step&&4==e.length?this.payCode=e:1==this.step&&6==e.length?this.payPassword=e:6==e.length&&(this.payRepassword=e)},sendMobileCode:function(){var e=this;this.isSend||Object(o["e"])().then((function(t){var r=t.data;r.key?(120==e.seconds&&null==e.timer&&(e.timer=setInterval((function(){e.seconds--,e.payCodeText="已发送("+e.seconds+"s)"}),1e3)),e.payKey=r.key):(e.$message({message:t.message,type:"warning"}),e.isSend=!1)})).catch((function(t){e.$message.error(t.message)}))},bindPayPwd:function(){var e=this;clearInterval(this.timer);var t=/^[0-9]*$/;if(0==this.step)Object(o["i"])({code:this.payCode,key:this.payKey}).then((function(t){0==t.code&&(e.$refs.input.clear(),e.step=1,e.palceText="请设置支付密码")})).catch((function(t){e.$message.error(t.message)}));else if(1==this.step)t.test(this.$refs.input.value)?(this.$refs.input.clear(),this.step=2,this.palceText="请再次输入"):(this.$message.error("请输入数字"),this.step=1,this.$refs.input.clear());else if(this.payPassword==this.payRepassword){if(this.isSub)return;this.isSub=!0,Object(o["c"])({key:this.payKey,code:this.payCode,password:this.payPassword}).then((function(t){t.code>=0&&(e.$message({message:"修改支付密码成功",type:"success"}),e.type="all",e.step=0,e.$refs.input.clear(),clearInterval(e.timer))})).catch((function(t){e.$message.error(t.message)}))}else this.$message.error("两次密码输入不一样"),this.initInfo()},initInfo:function(){this.step=1,this.palceText="请设置支付密码",this.password="",this.repassword="",this.oldpassword="",this.isSub=!1,this.$refs.input.clear()},getTellPassCode:function(){var e=this;this.isSend?this.$message({message:"请勿重复点击",type:"warning"}):(this.isSend=!0,Object(o["f"])({captcha_id:this.captcha.id,captcha_code:this.tellPassForm.code}).then((function(t){var r=t.data;r.key?(120==e.seconds&&null==e.timer&&(e.timer=setInterval((function(){e.seconds--,e.tellPassForm.tellPassCodeText="已发送("+e.seconds+"s)"}),1e3)),e.tellPassForm.key=r.key):(e.$message({message:t.message,type:"warning"}),e.isSend=!1)})).catch((function(t){e.getcaptcha(),e.$message.error(t.message)})))},tellPassSave:function(){var e=this;this.$refs.tellPassRef.validate((function(t){if(!t)return!1;Object(o["d"])({new_password:e.tellPassForm.pass,code:e.tellPassForm.tellPassDynacode,key:e.tellPassForm.key}).then((function(t){e.$message({message:"修改密码成功",type:"success"}),e.type="all",e.$store.dispatch("member/member_detail",{refresh:1}),e.tellPassForm.pass="",e.tellPassForm.checkPass="",e.tellPassForm.key="",e.tellPassForm.tellPassDynacode=""})).catch((function(t){e.$message.error(t.message)}))}))}},filters:{mobile:function(e){return e.substring(0,3)+"****"+e.substring(7)}}},u={name:"security",mixins:[c]},m=u,p=(r("29a7"),r("5d22")),d=Object(p["a"])(m,a,s,!1,null,"358b7ec2",null);t["default"]=d.exports}}]);
- //# sourceMappingURL=chunk-60eb7f90.2daa32df.js.map
|