no message

main
LX 2023-10-11 11:15:09 +08:00
parent cdd26998fb
commit 07d84c4a93
1 changed files with 50 additions and 0 deletions

View File

@ -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)