作者 RuoYi

默认首页使用keep-alive缓存

@@ -13,7 +13,6 @@ import com.ruoyi.system.mapper.SysConfigMapper; @@ -13,7 +13,6 @@ import com.ruoyi.system.mapper.SysConfigMapper;
13 import com.ruoyi.system.service.ISysConfigService; 13 import com.ruoyi.system.service.ISysConfigService;
14 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
16 -  
17 import javax.annotation.PostConstruct; 16 import javax.annotation.PostConstruct;
18 import java.util.Collection; 17 import java.util.Collection;
19 import java.util.List; 18 import java.util.List;
@@ -12,7 +12,6 @@ import com.ruoyi.system.service.ISysDictTypeService; @@ -12,7 +12,6 @@ import com.ruoyi.system.service.ISysDictTypeService;
12 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
14 import org.springframework.transaction.annotation.Transactional; 14 import org.springframework.transaction.annotation.Transactional;
15 -  
16 import javax.annotation.PostConstruct; 15 import javax.annotation.PostConstruct;
17 import java.util.List; 16 import java.util.List;
18 17
@@ -66,8 +66,8 @@ export const constantRoutes = [ @@ -66,8 +66,8 @@ export const constantRoutes = [
66 { 66 {
67 path: 'index', 67 path: 'index',
68 component: (resolve) => require(['@/views/index'], resolve), 68 component: (resolve) => require(['@/views/index'], resolve),
69 - name: '首页',  
70 - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } 69 + name: 'Index',
  70 + meta: { title: '首页', icon: 'dashboard', affix: true }
71 } 71 }
72 ] 72 ]
73 }, 73 },
@@ -64,7 +64,7 @@ service.interceptors.response.use(res => { @@ -64,7 +64,7 @@ service.interceptors.response.use(res => {
64 location.href = '/index'; 64 location.href = '/index';
65 }) 65 })
66 }).catch(() => {}); 66 }).catch(() => {});
67 - return Promise.reject() 67 + return Promise.reject('令牌验证失败')
68 } else if (code === 500) { 68 } else if (code === 500) {
69 Message({ 69 Message({
70 message: msg, 70 message: msg,
@@ -601,7 +601,7 @@ @@ -601,7 +601,7 @@
601 601
602 <script> 602 <script>
603 export default { 603 export default {
604 - name: "index", 604 + name: "Index",
605 data() { 605 data() {
606 return { 606 return {
607 // 版本号 607 // 版本号
@@ -64,7 +64,7 @@ export default { @@ -64,7 +64,7 @@ export default {
64 props: { 64 props: {
65 // 角色编号 65 // 角色编号
66 roleId: { 66 roleId: {
67 - type: String 67 + type: [Number, String]
68 } 68 }
69 }, 69 },
70 data() { 70 data() {