193.3d19e98074d4a5a99dd2.js 4.0 KB

1
  1. webpackJsonp([193],{"1znn":function(e,t){},"fRV+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("l9V+"),i=n("TIfe"),s={name:"change_pwd",filters:{mobile:function(e){return e?""==e?e:e.replace(e.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(e,t){""!=e.username&&""!=e.code?this.next_btn_enable=!0:this.next_btn_enable=!1,this.checkMobile(e.username)?(this.mobile_error="",this.mobile_success="success"):(this.mobile_error="手机号格式错误",this.mobile_success=""),""!=e.password&&""!=e.password_check?this.complite_btn_enable=!0:this.complite_btn_enable=!1},deep:!0}},methods:{nextReg:function(){var e=this;this.next_loading=!0;var t={tel:this.account_info.tel,verify:this.formData.origin_verify};Object(o.a)("post","/api/destruction",{data:Object(i.v)(t)},"v2").then(function(t){1==t.data.code&&(e.$toast("注销成功"),setTimeout(function(){e.$toast.clear(),e.nologin()},500))}).finally(function(){e.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")),localStorage.removeItem("refreshTime"),this.$store.dispatch("setBuyPopup",!1),this.$store.dispatch("clear_cache"),this.$router.replace({name:"login"})},countDownInit:function(){var e=this;if(this.sendMsgText="已发送("+this.countdown+")",0==this.countdown)return this.countdown=90,this.sendMsgText="重新发送",this.sended=!1,!1;this.countdownSet=setTimeout(function(){e.countdown--,e.countDownInit()},1e3)},checkMobile:function(e){return!!/^1[0123456789]\d{9}$/.test(e)},sendMsg:function(){var e=this;this.sendMsgLoading=!0;var t={mobile:this.account_info.tel,type:7};if(!this.verifyPhoneNo(t.mobile))return this.$notify({message:"请输入正确手机号码",duration:1e3,background:"#f44"}),this.sendMsgLoading=!1,!1;Object(o.a)("post","/api/send-sms",{data:Object(i.v)(t)},"v2").then(function(t){1==t.data.code?(e.sended=!0,e.countDownInit(),e.$toast("已经发送,请注意查收!")):e.$toast(t.data.msg)}).finally(function(){e.sendMsgLoading=!1})},verifyPhoneNo:function(e){return/^1[1023456789]\d{9}$/.test(e)}}},a={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"login-box-parent"},[n("van-nav-bar",{attrs:{title:"输入验证码完成注销","left-text":"返回","left-arrow":""},on:{"click-left":e.$route_back}}),e._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:""!=e.account_info.tel,expression:"account_info.tel != ''"}],attrs:{title:"手机号"}},[e._v(e._s(e._f("mobile")(e.account_info.tel)))]),e._v(" "),n("van-field",{attrs:{center:"",clearable:"",label:"验证码",placeholder:"请输入短信验证码"},model:{value:e.formData.origin_verify,callback:function(t){e.$set(e.formData,"origin_verify",t)},expression:"formData.origin_verify"}},[n("van-button",{staticStyle:{border:"none","font-size":"0.28rem"},attrs:{slot:"button",loading:e.sendMsgLoading,size:"small",plain:"",type:"info",disabled:e.sended},on:{click:e.sendMsg},slot:"button"},[e._v("\n "+e._s(e.sendMsgText)+"\n ")])],1)],1)],1),e._v(" "),n("div",{staticStyle:{padding:"0 0.32rem 0.2rem"}},[n("van-button",{attrs:{loading:e.reg_loading,size:"large",type:"info"},on:{click:e.nextReg}},[e._v("确定")])],1)])])],1)],1)},staticRenderFns:[]};var r=n("VU/8")(s,a,!1,function(e){n("1znn")},"data-v-14fb3be6",null);t.default=r.exports}});