傅行帆 5 years ago
parent
commit
359c5592c0

+ 1
- 1
config/config.js View File

@@ -512,7 +512,7 @@ export default {
512 512
 
513 513
   proxy: {
514 514
     '/api/': {
515
-      target: 'http://192.168.0.11:8080/',
515
+      target: 'http://192.168.0.84:8080/',
516 516
       changeOrigin: true,
517 517
       // pathRewrite: { '^/server': '' },
518 518
     },

+ 2
- 6
src/components/SelectButton/BuildSelect.jsx View File

@@ -1,6 +1,6 @@
1 1
 import React, { useState, useEffect, useRef } from 'react';
2 2
 import { Select } from 'antd';
3
-
3
+import apis from '../../services/apis';
4 4
 import request from '../../utils/request'
5 5
 
6 6
 const { Option } = Select;
@@ -33,11 +33,7 @@ const BuildingSelect = (props) => {
33 33
   },[])
34 34
 
35 35
   const getCityList = (e) => {
36
-    request({
37
-        url: '/api/admin/buildinglist/select',
38
-        method: 'GET',
39
-        params: {pageNum: 1,pageSize: 999},
40
-    }).then((data) => {
36
+    request({ ...apis.building.buildingSelect, params: {pageNum: 1,pageSize: 999}, }).then((data) => {
41 37
         setData(data.records)
42 38
     })
43 39
   }

+ 1
- 0
src/components/SelectButton/CitySelect.jsx View File

@@ -23,6 +23,7 @@ const CitySelect = (props) => {
23 23
         url: '/api/admin/tdCity',
24 24
         method: 'GET',
25 25
         params: {leveltype: 2, pageNum: 1,pageSize: 999},
26
+        action: 'select',
26 27
     }).then((data) => {
27 28
         setData(data)
28 29
     })

+ 1
- 0
src/components/SelectButton/NewTypeSelect.jsx View File

@@ -23,6 +23,7 @@ const NewsTypeSelect = (props) => {
23 23
         url: '/api/admin/taNewsType',
24 24
         method: 'GET',
25 25
         params: {pageNum: 1,pageSize: 999},
26
+        action: 'select',
26 27
     }).then((data) => {
27 28
         setData(data.records)
28 29
     })

+ 5
- 0
src/services/apis.js View File

@@ -85,6 +85,11 @@ export default {
85 85
       url: `${prefix}/apartment/deleted/id`,
86 86
       action: 'admin.apartment.deleted.id.delete',
87 87
     },
88
+    buildingSelect: {
89
+      url: `${prefix}/buildinglist/select`,
90
+      method: 'GET',
91
+      action: 'select',
92
+    }
88 93
   },
89 94
   buildingType: {
90 95
     getList: {