Skip to content

Commit 9a051ba

Browse files
committed
完善 uniapp 接口地址配置
1 parent 48e8855 commit 9a051ba

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
module.exports = {
33
// baseUrl: 'http://localhost:8080',
44
baseUrl: 'http://localhost:48080',
5+
baseApi: 'admin-api',
56
// 应用信息
67
appInfo: {
78
// 应用名称

utils/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import errorCode from '@/utils/errorCode'
55
import { toast, showConfirm, tansParams } from '@/utils/common'
66

77
let timeout = 10000
8-
const baseUrl = config.baseUrl + '/admin-api';
8+
const baseUrl = config.baseUrl + config.baseApi;
99

1010
const request = config => {
1111
// 是否需要设置 token

0 commit comments

Comments
 (0)