java_web/test05/src/main/resources/static/js/app.c72fb026.js
2024-12-26 14:53:20 +08:00

2 lines
6.6 KiB
JavaScript

(function(){"use strict";var t={7482:function(t,e,n){var r=n(160),o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"H-full"},[e("el-container",{staticClass:"H-full"},[e("el-header",{staticClass:"header"},[e("h1",[t._v("学生信息管理系统")])]),e("el-container",{staticClass:"H-full"},[e("el-aside",{staticClass:"aside",attrs:{width:"200px"}},[e("el-menu",{staticClass:"el-menu-vertical H-full",attrs:{"background-color":"#2bf","text-color":"#fff","icon-color":"#fff","active-text-color":"#f35"}},[e("router-link",{attrs:{to:"student"}},[e("el-menu-item",{attrs:{index:"1"}},[e("i",{staticClass:"el-icon-user-solid"}),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("学生信息")])])],1),e("router-link",{attrs:{to:"course"}},[e("el-menu-item",{attrs:{index:"2"}},[e("i",{staticClass:"el-icon-menu"}),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("课程信息")])])],1),e("router-link",{attrs:{to:"teacher"}},[e("el-menu-item",{attrs:{index:"3"}},[e("i",{staticClass:"el-icon-s-management"}),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("教师信息")])])],1),e("el-menu-item",{attrs:{index:"4"},on:{click:t.logout}},[e("i",{staticClass:"el-icon-s-management"}),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("退出登录")])])],1)],1),e("el-container",[e("el-main",[e("router-view")],1),e("el-footer",[e("div")])],1)],1)],1)],1)},i=[],a=(n(6206),n(1903),n(1728)),u=n.n(a),s={data(){return{login:this.loginCheck()}},methods:{loginCheck(){const t=localStorage.getItem("user");if(!t)return!1;const e=t.split(".");if(3!==e.length)return!1;const n=JSON.parse(atob(e[1]));return n.exp?new Date(n.exp)>new Date/1e3:void 0},logout(){this.$confirm("确定要退出登录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{localStorage.removeItem("user"),this.login=!1,"login"!==this.$route.name&&this.$router.push("login"),u().ajax({url:this.$apiUrl+"/userAction/logout",method:"GET"})})).catch((()=>{this.$message({type:"info",message:"取消退出",showClose:!0})}))}},mounted:()=>{}},l=s,c=n(8126),f=(0,c.A)(l,o,i,!1,null,null,null),d=f.exports,p=n(2205);r["default"].use(p.Ay);const m=[{path:"/course",name:"course",component:()=>n.e(61).then(n.bind(n,6442)),meta:{requiresAuth:!0}},{path:"/login",name:"login",component:()=>n.e(376).then(n.bind(n,8376))},{path:"/student",name:"student",component:()=>n.e(113).then(n.bind(n,3113)),meta:{requiresAuth:!0}},{path:"/teacher",name:"teacher",component:()=>n.e(994).then(n.bind(n,6994)),meta:{requiresAuth:!0}}],h=new p.Ay({routes:m});function v(t){if(!t)return!1;const e=t.split(".");if(3!==e.length)return!1;const n=JSON.parse(atob(e[1]));if(n.exp)return new Date(n.exp)>new Date/1e3;throw new Error("No expiration time found in JWT payload")}h.beforeEach(((t,e,n)=>{const r=localStorage.getItem("user");!t.meta.requiresAuth||v(r)?(u().ajaxSetup({headers:{token:r}}),n()):n({path:"/login",query:{redirect:t.name}})}));var g=h,b=n(1418),y=n.n(b),w={install(t){t.prototype.$apiUrl=""}},x=n(7832);r["default"].use(x.Ay);var k=new x.Ay.Store({state:{},getters:{},mutations:{},actions:{},modules:{}});r["default"].use(y()),r["default"].use(w),r["default"].config.productionTip=!1,new r["default"]({router:g,store:k,render:t=>t(d)}).$mount("#app")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,function(){n.amdO={}}(),function(){var t=[];n.O=function(e,r,o,i){if(!r){var a=1/0;for(c=0;c<t.length;c++){r=t[c][0],o=t[c][1],i=t[c][2];for(var u=!0,s=0;s<r.length;s++)(!1&i||a>=i)&&Object.keys(n.O).every((function(t){return n.O[t](r[s])}))?r.splice(s--,1):(u=!1,i<a&&(a=i));if(u){t.splice(c--,1);var l=o();void 0!==l&&(e=l)}}return e}i=i||0;for(var c=t.length;c>0&&t[c-1][2]>i;c--)t[c]=t[c-1];t[c]=[r,o,i]}}(),function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.f={},n.e=function(t){return Promise.all(Object.keys(n.f).reduce((function(e,r){return n.f[r](t,e),e}),[]))}}(),function(){n.u=function(t){return"js/"+t+"."+{61:"67aace82",113:"f4fc6765",376:"23b9bc94",994:"55fb0c1b"}[t]+".js"}}(),function(){n.miniCssF=function(t){}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="student-information-sys:";n.l=function(r,o,i,a){if(t[r])t[r].push(o);else{var u,s;if(void 0!==i)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var f=l[c];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==e+i){u=f;break}}u||(s=!0,u=document.createElement("script"),u.charset="utf-8",u.timeout=120,n.nc&&u.setAttribute("nonce",n.nc),u.setAttribute("data-webpack",e+i),u.src=r),t[r]=[o];var d=function(e,n){u.onerror=u.onload=null,clearTimeout(p);var o=t[r];if(delete t[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((function(t){return t(n)})),e)return e(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),s&&document.head.appendChild(u)}}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){n.p="/"}(),function(){var t={524:0};n.f.j=function(e,r){var o=n.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((function(n,r){o=t[e]=[n,r]}));r.push(o[2]=i);var a=n.p+n.u(e),u=new Error,s=function(r){if(n.o(t,e)&&(o=t[e],0!==o&&(t[e]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;u.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,o[1](u)}};n.l(a,s,"chunk-"+e,e)}},n.O.j=function(e){return 0===t[e]};var e=function(e,r){var o,i,a=r[0],u=r[1],s=r[2],l=0;if(a.some((function(e){return 0!==t[e]}))){for(o in u)n.o(u,o)&&(n.m[o]=u[o]);if(s)var c=s(n)}for(e&&e(r);l<a.length;l++)i=a[l],n.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return n.O(c)},r=self["webpackChunkstudent_information_sys"]=self["webpackChunkstudent_information_sys"]||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}();var r=n.O(void 0,[504],(function(){return n(7482)}));r=n.O(r)})();
//# sourceMappingURL=app.c72fb026.js.map