15.fe4519c55266cb2eed62.js 4.2 KB

1
  1. webpackJsonp([15],{gdP7:function(t,s,a){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var e=a("Dd8w"),o=a.n(e),i=a("NYxO"),r=a("mtWM"),n=a.n(r),l={data:function(){return{formData:{mobile:"",code:"",new_pass:""},two_pass:"",codeText:"获取验证码",timer:null,disabled:!1}},methods:{save:function(){var t=this;this.formData.mobile=this.agenInfo.mobile;this.formData.new_pass===this.two_pass?/^[a-zA-Z\d_]{6,}$/.test(this.formData.new_pass)?""!==this.formData.code?n.a.post("/user/edit_pay_password",this.formData).then(function(s){200===s.data.code?(t.formData.code="",t.formData.new_pass="",t.two_pass="",t.codeText="获取验证码",t.disabled=!1,t.timer=null,t.showNotify("失败",s.data.msg,"error")):t.showNotify("失败",s.data.msg,"error")}):this.showNotify("保存失败","失败原因: 验证码不能为空!","error"):this.showNotify("保存失败","失败原因: 新密码长度必须大于等于6个字符!","error"):this.showNotify("保存失败","失败原因: 两次密码输入不一致!","error")},sendCode:function(t){var s=this;if(this.agenInfo.mobile)if(this.formData.new_pass===this.two_pass)if(/^[a-zA-Z\d_]{6,}$/.test(this.formData.new_pass)){n.a.post("/agent/sms/send",{type:4}).then(function(t){console.log(t),200===t.data.code?(s.showNotify("成功",t.data.msg),s.codeText=120,s.disabled=!0,s.timer=setInterval(function(){s.codeText--,s.codeText<=0&&(s.codeText="获取验证码",s.disabled=!1,clearInterval(s.timer))},1e3)):s.showNotify("失败",t.data.msg,"error")})}else this.showNotify("修改失败","失败原因: 新密码长度必须大于等于6个字符!","error");else this.showNotify("修改失败","失败原因: 两次密码输入不一致!","error");else this.showNotify("发送失败","请先绑定手机!","error")}},computed:o()({},Object(i.c)(["agenInfo"]))},c={render:function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"panel"},[a("div",{staticClass:"panel_body"},[a("div",{staticClass:"form"},[a("div",{staticClass:"form_item"},[a("label",{staticClass:"form_label"},[t._v("绑定手机:")]),t._v(" "),t.agenInfo&&t.agenInfo.mobile?a("div",{staticClass:"form_control"},[a("b",{staticClass:"form_text highlight"},[t._v(t._s(t.agenInfo.mobile))])]):a("div",{staticClass:"toreset",staticStyle:{height:"34px"}},[a("router-link",{attrs:{to:{path:"/account/phone"}}},[t._v("您还没有绑定手机,点击前往绑定")])],1)]),t._v(" "),a("div",{staticClass:"form_item"},[a("label",{staticClass:"form_label"},[t._v("支付密码:")]),t._v(" "),a("div",{staticClass:"form_control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.formData.new_pass,expression:"formData.new_pass"}],staticClass:"form_input",attrs:{autocomplete:"off",type:"password",placeholder:"请设置支付密码(6-20位数字和字母的组合)"},domProps:{value:t.formData.new_pass},on:{input:function(s){s.target.composing||t.$set(t.formData,"new_pass",s.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form_item"},[a("label",{staticClass:"form_label"},[t._v("确认密码:")]),t._v(" "),a("div",{staticClass:"form_control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.two_pass,expression:"two_pass"}],staticClass:"form_input",attrs:{autocomplete:"off",type:"password",placeholder:"请再次确认支付密码"},domProps:{value:t.two_pass},on:{input:function(s){s.target.composing||(t.two_pass=s.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form_item"},[a("label",{staticClass:"form_label"},[t._v("验 证 码:")]),t._v(" "),a("div",{staticClass:"form_control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.formData.code,expression:"formData.code"}],staticClass:"form_input small",attrs:{autocomplete:"off",type:"text"},domProps:{value:t.formData.code},on:{input:function(s){s.target.composing||t.$set(t.formData,"code",s.target.value)}}}),t._v(" "),a("el-button",{staticClass:"form_codeBtn",attrs:{disabled:t.disabled},on:{click:function(s){t.sendCode(t.agenInfo.mobile)}}},[t._v(t._s(t.codeText))])],1)]),t._v(" "),a("div",{staticClass:"form_item"},[a("button",{staticClass:"form_submit",on:{click:t.save}},[t._v("保存")])])])])])},staticRenderFns:[]};var m=a("VU/8")(l,c,!1,function(t){a("oVIN")},null,null);s.default=m.exports},oVIN:function(t,s){}});