hotime/example/tpt/js/chunk-a74869b6.59e9b13d.js

1 line
3.7 KiB
JavaScript
Raw Normal View History

2021-12-16 05:24:31 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a74869b6"],{1:function(t,e){},2934:function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"f",function(){return d});var e=n("b0c0"),o=n("b775"),e=n("4328"),r=n.n(e);function a(t,e){return Object(o.b)({url:t,method:"GET",params:e})}function s(t,e){return Object(o.b)({url:t,method:"GET",params:e})}function i(t,e){return Object(o.b)({url:t,method:"DELETE",data:r.a.stringify(e)})}function c(t,e){return Object(o.b)({url:t,method:"PUT",data:r.a.stringify(e)})}function u(t,e){return Object(o.b)({url:t,method:"POST",data:r.a.stringify(e)})}function d(t){var e=new FormData;return e.append("file",t,t.name),Object(o.b)({url:"file",headers:{"Content-Type":"multipart/form-data"},method:"POST",data:e})}},"40a7":function(t,e,n){},"578a":function(t,e,n){"use strict";n.r(e);n("b0c0");var s=n("9f9f");Object(s.O)("data-v-581864d3");var i={class:"login",style:{width:"100%",height:"100vh"}},c={class:"login-item"},u={class:"left-title"},d={class:"right-content"},l=Object(s.o)("p",{class:"login-title"},"登录",-1),f={style:{height:"40px"}},b={class:"inputWrap"},p=Object(s.r)(" 账号:"),m={class:"inputWrap"},h=Object(s.r)(" 密码:");Object(s.M)();var o=n("2934"),r={name:"Login",data:function(){return{showLog:!1,showLogInfo:"",label:"HoTime DashBoard",form:{name:"",password:""}}},methods:{login:function(){var e=this;if(""==this.name||""==this.password)return this.showLogInfo="参数不足!",void(this.showLog=!0);Object(o.a)(window.Hotime.data.name+"/hotime/login",e.form).then(function(t){return 0!=t.status?(e.showLogInfo=t.error.msg,void(e.showLog=!0)):void e.$router.push({path:"/"})})}},mounted:function(){this.label=window.Hotime.data.label}};n("8d39");r.render=function(t,e,n,o,r,a){return Object(s.L)(),Object(s.n)("div",i,[Object(s.o)("div",c,[Object(s.o)("div",u,[Object(s.o)("p",null,Object(s.Y)(r.label),1)]),Object(s.o)("div",d,[l,Object(s.o)("div",f,[Object(s.kb)(Object(s.o)("p",{class:"errorMsg"},Object(s.Y)(r.showLogInfo),513),[[s.gb,r.showLog]])]),Object(s.o)("p",b,[p,Object(s.kb)(Object(s.o)("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=function(t){return r.form.name=t}),class:"accountVal"},null,512),[[s.fb,r.form.name]])]),Object(s.o)("p",m,[h,Object(s.kb)(Object(s.o)("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=function(t){return r.form.password=t}),class:"passwordVal"},null,512),[[s.fb,r.form.password]])]),Object(s.o)("p",{class:"login-btn",onClick:e[2]||(e[2]=function(){return a.login&&a.login.apply(a,arguments)})},"登录")])])])},r.__scopeId="data-v-581864d3";e.default=r},"8d39":function(t,e,n){"use strict";n("40a7")},b775:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var o=n("d3b7"),r=n("bc3a"),o=n.n(r),r=n("4328"),a=n.n(r),s=n("2bea"),i=n("56d7"),c="";o.a.defaults.withCredentials=!0,o.a.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";o=o.a.create({baseURL:c,timeout:2e4});o.interceptors.request.use(function(t){return"get"===t.method&&(t.paramsSerializer=function(t){return a.a.stringify(t,{arrayFormat:"repeat"})}),t.withCredentials=!0,t},function(t){Promise.reject(t)}),o.interceptors.response.use(function(t){return 2!==t.data.statu?t.data:(s.b.Message({showClose:!0,message:"登录信息丢失,请重新登陆!",type:"error",duration:2e3,offset:100}),void i.app.$router.push({path:"/login"}))},function(t){var e="err:"+t,n={};return t.response?n=t.response.data:(-1!=e.indexOf("timeout")?(n.code=500,n.message="请求超时,请稍后再试"):-1!=e.indexOf("Network Error")?(n.code=500,n.message="网络错误,请稍后再试"):(n.code=500,n.message=""+t),n)}),e.b=o}}]);