You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jiaojiu/dist/js/chunk-c4d7d0ba.e7835a2a.js

2 lines
4.9 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c4d7d0ba"],{"9fd4":function(e,r,t){},dd1f:function(e,r,t){"use strict";t.r(r);var s=function(){var e=this,r=e.$createElement,s=e._self._c||r;return s("div",{staticClass:"login_container"},[s("div",{staticClass:"top"},[s("div",{staticClass:"back",on:{click:e.backClick}},[s("img",{attrs:{src:t("5aa0"),alt:""}})]),s("span",[e._v("找回密码")]),e._m(0)]),s("div",{staticClass:"login_box"},[s("el-form",{ref:"verifyFormRef",staticClass:"login_form",attrs:{"label-width":"0px",model:e.verifyForm,rules:e.verifyFormRules}},[s("el-form-item",{attrs:{prop:"iphone"}},[s("el-input",{ref:"iphoneFormRef",attrs:{placeholder:"请输入手机号","prefix-icon":"el-icon-phone"},model:{value:e.verifyForm.iphone,callback:function(r){e.$set(e.verifyForm,"iphone",r)},expression:"verifyForm.iphone"}})],1),s("el-form-item",{staticClass:"verify",attrs:{prop:"code"}},[s("el-input",{staticClass:"verifyMessage",attrs:{placeholder:"请输入验证码","prefix-icon":"el-icon-s-goods"},model:{value:e.verifyForm.code,callback:function(r){e.$set(e.verifyForm,"code",r)},expression:"verifyForm.code"}}),s("el-button",{staticClass:"getVerify",on:{click:e.emitsmsverify}},[e._v("验证码")])],1),s("el-form-item",{attrs:{prop:"password"}},[s("el-input",{attrs:{placeholder:"请输入新的密码","prefix-icon":"el-icon-s-goods"},model:{value:e.verifyForm.password,callback:function(r){e.$set(e.verifyForm,"password",r)},expression:"verifyForm.password"}})],1),s("el-form-item",[s("el-row",[s("el-button",{staticClass:"btns-login",attrs:{type:"primary"},on:{click:e.login}},[e._v("修改")])],1)],1)],1)],1)])},n=[function(){var e=this,r=e.$createElement,s=e._self._c||r;return s("div",[s("img",{staticClass:"logo",attrs:{src:t("8138"),alt:""}}),s("div",{staticClass:"icon"},[e._v("交 酒")])])}],i=(t("d3b7"),t("3ca3"),t("ddb0"),t("2b3d"),t("96cf"),t("1da1")),o={name:"Iphone",components:{},data:function(){var e=this,r=function(r,t,s){""===t?s(new Error("请输入手机号")):e.isCellPhone(t)?s():s(new Error("请输入正确的手机号!"))};return{verifyForm:{iphone:"",code:"",password:""},verifyFormRules:{iphone:[{required:!0,message:"请输入电话号码",trigger:"blur"},{validator:r,trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:6,max:6,message:"验证码为6位",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:16,message:"长度在 6 到 16 个字符",trigger:"blur"}]}}},methods:{emitsmsverify:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:e.$refs.verifyFormRef.validateField("iphone",function(){var r=Object(i["a"])(regeneratorRuntime.mark((function r(t){var s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(!t){r.next=2;break}return r.abrupt("return");case 2:return e.emitsms(),s=new URLSearchParams,s.append("iphone",e.verifyForm.iphone),r.prev=5,r.next=8,e.$http({method:"post",url:"/sms/get",data:s});case 8:e.$message.success("发送成功"),r.next=14;break;case 11:r.prev=11,r.t0=r["catch"](5);case 14:case"end":return r.stop()}}),r,null,[[5,11]])})));return function(e){return r.apply(this,arguments)}}());case 1:case"end":return r.stop()}}),r)})))()},emitsms:function(){var e,r=document.getElementsByClassName("getVerify")[0];r.setAttribute("disabled",!0);var t=window.sessionStorage.getItem("time");e=0==t||null==t?60:t;var s=setInterval((function(){e>=0?(r.style.color="#606266",r.style.borderColor="#DCDFE6",r.style.backgroundColor="#FFF",r.innerHTML=e--+"秒",window.sessionStorage.setItem("time",e+1)):(clearInterval(s),r.disabled=!1,r.style.color="#fff",r.style.borderColor="#df3832",r.style.backgroundColor="#df3832",r.innerHTML="验证码")}),1e3)},isCellPhone:function(e){return!!/^1(3|4|5|6|7|8|9)\d{9}$/.test(e)},backClick:function(){this.$router.push("/login")},login:function(){var e=this;this.$refs.verifyFormRef.validate(function(){var r=Object(i["a"])(regeneratorRuntime.mark((function r(t){var s,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return");case 2:return r.prev=2,r.next=5,e.$http.post("/sms/findpassword",e.verifyForm);case 5:s=r.sent,n=s.data,e.$message.success(n.msg),e.$refs.verifyFormRef.resetFields(),r.next=14;break;case 11:r.prev=11,r.t0=r["catch"](2),e.$message.error("修改失败");case 14:case"end":return r.stop()}}),r,null,[[2,11]])})));return function(e){return r.apply(this,arguments)}}())}},mounted:function(){var e=this;window.onresize=function(){return function(){e.showHeight=document.body.clientHeight}()};var r=window.sessionStorage.getItem("time");0==r||null==r||this.emitsms()}},a=o,c=(t("e744"),t("2877")),l=Object(c["a"])(a,s,n,!1,null,"ec361194",null);r["default"]=l.exports},e744:function(e,r,t){"use strict";var s=t("9fd4"),n=t.n(s);n.a}}]);
//# sourceMappingURL=chunk-c4d7d0ba.e7835a2a.js.map