chunk-27491dc0.7fd5aab5.js 4.8 KB

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