Skip to content

Commit

Permalink
fix(request.ts): baseUrl错误
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Dec 10, 2021
1 parent 36a1346 commit 3818cb2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ VUE_APP_BASE_SOCKET_NSP = '/admin'
# mock api
VUE_APP_MOCK_API = '/mock-api/'

# API
VUE_APP_API_URL = http://29135jo738.zicp.vip/api/v1
4 changes: 1 addition & 3 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ENV = 'production'

# base api
VUE_APP_BASE_API = '/api/admin/'
VUE_APP_BASE_API = 'http://29135jo738.zicp.vip/admin/'
VUE_APP_BASE_SOCKET_PATH = '/ws'
VUE_APP_BASE_SOCKET_NSP = '/admin'

Expand All @@ -12,5 +12,3 @@ BASE_URL = /vue3-antd-admin/
# mock api
VUE_APP_MOCK_API = '/mock-api/'

# API
VUE_APP_API_URL = http://29135jo738.zicp.vip/api/v1
2 changes: 1 addition & 1 deletion src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface RequestOptions {
const UNKNOWN_ERROR = '未知错误,请重试';

/** 真实请求的路径前缀 */
const baseApiUrl = process.env.VUE_APP_API_URL;
const baseApiUrl = process.env.VUE_APP_BASE_API;
/** mock请求路径前缀 */
const baseMockUrl = process.env.VUE_APP_MOCK_API;

Expand Down

0 comments on commit 3818cb2

Please sign in to comment.