chunk-7b1f2dbe.6b2c9f42.js 7.0 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7b1f2dbe"],{"1b69":function(e,r,t){"use strict";var n=t("1da1"),o=(t("96cf"),t("d3b7"),t("a18c"),t("5daa")),a=t("5f87"),s={};window.ajaxTimeout=2e4,r.a=Object(n.a)(regeneratorRuntime.mark((function e(){var r,t,i,c,u,l,d,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=0<p.length&&void 0!==p[0]?p[0]:"",t=1<p.length&&void 0!==p[1]?p[1]:{},c=3<p.length&&void 0!==p[3]?p[3]:{},u=4<p.length&&void 0!==p[4]?p[4]:s,l=5<p.length?p[5]:void 0,i=(i=2<p.length&&void 0!==p[2]?p[2]:"GET").toLowerCase(),d={method:i,baseURL:"",url:o.a.baseURL+r,data:t,params:c,processData:!0,timeout:window.ajaxTimeout,headers:u,onUploadProgress:l},l&&"function"==typeof l&&(d.onUploadProgress=l),axios.interceptors.request.use((function(e){return e.data.token||(e.data.token=Object(a.d)()),e}),(function(e){return Promise.reject(new Error("服务器异常,请联系管理员!"))})),axios.interceptors.response.use(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 200===r.status&&100<=(t=r.data.code)&&t<=104&&(Object(a.g)(),Object(a.f)(),Object(a.e)()),e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),(function(e){return Promise.reject(e.response.data)})),e.abrupt("return",new Promise((function(e,r){axios(d).then((function(r){e(r.data)})).catch((function(e){e.response&&e.response.data?r(e.response.data):r(e)}))})));case 13:case"end":return e.stop()}}),e)})))},"3d88":function(e,r,t){},"62f7":function(e,r,t){"use strict";t("c571")},"6a1e":function(e,r,t){"use strict";var n=t("1b69");r.a={verfiy:function(e,r){return Object(n.a)("Api/verify_code",e,"post",r)},resetpwd:function(e,r){return Object(n.a)("Api/passmobile",e,"post",r)},resetmobile:function(e,r){return Object(n.a)("Api/resetmobile",e,"post",r)},setpwd:function(e,r){return Object(n.a)("Api/passsave",e,"post",r)},list:function(e,r){return Object(n.a)("admin/menu",e,"post",r)},detail:function(e,r){return Object(n.a)("Admin/userinfo",e,"post",r)},version:function(e,r){return Object(n.a)("Admin/lastversion",e,"post",r)},prefect:function(e,r){return Object(n.a)("Api/prefect",e,"post",r)}}},"85db":function(e,r,t){"use strict";t("3d88")},"9f53":function(e,r,t){"use strict";var n=t("1da1");t("96cf"),r.a={methods:{logout:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("/login"!==e.$route.path)return r.next=7,e.$store.dispatch("user/logout");r.next=8;break;case 7:e.$router.push("/login");case 8:case"end":return r.stop()}}),r)})))()}}}},a9ad:function(e,r,t){"use strict";t.r(r);var n=t("1da1"),o=(t("96cf"),t("61f7")),a=t("6a1e"),s={name:"Login",mixins:[t("9f53").a],data:function(){var e=this;return{loginForm:{oldPassword:"",newPassword:"",confirmPassword:""},loginRules:{oldPassword:[{required:!0,trigger:"blur",validator:function(e,r,t){""===r?t(new Error("旧密码不能为空!")):!Object(o.b)(r)||r.length<6||18<r.length?t(new Error("旧密码为6-18位数字字母组合!")):Object(o.j)(r)?t(new Error("旧密码不能为纯数字!")):Object(o.l)(r)?t(new Error("旧密码不能为纯字母!")):t()}}],newPassword:[{required:!0,trigger:"blur",validator:function(r,t,n){""===t?n(new Error("新密码不能为空!")):e.loginForm.oldPassword===t?n(new Error("新密码不能与旧密码一致!")):!Object(o.b)(t)||t.length<6||18<t.length?n(new Error("新密码为6-18位数字字母组合!")):Object(o.j)(t)?n(new Error("新密码不能为纯数字!")):Object(o.l)(t)?n(new Error("新密码不能为纯字母!")):n()}}],confirmPassword:[{required:!0,trigger:"blur",validator:function(r,t,n){""===t?n(new Error("确认密码不能为空!")):e.loginForm.newPassword!==t?n(new Error("确认密码与新密码不一致!")):n()}}]},loading:!1,otherQuery:{}}},methods:{handleLogin:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.$refs.loginForm.validate(function(){var r=Object(n.a)(regeneratorRuntime.mark((function r(t){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t){r.next=4;break}e.loading||(e.loading=!0,o={oldpwd:e.loginForm.oldPassword,newpwd:e.loginForm.newPassword},a.a.setpwd(o).then(function(){var r=Object(n.a)(regeneratorRuntime.mark((function r(t){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t&&0===t.code)return e.loading=!1,e.$message.success(t.message),r.next=5,e.logout();r.next=7;break;case 5:r.next=14;break;case 7:if(t&&100<=t.code&&t.code<=104)return r.next=10,e.logout();r.next=12;break;case 10:r.next=14;break;case 12:e.$message.warning(t.message),e.loading=!1;case 14:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())),r.next=6;break;case 4:return r.abrupt("return",!1);case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}());case 1:case"end":return r.stop()}}),r)})))()}}};t("62f7"),t("85db"),t=t("2877"),s=Object(t.a)(s,(function(){var e=this,r=e.$createElement;r=e._self._c||r;return r("div",{staticClass:"change-password pagePadding"},[r("div",{staticClass:"change"},[r("div",{staticClass:"title"},[e._v(" 设置新登录密码 "),r("el-popover",{attrs:{placement:"top",title:"初始密码:",width:"200",trigger:"click",content:"dingding123"}},[r("i",{staticClass:"el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),r("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,autocomplete:"on","label-position":"right","label-width":"100px"}},[r("el-form-item",{attrs:{prop:"oldPassword",label:"旧密码:"}},[r("el-input",{ref:"oldPassword",attrs:{placeholder:"旧密码",name:"oldPassword",type:"password",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.oldPassword,callback:function(r){e.$set(e.loginForm,"oldPassword",r)},expression:"loginForm.oldPassword"}})],1),r("el-form-item",{attrs:{prop:"newPassword",label:"新密码:"}},[r("el-input",{ref:"newPassword",attrs:{placeholder:"新密码",name:"newPassword",type:"password",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.newPassword,callback:function(r){e.$set(e.loginForm,"newPassword",r)},expression:"loginForm.newPassword"}})],1),r("el-form-item",{attrs:{prop:"confirmPassword",label:"确认密码:"}},[r("el-input",{ref:"confirmPassword",attrs:{placeholder:"确认密码",name:"confirmPassword",type:"password",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.confirmPassword,callback:function(r){e.$set(e.loginForm,"confirmPassword",r)},expression:"loginForm.confirmPassword"}})],1),r("el-button",{staticStyle:{width:"98%",margin:"15px 0 0 5%"},attrs:{loading:e.loading,type:"primary",round:""},nativeOn:{click:function(r){return r.preventDefault(),e.handleLogin(r)}}},[e._v("确认修改")])],1)],1)])}),[],!1,null,"47333433",null);r.default=s.exports},c571:function(e,r,t){}}]);