text: webpackJsonp([12],{"/rEA":function(t,h,C){"use strict";(function(a){var t=C("//Fk"),o=C.n(t),e=C("mvHQ"),n=C.n(e),i=C("OvRC"),r=C.n(i),s=C("mtWM"),l=C.n(s),u=C("mw3O"),d=C.n(u),f=C("bzuE"),c="default",p="sysetem";function m(t,e,n){this.name="ApiError",this.message=t||"Default Message",this.errorType=e||c,this.innerError=n,this.stack=(new Error).stack}(m.prototype=r()(Error.prototype)).constructor=m;var g=l.a.create({baseURL:f.a,timeout:2e4,responseType:"json",withCredentials:!0});g.interceptors.request.use(function(t){return"post"===t.method||"put"===t.method||"patch"===t.method?(t.headers={"Content-Type":"application/json; charset=UTF-8"},t.data=n()(t.data)):"delete"!==t.method&&"get"!==t.method&&"head"!==t.method||(t.paramsSerializer=function(t){return d.a.stringify(t,{arrayFormat:"indices"})}),localStorage.token&&(t.headers.Authorization="Bearer "+localStorage.token),t},function(t){return t}),g.interceptors.response.use(function(t){if(-1===t.headers["content-type"].indexOf("json"))return t;var e=void 0;if("arraybuffer"===t.request.responseType&&"[object ArrayBuffer]"===t.data.toString()){var n=a.from(t.data).toString("utf8");e=JSON.parse(n)}else e=t.data;if(e){if(e.data&&(e.data.token&&(localStorage.token=e.data.token),e.data.refreshToken&&(localStorage.refreshToken=e.data.refreshToken)),e.url)return void(top.location=e.url);if(200!==e.code)return console.log(e),o.a.reject(new m(e.message))}return t},function(t){if(console.log(t.response.headers),401===t.response.status){if(-1!==t.response.headers["content-type"].indexOf("json")&&t.response.data.url)return void(top.location=t.response.data.url);if(t.response.headers["token-expired"]&&localStorage.token&&localStorage.refreshToken){console.log("Refresh Token");var e={token:localStorage.token,refreshToken:localStorage.refreshToken};return localStorage.removeItem("token"),localStorage.removeItem("refreshToken"),g.post("/admin/refreshToken",e),o.a.reject(new m("登录超时，自动登录中......",p,t))}}return o.a.reject(new m(t.message,p,t))}),h.a={install:function(t,e){t.httpClient=g,t.prototype.$httpClient=g}}}).call(h,C("EuP9").Buffer)},"8yQj":function(t,e,n){"use strict";var a={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e.isLoading,expression:"isLoading",modifiers:{fullscreen:!0,lock:!0}}],ref:"mainForm",staticClass:"container",attrs:{model:e.mainForm,rules:e.mainFormRules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"title"},[e._v("系统登录")]),e._v(" "),n("el-form-item",{attrs:{prop:"account"}},[n("el-input",{ref:"account",attrs:{type:"text",autocomplete:"on",placeholder:"账号(用户名、手机号或邮箱)",autofocus:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFocus("password")}},model:{value:e.mainForm.account,callback:function(t){e.$set(e.mainForm,"account","string"==typeof t?t.trim():t)},expression:"mainForm.account"}},[n("font-awesome-icon",{attrs:{slot:"prefix",icon:"user-secret"},slot:"prefix"})],1)],1),e._v(" "),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{ref:"password",attrs:{type:"password",autocomplete:"off",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFocus("validationCode")}},model:{value:e.mainForm.password,callback:function(t){e.$set(e.mainForm,"password","string"==typeof t?t.trim():t)},expression:"mainForm.password"}},[n("font-awesome-icon",{attrs:{slot:"prefix",icon:"key"},slot:"prefix"})],1)],1),e._v(" "),n("el-form-item",{attrs:{prop:"validationCode"}},[n("el-input",{ref:"validationCode",staticClass:"validationCode",attrs:{type:"text",autocomplete:"off",placeholder:"验证码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}},model:{value:e.mainForm.validationCode,callback:function(t){e.$set(e.mainForm,"validationCode","string"==typeof t?t.trim():t)},expression:"mainForm.validationCode"}}),e._v(" "),n("img",{staticClass:"validationCodeImage",attrs:{src:e.refreshValidationCodeUrl},on:{click:e.handleRefreshValidationCode}})],1),e._v(" "),n("el-form-item",{staticStyle:{width:"100%"}},[n("el-button",{staticClass:"login",attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},staticRenderFns:[]};e.a=a},MIXw:function(t,e){},PxPL:function(t,e,n){"use strict";var a=n("bzuE"),o=n("M4fF"),i=n.n(o),r=n("VsUZ"),s=n("NC6I"),l=n.n(s),u=n("3UNf");e.a={data:function(){return{isLoading:!1,refreshValidationCodeUrlBase:a.a+"/Admin/GetValidationCode",refreshValidationCodeUrl:null,mainForm:{account:a.b,password:a.c,validationCode:""},mainFormRules:{account:[{required:!0,message:"请输入账号",trigger:"blur"},{min:2,message:"最少支持2个字符",trigger:"blur"},{max:20,message:"最多支持20个字符",trigger:"blur"},{pattern:/^([a-zA-Z][a-zA-Z0-9-_]*)|(1(3|4|5|7|8)\d{9})|([\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?)$/,message:"请输入合法的用户名、手机号或邮箱",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,message:"最少支持6个字符",trigger:"blur"},{max:32,message:"最多支持32个字符",trigger:"blur"}],validationCode:[{required:!0,message:"请输入验证码",trigger:"blur"},{max:32,message:"最多支持32个字符",trigger:"blur"}]},isRemberPassword:!0}},mounted:function(){this.refreshValidationCodeUrl=this.refreshValidationCodeUrlBase},methods:{handleReset:function(t){this.$refs.mainForm.resetFields()},handleSubmit:function(t){var n=this;this.$refs.mainForm.validate(function(t){if(!t)return!1;n.isLoading=!0;var e=i.a.cloneDeep(n.mainForm);e.password=l()(e.password),r.a.login(e).then(function(t){},function(t){n.isLoading=!1,n.$message.error(t.message),n.handleRefreshValidationCode(null)})})},handleRefreshValidationCode:function(t){this.refreshValidationCodeUrl=this.refreshValidationCodeUrlBase+"?"+(new Date).getTime(),this.mainForm.validationCode="",t&&this.$refs.validationCode.focus()},handleFocus:function(t){this.$refs[t].focus()},testDownload:function(){var e=this;this.isLoading=!0;r.a.download("http://192.168.0.108:9005/manager/api/Project/Report/ImportAttendance",{Cityname:"35dea0e5-9b9f-4b8b-981e-2e1120b1c317",DeliveryFeeBillCsvPath:"/UserFiles/5/files/2017-11-27-2017-12-04配送费账单(1).csv"}).then(function(t){e.isLoading=!1,u(t.data,"test.xlsx")},function(t){e.isLoading=!1,e.$message.error(t.message)})}}}},VsUZ:function(t,e,n){"use strict";var a=n("7+uW");e.a={login:function(t){return a.default.httpClient.post("/admin/login",t)},refreshToken:function(t){return a.default.httpClient.post("/admin/refreshToken",t)},logout:function(){return a.default.httpClient.post("/admin/logout")},getProfile:function(){return a.default.httpClient.get("/admin/getProfile")},changeProfile:function(t){return a.default.httpClient.post("/admin/changeProfile",t)},changeAvatar:function(t){return a.default.uploadHttpClient.post("/admin/ChangeAvatar",t)},changeLogo:function(t){return a.default.uploadHttpClient.post("/admin/ChangeLogo",t)},changePassword:function(t){return a.default.httpClient.post("/admin/changePassword",t)},getMenus:function(){return a.default.httpClient.get("/admin/getMenus")},getBulletin:function(){return a.default.httpClient.get("/admin/getBulletin")},editBulletin:function(t){return a.default.httpClient.post("/admin/editBulletin",t)},getModuleMetaDatas:function(){return a.default.httpClient.get("/admin/getModuleMetaDatas")},extractModuleMetaDatas:function(){return a.default.httpClient.get("/admin/extractModuleMetaDatas")},clearModulePermissions:function(){return a.default.httpClient.get("/admin/clearModulePermissions")},getRoleList:function(){return a.default.httpClient.get("/admin/getRoleList")},addRole:function(t){return a.default.httpClient.post("/admin/addRole",t)},editRole:function(t){return a.default.httpClient.post("/admin/editRole",t)},removeRole:function(t){return a.default.httpClient.post("/admin/removeRole",t)},moveRole:function(t){return a.default.httpClient.post("/admin/moveRole",t)},saveRoleName:function(t){return a.default.httpClient.post("/admin/saveRoleName",t)},getGroupTree:function(){return a.default.httpClient.get("/admin/getGroupTree")},addGroup:function(t){return a.default.httpClient.post("/admin/addGroup",t)},editGroup:function(t){return a.default.httpClient.post("/admin/editGroup",t)},removeGroup:function(t){return a.default.httpClient.post("/admin/removeGroup",t)},moveGroup:function(t){return a.default.httpClient.post("/admin/moveGroup",t)},getUserPage:function(t){return a.default.httpClient.post("/admin/getUserPage",t)},addUser:function(t){return a.default.httpClient.post("/admin/addUser",t)},editUser:function(t){return a.default.httpClient.post("/admin/editUser",t)},removeUser:function(t){return a.default.httpClient.post("/admin/removeUser",t)},getUserStatuList:function(){return a.default.httpClient.get("/admin/getUserStatuList")},validateUsernameExists:function(t){return a.default.httpClient.post("/admin/ValidateUsernameExists",t)},validateMobileExists:function(t){return a.default.httpClient.post("/admin/ValidateMobileExists",t)},validateEmailExists:function(t){return a.default.httpClient.post("/admin/ValidateEmailExists",t)},changeUserAvatar:function(t){return a.default.uploadHttpClient.post("/admin/ChangeUserAvatar",t)},changeUserLogo:function(t){return a.default.uploadHttpClient.post("/admin/ChangeUserLogo",t)},getNotificationsForManager:function(t){return a.default.httpClient.post("/admin/getNotificationsForManager",t)},addNotification:function(t){return a.default.httpClient.post("/admin/addNotification",t)},editNotification:function(t){return a.default.httpClient.post("/admin/editNotification",t)},removeNotification:function(t){return a.default.httpClient.post("/admin/removeNotification",t)},getNotifications:function(t){return a.default.httpClient.post("/admin/getNotifications",t)},readNotifications:function(t){return a.default.httpClient.post("/admin/readNotifications",t)},deleteNotifications:function(t){return a.default.httpClient.post("/admin/deleteNotifications",t)},getNewestNotification:function(t){return a.default.httpClient.post("/admin/getNewestNotification",t)},getGroupList:function(){return a.default.httpClient.get("/admin/getGroupList")},getRoleBaseList:function(){return a.default.httpClient.get("/admin/getRoleBaseList")},getPermissionTree:function(){return a.default.httpClient.get("/admin/getPermissionTree")},callDirectly:function(t){return a.default.httpClient.get(t)},download:function(t,e){return a.default.httpClient.post(t,e,{responseType:"arraybuffer"})}}},Z4L9:function(t,e,n){"use strict";var a=n("PxPL"),o=n("8yQj");function i(t){n("MIXw")}var r=n("VU/8")(a.a,o.a,!1,i,"data-v-90c00688",null);e.a=r.exports},bzuE:function(t,e,n){"use strict";n.d(e,"a",function(){return a}),n.d(e,"b",function(){return o}),n.d(e,"c",function(){return i});var a="/api",o="",i=""},rFs4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("tvR6"),o=(n.n(a),n("qBF2")),i=n.n(o),r=n("7+uW"),s=n("/rEA"),l=n("Z4L9"),u=n("C/JF"),d=n("fhbW"),f=n("1e6/");u.c.add(d.b,d.a),r.default.config.productionTip=!1,r.default.use(s.a),r.default.use(i.a,{size:"small"}),r.default.component("font-awesome-icon",f.a),new r.default({el:"#app",render:function(t){return t(l.a)}})},tvR6:function(t,e){}},["rFs4"]);
  //# sourceMappingURL=login.js.map