张延森 4 år sedan
förälder
incheckning
c6a13e28b6
3 ändrade filer med 9 tillägg och 2 borttagningar
  1. 3
    1
      src/pages/UserManage/CitySelect.jsx
  2. 4
    1
      src/services/apis.js
  3. 2
    0
      src/utils/constant.js

+ 3
- 1
src/pages/UserManage/CitySelect.jsx Visa fil

2
 import { Select } from 'antd';
2
 import { Select } from 'antd';
3
 
3
 
4
 import request from '../../utils/request'
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
 const { Option } = Select;
9
 const { Option } = Select;
8
 
10
 

+ 4
- 1
src/services/apis.js Visa fil

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
 const apis = {
6
 const apis = {
4
   user: {
7
   user: {

+ 2
- 0
src/utils/constant.js Visa fil

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