Browse Source

默认首页使用keep-alive缓存

tags/v3.2.0
RuoYi 3 years ago
parent
commit
98c538c9e3
  1. 4
      ruoyi-ui/src/router/index.js
  2. 2
      ruoyi-ui/src/utils/request.js
  3. 2
      ruoyi-ui/src/views/index.vue

4
ruoyi-ui/src/router/index.js

@ -66,8 +66,8 @@ export const constantRoutes = [ @@ -66,8 +66,8 @@ export const constantRoutes = [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},

2
ruoyi-ui/src/utils/request.js

@ -51,7 +51,7 @@ service.interceptors.response.use(res => { @@ -51,7 +51,7 @@ service.interceptors.response.use(res => {
location.href = '/index';
})
}).catch(() => {});
return Promise.reject()
return Promise.reject('令牌验证失败')
} else if (code === 500) {
Message({
message: msg,

2
ruoyi-ui/src/views/index.vue

@ -556,7 +556,7 @@ @@ -556,7 +556,7 @@
<script>
export default {
name: "index",
name: "Index",
data() {
return {
//

Loading…
Cancel
Save