默认首页使用keep-alive缓存
This commit is contained in:
		
							parent
							
								
									8a67af6c26
								
							
						
					
					
						commit
						5139265d32
					
				| 
						 | 
					@ -13,7 +13,6 @@ import com.ruoyi.system.mapper.SysConfigMapper;
 | 
				
			||||||
import com.ruoyi.system.service.ISysConfigService;
 | 
					import com.ruoyi.system.service.ISysConfigService;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.stereotype.Service;
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					 | 
				
			||||||
import javax.annotation.PostConstruct;
 | 
					import javax.annotation.PostConstruct;
 | 
				
			||||||
import java.util.Collection;
 | 
					import java.util.Collection;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,6 @@ import com.ruoyi.system.service.ISysDictTypeService;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.stereotype.Service;
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
import org.springframework.transaction.annotation.Transactional;
 | 
					import org.springframework.transaction.annotation.Transactional;
 | 
				
			||||||
 | 
					 | 
				
			||||||
import javax.annotation.PostConstruct;
 | 
					import javax.annotation.PostConstruct;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,8 +66,8 @@ export const constantRoutes = [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        path: 'index',
 | 
					        path: 'index',
 | 
				
			||||||
        component: (resolve) => require(['@/views/index'], resolve),
 | 
					        component: (resolve) => require(['@/views/index'], resolve),
 | 
				
			||||||
        name: '首页',
 | 
					        name: 'Index',
 | 
				
			||||||
        meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
 | 
					        meta: { title: '首页', icon: 'dashboard', affix: true }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -64,7 +64,7 @@ service.interceptors.response.use(res => {
 | 
				
			||||||
          location.href = '/index';
 | 
					          location.href = '/index';
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
      }).catch(() => {});
 | 
					      }).catch(() => {});
 | 
				
			||||||
      return Promise.reject()
 | 
					      return Promise.reject('令牌验证失败')
 | 
				
			||||||
    } else if (code === 500) {
 | 
					    } else if (code === 500) {
 | 
				
			||||||
      Message({
 | 
					      Message({
 | 
				
			||||||
        message: msg,
 | 
					        message: msg,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -601,7 +601,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "index",
 | 
					  name: "Index",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      // 版本号
 | 
					      // 版本号
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -64,7 +64,7 @@ export default {
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    // 角色编号
 | 
					    // 角色编号
 | 
				
			||||||
    roleId: {
 | 
					    roleId: {
 | 
				
			||||||
      type: String
 | 
					      type: [Number, String]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue