src/common/untils/request.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/layout/components/appsidebar/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/common/untils/request.js
@@ -25,7 +25,7 @@ prod:`//${window.location.hostname}:9080`, test:`//192.168.20.119:9080`, // 想跳到本地启动的登录页的话需要把dev改成你本地项目路径 dev: `//192.168.20.124:8081` dev: `//192.168.20.158:8080` } return loginPathMap[environmentType()] @@ -66,7 +66,8 @@ return res.data ? res.data : {} }else if([2012,2013,2014,2015].includes(res.data.code)){ if (isDev){ alert("JWT失效") alert("JWT失效,即将跳转至登录页..") window.location = getApsPage()+'/login' }else { // JWT鉴权失效 跳转到登录页 window.location = getApsPage()+'/login' @@ -84,7 +85,9 @@ (error) => { if (error.response.status === 401){ if (isDev){ alert("JWT失效") alert("JWT失效,即将跳转至登录页..") window.location = getApsPage()+'/login' }else { // JWT鉴权失效 跳转到登录页 window.location = getApsPage()+'/login' src/components/layout/components/appsidebar/index.vue
@@ -25,7 +25,7 @@ <el-menu-item v-for="itm in item.children" :key="itm.id" :index="itm.path">{{ itm.title }}</el-menu-item> </el-submenu> </el-menu> <!-- <el-empty v-if="!this.menus" description="没有侧栏菜单"></el-empty> --> <el-empty v-if="this.menus===null||this.menus===undefined||this.menus.length===0" :image-size="130" description="没有侧栏菜单"></el-empty> </div> </div> </template> @@ -59,4 +59,11 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> @import "./index.scss"; ::v-deep .el-empty{ .el-empty__description{ p{ color: #dddd; } } } </style>