| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-55e0"],{IMFv:function(t,e,s){"use strict";s.r(e);var o=s("gDS+"),r=s.n(o),a=s("XJYT"),i={name:"Forget",components:{},data:function(){var t=this;return{site:{},active:1,logo:"",name:"",form:{mobile:"",code:"",password:"",re_password:"",captcha:""},rules:{mobile:[{required:!0,trigger:"blur",message:"请输入手机号"}],code:[{required:!0,trigger:"blur",message:"请输入验证码"}],password:[{required:!0,trigger:"blur",message:"请输入密码"}],re_password:[{validator:function(e,s,o){""===s?o(new Error("请再次输入密码")):s!==t.form.password?o(new Error("两次输入密码不一致!")):o()},required:!0,trigger:"blur"}],captcha:[{required:!0,trigger:"blur",message:"请输入图形验证码"}]},show:!0,count:"",passwordType:"password",imgcode:""}},watch:{},created:function(){this.getGlobalData(),this.getimgdata()},destroyed:function(){},methods:{getGlobalData:function(){var t=this;$http.get("plugin.business-pc.frontend.setting.index").then(function(e){1===e.result&&(t.site=e.data,t.fun.setTitle(t.$store.getters.globalData.pc_title||""),t.fun.setIcon(t.site.pc_favorite_icon_url),localStorage.setItem("setPublicSetting",r()(t.site)))}).catch(function(t){console.log(t)})},getLoginSite:function(){var t=this;$http.get("/admin/login/site",{}).then(function(e){1===e.result?(t.logo=e.data.site_logo,t.name=e.data.name):a.MessageBox.alert(e.msg)}).catch(function(t){console.log(t)})},getCode:function(){var t=this;this.fun.isMoblie(this.form.mobile)?this.$message.error("请输入正确的手机号码"):$http.post("member.register.sendCodeV2",{mobile:this.form.mobile,captcha:this.form.captcha,reset:"1",sms_type:2}," ").then(function(e){1===e.result?t.getTimer():(t.form.captcha="",t.getimgdata(),a.MessageBox.alert(e.msg))}).catch(function(t){console.log(t)})},next:function(){this.form.code?this.active++:this.$message.error("请输入验证码")},submitForm:function(){var t=this;this.$refs.form.validate(function(e){if(!e)return console.log("error submit!!"),!1;$http.post("member.register.changePassword",{mobile:t.form.mobile,code:t.form.code,password:t.form.password,confirm_password:t.form.re_password,captcha:t.form.captcha},"提交中").then(function(e){1===e.result?(t.$message.success("设置成功"),t.$refs.form.resetFields(),t.active=t.active+1):t.$message.error(e.msg)}).catch(function(e){t.$message.error(response.msg),console.error(e)})})},toLogin:function(){this.$router.push(this.fun.getUrl("login"))},showPwd:function(){"password"===this.passwordType?this.passwordType="":this.passwordType="password"},getTimer:function(){var t=this;this.timer||(this.count=60,this.show=!1,this.timer=setInterval(function(){t.count>0&&t.count<=60?t.count--:(t.show=!0,clearInterval(t.timer),t.timer=null)},1e3))},getimgdata:function(){var t=this;$http.get("home-page.getCaptcha",{}).then(function(e){1===e.result?t.imgcode=e.data.captcha.img:console.log(e.msg)}).catch(function(t){console.log(t)})}}},n=(s("QKb9"),s("KHd+")),l=Object(n.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"forget-container"},[s("div",{staticStyle:{width:"900px",margin:"0 auto"}},[s("div",{staticClass:"head"},[s("el-col",{staticStyle:{width:"36px",height:"36px",overflow:"hidden","margin-right":"10px"},attrs:{xs:8,sm:8,md:4,lg:1}},[s("div",{staticStyle:{width:"36px",height:"36px"}},[s("img",{staticStyle:{width:"100%",height:"100%","margin-left":"9%","border-radius":"50%"},attrs:{src:t.site.pc_logo_url}})])]),t._v(" "),s("el-col",{attrs:{span:15}},[s("div",{staticStyle:{color:"#666","font-size":"24px","font-weight":"900","line-height":"36px"}},[t._v("\n "+t._s(t.site.pc_title)+"\n ")])])],1),t._v(" "),s("el-row",{staticClass:"content_info"},[s("el-col",{staticClass:"login_input",attrs:{span:24}},[1==t.active?s("el-form",{ref:"form",staticClass:"login-form",attrs:{model:t.form,rules:t.rules,"label-position":"top","label-width":"15%"}},[t.imgcode?s("el-form-item",{attrs:{label:"请输入右侧图形验证码",prop:"captcha"}},[s("div",{staticClass:"flex flex-a-c"},[s("div",{staticClass:"imgwrap"},[s("el-input",{staticStyle:{width:"70%"},attrs:{placeholder:"请输入右侧图形验证码"},model:{value:t.form.captcha,callback:function(e){t.$set(t.form,"captcha",e)},expression:"form.captcha"}}),t._v(" "),s("img",{staticClass:"imgCode",attrs:{src:t.imgcode},on:{click:t.getimgdata}})],1)])]):t._e(),t._v(" "),s("el-form-item",{attrs:{label:"请输入绑定的手机号",prop:"mobile"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{placeholder:"请输入绑定的手机号"},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),t._v(" "),s("el-form-item",{attrs:{label:"输入手机短信验证码",prop:"code"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{placeholder:"输入手机短信验证码"},model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}}),t._v(" "),s("el-button",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.preventDefault(),t.getCode(e)}}},[t._v("\n 获取手机验证码\n ")]),t._v(" "),s("el-button",{directives:[{name:"show",rawName:"v-show",value:!t.show,expression:"!show"}],attrs:{type:"primary",disabled:"",size:"small"}},[t._v("\n "+t._s(t.count)+"秒后重新获取\n ")])],1),t._v(" "),s("el-form-item",{attrs:{label:"新密码",prop:"password"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{type:t.passwordType,placeholder:t.$t("login.password")},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),t._v(" "),s("span",{staticClass:"show-pwd",on:{click:t.showPwd}},[s("svg-icon",{attrs:{"icon-class":"password"===t.passwordType?"eye":"eye-open"}})],1)],1),t._v(" "),s("el-form-item",{attrs:{label:"确认新密码",prop:"re_password"}},[s("el-input",{staticStyle:{width:"70%"},attrs:{type:t.passwordType,placeholder:"请再次输入密码"},model:{value:t.form.re_password,callback:function(e){t.$set(t.form,"re_password",e)},expression:"form.re_password"}})],1),t._v(" "),s("el-form-item",{staticStyle:{"margin-left":"25%"}},[s("el-button",{attrs:{type:"primary"},on:{click:function(e){return e.preventDefault(),t.submitForm(e)}}},[t._v("\n 提交修改\n ")])],1)],1):t._e(),t._v(" "),2==t.active?s("div",{staticClass:"complete"},[s("i",{staticClass:"el-icon-success blue"}),s("br"),t._v(" "),s("span",{staticClass:"text"},[t._v("设置密码成功")]),t._v(" "),s("el-button",{attrs:{plain:""},on:{click:t.toLogin}},[t._v("点击返回登录页面")])],1):t._e()],1)],1)],1)])},[],!1,null,"493a421f",null);l.options.__file="index.vue";e.default=l.exports},QKb9:function(t,e,s){"use strict";var o=s("bJzq");s.n(o).a},bJzq:function(t,e,s){}}]);
|