191.a88176192c02c926ab6d.1706754571694+.js 3.9 KB

1
  1. webpackJsonp([191],{C3xr:function(t,e){},knNe:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("TIfe"),i={name:"change_pwd",filters:{mobile:function(t){return t?""==t?t:t.replace(t.substring(3,7),"****"):""}},data:function(){return{countdownSet:null,next_loading:!1,reg_loading:!1,mobile_error:"",mobile_success:"",complite_btn_enable:!1,login_error:!1,login_error_msg:"",next_btn_enable:!1,userinfo:this.$userInfo(),account_info:this.$store.getters.account_info,setp:1,countdown:90,sended:!1,sendMsgText:"获取验证码",sendMsgLoading:!1,formData:{verify:"",origin_verify:"",tel:""}}},watch:{formData:{handler:function(t,e){""!=t.username&&""!=t.code?this.next_btn_enable=!0:this.next_btn_enable=!1,this.checkMobile(t.username)?(this.mobile_error="",this.mobile_success="success"):(this.mobile_error="手机号格式错误",this.mobile_success=""),""!=t.password&&""!=t.password_check?this.complite_btn_enable=!0:this.complite_btn_enable=!1},deep:!0}},methods:{nextReg:function(){var t=this;this.next_loading=!0;var e={tel:this.account_info.tel,verify:this.formData.origin_verify};this.$axios("post","/api/pro/destruction",{data:Object(o.s)(e)},"v2").then(function(e){1==e.data.code&&(t.$toast("注销成功"),setTimeout(function(){t.$toast.clear(),t.nologin()},500))}).finally(function(){t.next_loading=!1})},nologin:function(){window.plus?(plus.storage.removeItem("Admin-Token"),plus.storage.removeItem("a-token-temp")):(localStorage.removeItem("a-token-temp"),localStorage.removeItem("Admin-Token")),this.$store.dispatch("clear_cache"),this.$router.replace({name:"login"})},countDownInit:function(){var t=this;if(this.sendMsgText="已发送("+this.countdown+")",0==this.countdown)return this.countdown=90,this.sendMsgText="重新发送",this.sended=!1,!1;this.countdownSet=setTimeout(function(){t.countdown--,t.countDownInit()},1e3)},checkMobile:function(t){return!!/^1[0123456789]\d{9}$/.test(t)},sendMsg:function(){var t=this;this.sendMsgLoading=!0;var e={mobile:this.account_info.tel,type:7};if(!this.verifyPhoneNo(e.mobile))return this.$notify({message:"请输入正确手机号码",duration:1e3,background:"#f44"}),this.sendMsgLoading=!1,!1;this.$axios("post","/api/pro/send-sms",{data:Object(o.s)(e)},"v2").then(function(e){1==e.data.code?(t.sended=!0,t.countDownInit(),t.$toast("已经发送,请注意查收!")):t.$toast(e.data.msg)}).finally(function(){t.sendMsgLoading=!1})},verifyPhoneNo:function(t){return/^1[1023456789]\d{9}$/.test(t)}}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"login-box-parent"},[n("van-nav-bar",{attrs:{title:"输入验证码完成注销","left-text":"返回","left-arrow":""},on:{"click-left":t.$route_back}}),t._v(" "),n("div",{staticClass:"login-box",staticStyle:{"background-color":"#f5f5f5"}},[n("scroller",[n("div",{staticClass:"login-form-box",staticStyle:{"background-color":"#fff"}},[n("div",{staticClass:"setp1"},[n("van-cell-group",[n("van-cell",{directives:[{name:"show",rawName:"v-show",value:""!=t.account_info.tel,expression:"account_info.tel != ''"}],attrs:{title:"手机号"}},[t._v(t._s(t._f("mobile")(t.account_info.tel)))]),t._v(" "),n("van-field",{attrs:{center:"",clearable:"",label:"验证码",placeholder:"请输入短信验证码"},model:{value:t.formData.origin_verify,callback:function(e){t.$set(t.formData,"origin_verify",e)},expression:"formData.origin_verify"}},[n("van-button",{staticStyle:{border:"none","font-size":"0.28rem"},attrs:{slot:"button",loading:t.sendMsgLoading,size:"small",plain:"",type:"info",disabled:t.sended},on:{click:t.sendMsg},slot:"button"},[t._v("\n "+t._s(t.sendMsgText)+"\n ")])],1)],1)],1),t._v(" "),n("div",{staticStyle:{padding:"0 0.32rem 0.2rem"}},[n("van-button",{attrs:{loading:t.reg_loading,size:"large",type:"info"},on:{click:t.nextReg}},[t._v("确定")])],1)])])],1)],1)},staticRenderFns:[]};var a=n("VU/8")(i,s,!1,function(t){n("C3xr")},"data-v-09178bde",null);e.default=a.exports}});