no message
							parent
							
								
									cdd26998fb
								
							
						
					
					
						commit
						07d84c4a93
					
				| 
						 | 
					@ -1,6 +1,12 @@
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Build Setup
 | 
					#### Build Setup
 | 
				
			||||||
``` bash
 | 
					``` bash
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					#### Build Setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					>>>>>>> 7e1b048 (no message)
 | 
				
			||||||
# 安装依赖
 | 
					# 安装依赖
 | 
				
			||||||
npm install
 | 
					npm install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +22,10 @@ npm run build:prod
 | 
				
			||||||
1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
 | 
					1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
 | 
				
			||||||
 | 
					
 | 
				
			||||||
解决方案:
 | 
					解决方案:
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>>>>>>> 7e1b048 (no message)
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
1. 单独安装:npm install --unsafe-perm node-sass 
 | 
					1. 单独安装:npm install --unsafe-perm node-sass 
 | 
				
			||||||
2. 直接使用:npm install --unsafe-perm
 | 
					2. 直接使用:npm install --unsafe-perm
 | 
				
			||||||
| 
						 | 
					@ -25,3 +35,43 @@ npm run build:prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
https://www.ydyno.com/archives/1219.html
 | 
					https://www.ydyno.com/archives/1219.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<<<<<<< HEAD
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 单前端部署,使用多查询
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1.去掉登录验证,在router/index.js 中
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					else {
 | 
				
			||||||
 | 
					    /* has no token*/
 | 
				
			||||||
 | 
					    if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
 | 
				
			||||||
 | 
					      next()
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
 | 
				
			||||||
 | 
					      NProgress.done()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					修改为
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
 | 
					      if (!store.getters.loadMenus) {
 | 
				
			||||||
 | 
					        // 修改成false,防止死循环
 | 
				
			||||||
 | 
					        store.dispatch('updateLoadMenus')
 | 
				
			||||||
 | 
					        loadMenus(next, to)
 | 
				
			||||||
 | 
					      }else{
 | 
				
			||||||
 | 
					        next()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2.修改loadMenus 接口地址,并在 老项目中添加接口,返回对应的数据,(菜单路由数据)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					>>>>>>> 7e1b048 (no message)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue