Commit 30aa0baf656843feaa289255303a4206e3848f4e
1 parent
af73ec34
完善 uniapp 接口地址配置
Showing
2 changed files
with
2 additions
and
1 deletions
yudao-ui-admin-uniapp/config.js
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | module.exports = { | 2 | module.exports = { |
| 3 | // baseUrl: 'http://localhost:8080', | 3 | // baseUrl: 'http://localhost:8080', |
| 4 | baseUrl: 'http://localhost:48080', | 4 | baseUrl: 'http://localhost:48080', |
| 5 | + baseApi: 'admin-api', | ||
| 5 | // 应用信息 | 6 | // 应用信息 |
| 6 | appInfo: { | 7 | appInfo: { |
| 7 | // 应用名称 | 8 | // 应用名称 |
yudao-ui-admin-uniapp/utils/request.js
| @@ -5,7 +5,7 @@ import errorCode from '@/utils/errorCode' | @@ -5,7 +5,7 @@ import errorCode from '@/utils/errorCode' | ||
| 5 | import { toast, showConfirm, tansParams } from '@/utils/common' | 5 | import { toast, showConfirm, tansParams } from '@/utils/common' |
| 6 | 6 | ||
| 7 | let timeout = 10000 | 7 | let timeout = 10000 |
| 8 | -const baseUrl = config.baseUrl + '/admin-api'; | 8 | +const baseUrl = config.baseUrl + config.baseApi; |
| 9 | 9 | ||
| 10 | const request = config => { | 10 | const request = config => { |
| 11 | // 是否需要设置 token | 11 | // 是否需要设置 token |