张延森 4 anos atrás
pai
commit
c6a13e28b6

+ 3
- 1
src/pages/UserManage/CitySelect.jsx Ver arquivo

@@ -2,7 +2,9 @@ import React, { useState, useEffect } from 'react';
2 2
 import { Select } from 'antd';
3 3
 
4 4
 import request from '../../utils/request'
5
-const prefix = process.env.NODE_ENV === 'production' ? 'https://channel.fangdeal.cn' : ''
5
+import { APIBaseURL } from '../../utils/constant'
6
+
7
+const prefix = APIBaseURL
6 8
 
7 9
 const { Option } = Select;
8 10
 

+ 4
- 1
src/services/apis.js Ver arquivo

@@ -1,4 +1,7 @@
1
-const prefix = process.env.NODE_ENV === 'production' ? 'https://channel.fangdeal.cn/api/center' : '/api/center'
1
+
2
+import { APIBaseURL } from '../utils/constant'
3
+
4
+const prefix = `${APIBaseURL}api/center`
2 5
 
3 6
 const apis = {
4 7
   user: {

+ 2
- 0
src/utils/constant.js Ver arquivo

@@ -0,0 +1,2 @@
1
+
2
+export const APIBaseURL = process.env.NODE_ENV === 'production' ? 'https://zcloud.njyunzhi.com/' : '/'