dingxin 5 年前
父节点
当前提交
edea2cbc2b

+ 1
- 0
.eslintrc.js 查看文件

5
   globals: {
5
   globals: {
6
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
6
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
7
     page: true,
7
     page: true,
8
+    AMap: true,
8
   },
9
   },
9
 };
10
 };

+ 1
- 1
config/config.js 查看文件

479
 
479
 
480
   proxy: {
480
   proxy: {
481
     '/api/': {
481
     '/api/': {
482
-      target: 'http://192.168.0.84:8080/',
482
+      target: 'http://localhost:8080/',
483
       changeOrigin: true,
483
       changeOrigin: true,
484
       // pathRewrite: { '^/server': '' },
484
       // pathRewrite: { '^/server': '' },
485
     },
485
     },

+ 1
- 0
package.json 查看文件

56
     "qs": "^6.7.0",
56
     "qs": "^6.7.0",
57
     "react": "^16.8.6",
57
     "react": "^16.8.6",
58
     "react-amap": "^1.2.8",
58
     "react-amap": "^1.2.8",
59
+    "react-amap-plugin-autocomplete": "0.0.4",
59
     "react-copy-to-clipboard": "^5.0.1",
60
     "react-copy-to-clipboard": "^5.0.1",
60
     "react-document-title": "^2.0.3",
61
     "react-document-title": "^2.0.3",
61
     "react-dom": "^16.8.6",
62
     "react-dom": "^16.8.6",

+ 6
- 24
src/pages/activity/ActivityList.jsx 查看文件

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
-
9
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
10
 import request from '../../utils/request'
11
 
11
 
12
 const { Option } = Select;
12
 const { Option } = Select;
22
 
22
 
23
   // 查询列表
23
   // 查询列表
24
   const getList = (params) => {
24
   const getList = (params) => {
25
-    request({
26
-        url: '/api/admin/iBuildingDynamicList',
27
-        method: 'GET',
28
-        params: { ...params },
29
-    }).then((data) => {
25
+    request({ ...apis.activity.list, params: { ...params } }).then((data) => {
30
         console.log(data)
26
         console.log(data)
31
         setData(data)
27
         setData(data)
32
     })
28
     })
124
           okText: '确定',
120
           okText: '确定',
125
           cancelText: '取消',
121
           cancelText: '取消',
126
           onOk() {
122
           onOk() {
127
-              request({
128
-                  url: '/api/admin/buildingDynamic/finish',
129
-                  method: 'PUT',
130
-                  data: {dynamicId: row.dynamicId, top: ""},
131
-              }).then((data) => {
123
+              request({ ...apis.activity.finish, data: {dynamicId: row.dynamicId, top: ""} }).then((data) => {
132
                   console.log(data)
124
                   console.log(data)
133
                   message.info('操作成功!')
125
                   message.info('操作成功!')
134
                   getList({ pageNum: 1, pageSize: 10 })
126
                   getList({ pageNum: 1, pageSize: 10 })
143
 //   置顶
135
 //   置顶
144
   const topDynamic = (row) => () => {
136
   const topDynamic = (row) => () => {
145
       const weight = Math.abs(row.weight - 1)
137
       const weight = Math.abs(row.weight - 1)
146
-      request({
147
-          url: '/api/admin/buildingDynamic/weight',
148
-          method: 'PUT',
149
-          params: {dynamicId: row.dynamicId, weight},
150
-      }).then((data) => {
138
+      request({ ...apis.activity.weight, params: {dynamicId: row.dynamicId, weight} }).then((data) => {
151
           console.log(data)
139
           console.log(data)
152
           message.info('操作成功!')
140
           message.info('操作成功!')
153
           getList({ pageNum: 1, pageSize: 10 })
141
           getList({ pageNum: 1, pageSize: 10 })
167
   
155
   
168
   // 取消活动
156
   // 取消活动
169
   const cancelDynamic = (row) => {
157
   const cancelDynamic = (row) => {
170
-      request({
171
-          url: '/api/admin/buildingDynamic/cancel/'+row.dynamicId,
172
-          method: 'PUT',
173
-      }).then((data) => {
158
+      request({ ...apis.activity.cancel, urlData: {id: row.dynamicId}}).then((data) => {
174
           message.info('操作成功!')
159
           message.info('操作成功!')
175
           getList({ pageNum: 1, pageSize: 10 })
160
           getList({ pageNum: 1, pageSize: 10 })
176
       }).catch((err) => {
161
       }).catch((err) => {
181
   
166
   
182
   //发布活动
167
   //发布活动
183
   const sendDynamic = (row) => {
168
   const sendDynamic = (row) => {
184
-      request({
185
-          url: '/api/admin/buildingDynamic/send/'+row.dynamicId,
186
-          method: 'PUT',
187
-      }).then((data) => {
169
+      request({ ...apis.activity.send, urlData: {id: row.dynamicId}}).then((data) => {
188
           message.info('操作成功!')
170
           message.info('操作成功!')
189
           getList({ pageNum: 1, pageSize: 10 });
171
           getList({ pageNum: 1, pageSize: 10 });
190
       }).catch((err) => {
172
       }).catch((err) => {

+ 2
- 6
src/pages/activity/SignList.jsx 查看文件

4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
-
7
+import apis from '../../services/apis';
8
 import request from '../../utils/request'
8
 import request from '../../utils/request'
9
 
9
 
10
 const { Option } = Select;
10
 const { Option } = Select;
50
 
50
 
51
   // 查询列表
51
   // 查询列表
52
   const getSignList = (params) => {
52
   const getSignList = (params) => {
53
-    request({
54
-        url: '/api/admin/SignList',
55
-        method: 'GET',
56
-        params: { ...params },
57
-    }).then((data) => {
53
+    request({ ...apis.activity.signList, params: { ...params },}).then((data) => {
58
         console.log(data)
54
         console.log(data)
59
         setData(data)
55
         setData(data)
60
     })
56
     })

+ 10
- 45
src/pages/activity/editActivity.jsx 查看文件

2
 import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
2
 import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
+import apis from '../../services/apis';
5
 import moment from 'moment';
6
 import moment from 'moment';
6
 import router from 'umi/router';
7
 import router from 'umi/router';
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
36
 
37
 
37
     // 查询列表
38
     // 查询列表
38
     const getDynamicData = (dynamicId) => {
39
     const getDynamicData = (dynamicId) => {
39
-      request({
40
-        url: '/api/admin/buildingDynamic/Details',
41
-        method: 'GET',
42
-        params: { dynamicId },
43
-      }).then((data) => {
40
+      request({ ...apis.activity.details, params: { dynamicId } }).then((data) => {
44
         console.log(data)
41
         console.log(data)
45
         setDynamicData(data)
42
         setDynamicData(data)
46
       })
43
       })
143
       console.log('submit data --->', submitValue)
140
       console.log('submit data --->', submitValue)
144
       if (dynamicId) {
141
       if (dynamicId) {
145
         submitValue.dynamicId = dynamicId
142
         submitValue.dynamicId = dynamicId
146
-        request({
147
-          url: '/api/admin/buildingDynamic/update',
148
-          method: 'PUT',
149
-          data: submitValue,
150
-        }).then((data) => {
143
+        request({ ...apis.activity.update, data: submitValue }).then((data) => {
151
           message.info("保存成功")
144
           message.info("保存成功")
152
           cancelPage()
145
           cancelPage()
153
         }).catch((err) => {
146
         }).catch((err) => {
154
           message.info(err.msg || err.message)
147
           message.info(err.msg || err.message)
155
         })
148
         })
156
       } else {
149
       } else {
157
-        request({
158
-          url: '/api/admin/buildingDynamic/add',
159
-          method: 'POST',
160
-          data: submitValue,
161
-        }).then((data) => {
150
+        request({ ...apis.activity.add, data: submitValue }).then((data) => {
162
           message.info("保存成功")
151
           message.info("保存成功")
163
           cancelPage()
152
           cancelPage()
164
         }).catch((err) => {
153
         }).catch((err) => {
178
 
167
 
179
     if(dynamicId){
168
     if(dynamicId){
180
       useEffect(() => {
169
       useEffect(() => {
181
-        request({
182
-          url: '/api/admin/poster',
183
-          method: 'GET',
184
-          params: {targetId: dynamicId,targetType: 'activity'},
185
-        }).then((data) => {
170
+        request({ ...apis.activity.poster, params: {targetId: dynamicId,targetType: 'activity'} }).then((data) => {
186
           console.log(data,"2222")
171
           console.log(data,"2222")
187
           if(data.length > 0){
172
           if(data.length > 0){
188
             setPosterId(data[0].posterId)
173
             setPosterId(data[0].posterId)
199
     const submitPoster  = () => {
184
     const submitPoster  = () => {
200
        if(dynamicId){
185
        if(dynamicId){
201
         if(posterId){
186
         if(posterId){
202
-          request({
203
-            url: '/api/admin/poster/'+posterId,
204
-            method: 'PUT',
205
-            data: {targetId: dynamicId,targetType: 'activity',posterImg: imgValue,posterTitle: inputValue,posterDescription: textAreaValue},
206
-          }).then((data) => {
187
+          request({ ...apis.activity.updatePoster, urlData: {id: posterId}, data: {targetId: dynamicId,targetType: 'activity',posterImg: imgValue,posterTitle: inputValue,posterDescription: textAreaValue},}).then((data) => {
207
             message.info("保存成功")
188
             message.info("保存成功")
208
           }).catch((err) => {
189
           }).catch((err) => {
209
             message.info(err.msg || err.message)
190
             message.info(err.msg || err.message)
210
           })
191
           })
211
          }else{
192
          }else{
212
-          request({
213
-            url: '/api/admin/poster',
214
-            method: 'POST',
215
-            data: {targetId: dynamicId,targetType: 'activity',posterImg: imgValue,posterTitle: inputValue,posterDescription: textAreaValue},
216
-          }).then((data) => {
193
+          request({ ...apis.activity.addPoster, data: {targetId: dynamicId,targetType: 'activity',posterImg: imgValue,posterTitle: inputValue,posterDescription: textAreaValue},}).then((data) => {
217
             setPosterId(data.posterId)
194
             setPosterId(data.posterId)
218
             message.info("保存成功")
195
             message.info("保存成功")
219
           }).catch((err) => {
196
           }).catch((err) => {
290
     
267
     
291
     if(dynamicId){
268
     if(dynamicId){
292
       useEffect(() => {
269
       useEffect(() => {
293
-        request({
294
-          url: '/api/admin/shareContent',
295
-          method: 'GET',
296
-          params: {targetId: dynamicId,targetType: 'activity'},
297
-        }).then((data) => {
270
+        request({ ...apis.activity.shareContent, params: {targetId: dynamicId,targetType: 'activity'},}).then((data) => {
298
           console.log(data,"2222")
271
           console.log(data,"2222")
299
           if(data.length > 0){
272
           if(data.length > 0){
300
             setShareContentId(data[0].shareContentId)
273
             setShareContentId(data[0].shareContentId)
310
     const submitShare = () => {
283
     const submitShare = () => {
311
       if(dynamicId){
284
       if(dynamicId){
312
         if(shareContentId){
285
         if(shareContentId){
313
-          request({
314
-            url: '/api/admin/shareContent/'+shareContentId,
315
-            method: 'PUT',
316
-            data: {targetId: dynamicId,shareContentType: 'activity',shareContentImg: imgValue,shareContentTitle: inputValue},
317
-          }).then((data) => {
286
+          request({ ...apis.activity.updateShareContent, urlData: {id: shareContentId},data: {targetId: dynamicId,shareContentType: 'activity',shareContentImg: imgValue,shareContentTitle: inputValue},}).then((data) => {
318
             message.info("保存成功")
287
             message.info("保存成功")
319
           }).catch((err) => {
288
           }).catch((err) => {
320
             message.info(err.msg || err.message)
289
             message.info(err.msg || err.message)
321
           })
290
           })
322
          }else{
291
          }else{
323
-          request({
324
-            url: '/api/admin/shareContent',
325
-            method: 'POST',
326
-            data: {targetId: dynamicId,shareContentType: 'activity',shareContentImg: imgValue,shareContentTitle: inputValue},
327
-          }).then((data) => {
292
+          request({ ...apis.activity.addShareContent, data: {targetId: dynamicId,shareContentType: 'activity',shareContentImg: imgValue,shareContentTitle: inputValue},}).then((data) => {
328
             setShareContentId(data.shareContentId)
293
             setShareContentId(data.shareContentId)
329
             message.info("保存成功")
294
             message.info("保存成功")
330
           }).catch((err) => {
295
           }).catch((err) => {

+ 401
- 0
src/pages/building/list/add/amap.css 查看文件

1
+html {
2
+  font-size: 12px;
3
+}
4
+.amap-copyright {
5
+  box-sizing: content-box;
6
+}
7
+* {
8
+  box-sizing: border-box;
9
+}
10
+.input-textarea {
11
+  color: grey;
12
+  height: 8em;
13
+  overflow: auto;
14
+  border-radius: 0.4rem;
15
+  border: 1px solid #ced4da;
16
+  margin-bottom: 1rem;
17
+}
18
+body {
19
+  margin: 0;
20
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
21
+  line-height: 1.5;
22
+  font-weight: 300;
23
+  color: #111213;
24
+}
25
+hr {
26
+  margin: 0.5rem 0;
27
+  box-sizing: content-box;
28
+  height: 0;
29
+  overflow: visible;
30
+  border: 0;
31
+  border-top: 1px solid rgba(0, 0, 0, 0.1);
32
+}
33
+p {
34
+  margin-top: 0;
35
+  margin-bottom: 0;
36
+}
37
+label {
38
+  display: inline-block;
39
+  margin-bottom: 0.4rem;
40
+}
41
+label,
42
+.btn {
43
+  margin-left: 0;
44
+  font-size: 1rem;
45
+}
46
+button,
47
+input,
48
+select {
49
+  margin: 0;
50
+  font-family: inherit;
51
+  font-size: inherit;
52
+  line-height: inherit;
53
+  overflow: visible;
54
+  text-transform: none;
55
+}
56
+[type=button]::-moz-focus-inner,
57
+[type=reset]::-moz-focus-inner,
58
+[type=submit]::-moz-focus-inner,
59
+button::-moz-focus-inner {
60
+  padding: 0;
61
+  border-style: none;
62
+}
63
+input[type=checkbox],
64
+input[type=radio] {
65
+  -webkit-box-sizing: border-box;
66
+  box-sizing: border-box;
67
+  padding: 0;
68
+  margin: 0 0.5rem 0 0;
69
+}
70
+h4 {
71
+  font-family: inherit;
72
+  line-height: 1.8;
73
+  font-weight: 300;
74
+  color: inherit;
75
+  font-size: 1.1rem;
76
+  margin-top: 0;
77
+  margin-bottom: 0.5rem;
78
+}
79
+.btn {
80
+  display: inline-block;
81
+  font-weight: 400;
82
+  text-align: center;
83
+  white-space: nowrap;
84
+  vertical-align: middle;
85
+  -webkit-user-select: none;
86
+  -moz-user-select: none;
87
+  -ms-user-select: none;
88
+  user-select: none;
89
+  border: 1px solid transparent;
90
+  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
91
+  background-color: transparent;
92
+  background-image: none;
93
+  color: #25A5F7;
94
+  border-color: #25A5F7;
95
+  padding: .25rem .5rem;
96
+  line-height: 1.5;
97
+  border-radius: 1rem;
98
+  -webkit-appearance: button;
99
+  cursor: pointer;
100
+}
101
+.btn:hover {
102
+  color: #fff;
103
+  background-color: #25A5F7;
104
+  border-color: #25A5F7;
105
+}
106
+.btn:hover {
107
+  text-decoration: none;
108
+}
109
+.input-item {
110
+  position: relative;
111
+  display: -ms-flexbox;
112
+  display: flex;
113
+  -ms-flex-wrap: wrap;
114
+  flex-wrap: wrap;
115
+  -ms-flex-align: center;
116
+  align-items: center;
117
+  width: 100%;
118
+  height: 3rem;
119
+}
120
+.input-item:last-child {
121
+  margin-bottom: 0;
122
+}
123
+.input-item > select,
124
+.input-item > input[type=text],
125
+.input-item > input[type=date] {
126
+  position: relative;
127
+  -ms-flex: 1 1 auto;
128
+  flex: 1 1 auto;
129
+  width: 1%;
130
+  margin-bottom: 0;
131
+}
132
+.input-item > select:not(:last-child),
133
+.input-item > input[type=text]:not(:last-child),
134
+.input-item > input[type=date]:not(:last-child) {
135
+  border-top-right-radius: 0;
136
+  border-bottom-right-radius: 0;
137
+}
138
+.input-item > select:not(:first-child),
139
+.input-item > input[type=text]:not(:first-child),
140
+.input-item > input[type=date]:not(:first-child) {
141
+  border-top-left-radius: 0;
142
+  border-bottom-left-radius: 0;
143
+}
144
+.input-item-prepend {
145
+  margin-right: -1px;
146
+}
147
+.input-item-text,
148
+input[type=text],
149
+input[type=date],
150
+select {
151
+  height: calc(4.2rem);
152
+}
153
+.input-item-text {
154
+  width: 6rem;
155
+  text-align: justify;
156
+  padding: 0.4rem 0.7rem;
157
+  display: inline-block;
158
+  text-justify: distribute-all-lines;
159
+  /*ie6-8*/
160
+  text-align-last: justify;
161
+  /* ie9*/
162
+  -moz-text-align-last: justify;
163
+  /*ff*/
164
+  -webkit-text-align-last: justify;
165
+  /*chrome 20+*/
166
+  -ms-flex-align: center;
167
+  align-items: center;
168
+  margin-bottom: 0;
169
+  font-size: 1rem;
170
+  font-weight: 400;
171
+  line-height: 1.5;
172
+  color: #495057;
173
+  text-align: center;
174
+  white-space: nowrap;
175
+  background-color: #e9ecef;
176
+  border: 1px solid #ced4da;
177
+  border-radius: .25rem;
178
+  border-bottom-right-radius: 0;
179
+  border-top-right-radius: 0;
180
+}
181
+.input-item-text input[type=checkbox],
182
+.input-item-text input[type=radio] {
183
+  margin-top: 0;
184
+}
185
+.input-card {
186
+  display: flex;
187
+  flex-direction: column;
188
+  min-width: 0;
189
+  word-wrap: break-word;
190
+  background-color: #fff;
191
+  background-clip: border-box;
192
+  border-radius: .25rem;
193
+  width: 22rem;
194
+  border-width: 0;
195
+  border-radius: 0.4rem;
196
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, 0.5);
197
+  position: fixed;
198
+  bottom: 1rem;
199
+  right: 1rem;
200
+  -ms-flex: 1 1 auto;
201
+  flex: 1 1 auto;
202
+  padding: 0.75rem 1.25rem;
203
+}
204
+.input-text {
205
+  line-height: 2rem;
206
+  margin-right: 2rem;
207
+}
208
+.info hr {
209
+  margin-right: 0;
210
+  margin-left: 0;
211
+  border-top-color: grey;
212
+}
213
+.info {
214
+  padding: .75rem 1.25rem;
215
+  margin-bottom: 1rem;
216
+  border-radius: .25rem;
217
+  position: fixed;
218
+  top: 1rem;
219
+  background-color: white;
220
+  width: auto;
221
+  min-width: 22rem;
222
+  border-width: 0;
223
+  right: 1rem;
224
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, 0.5);
225
+  position: absolute;
226
+  z-index: 100;
227
+}
228
+.code {
229
+  left: 1.5rem;
230
+  right: 1.5rem;
231
+  top: 1.5rem;
232
+  bottom: 1.5rem;
233
+  overflow: auto;
234
+  margin-bottom: 0rem;
235
+}
236
+.code .btn {
237
+  top: 1rem;
238
+  position: absolute;
239
+  right: 1rem;
240
+}
241
+.code .result {
242
+  border: 1px solid rgba(0, 0, 0, 0.1);
243
+  border-radius: 0.5rem;
244
+  padding: 1rem;
245
+  bottom: 1rem;
246
+  position: absolute;
247
+  top: 5.5rem;
248
+  right: 1rem;
249
+  left: 1rem;
250
+  overflow: auto;
251
+}
252
+.code .status {
253
+  color: #80adff;
254
+  display: inline-block;
255
+  font-size: 14px;
256
+}
257
+.code h4 {
258
+  display: inline-block;
259
+  max-width: 20rem;
260
+  margin-right: 1rem;
261
+  margin-bottom: 1rem;
262
+}
263
+select,
264
+input[type=text],
265
+input[type=date] {
266
+  display: inline-block;
267
+  width: 100%;
268
+  padding: .375rem 1.75rem .375rem .75rem;
269
+  line-height: 1.5;
270
+  color: #495057;
271
+  vertical-align: middle;
272
+  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
273
+  background-size: 8px 10px;
274
+  border: 1px solid #ced4da;
275
+  border-radius: .25rem;
276
+  -webkit-appearance: none;
277
+  -moz-appearance: none;
278
+  appearance: none;
279
+}
280
+input[type=text],
281
+input[type=date] {
282
+  background: #fff;
283
+  padding: .375rem .75rem;
284
+}
285
+select:focus,
286
+input[type=text]:focus,
287
+input[type=date]:focus {
288
+  border-color: #80bdff;
289
+  outline: 0;
290
+  box-shadow: 0 0 0 0.1rem rgba(128, 189, 255, 0.1);
291
+}
292
+.btn:focus {
293
+  outline: 0;
294
+  box-shadow: none;
295
+}
296
+select:focus::-ms-value,
297
+input[type=text]:focus::-ms-value,
298
+input[type=date]:focus::-ms-value {
299
+  color: #495057;
300
+  background-color: #fff;
301
+}
302
+/* native toastr */
303
+.native-toast {
304
+  position: fixed;
305
+  background-color: rgba(50, 50, 50, 0.8);
306
+  border-radius: 33px;
307
+  color: white;
308
+  left: 50%;
309
+  text-align: center;
310
+  padding: 6px 12px;
311
+  opacity: 0;
312
+  z-index: 99999;
313
+  transition: transform .25s, opacity .25s, top .25s;
314
+  box-sizing: border-box;
315
+}
316
+.native-toast-bottom {
317
+  bottom: 50px;
318
+  -ms-transform: translateX(-50%) translateY(50px);
319
+  transform: translateX(-50%) translateY(50px);
320
+}
321
+.native-toast-bottom.native-toast-shown {
322
+  opacity: 1;
323
+  -ms-transform: translateX(-50%) translateY(0);
324
+  transform: translateX(-50%) translateY(0);
325
+}
326
+.native-toast-bottom.native-toast-edge {
327
+  bottom: 0;
328
+}
329
+.native-toast-top {
330
+  top: 50px;
331
+  -ms-transform: translateX(-50%) translateY(-50px);
332
+  transform: translateX(-50%) translateY(-50px);
333
+}
334
+.native-toast-top.native-toast-shown {
335
+  opacity: 1;
336
+  -ms-transform: translateX(-50%) translateY(0);
337
+  transform: translateX(-50%) translateY(0);
338
+}
339
+.native-toast-top.native-toast-edge {
340
+  top: 0;
341
+}
342
+.native-toast-center {
343
+  top: 0;
344
+  -ms-transform: translateX(-50%) translateY(-50px);
345
+  transform: translateX(-50%) translateY(-50px);
346
+}
347
+.native-toast-center.native-toast-shown {
348
+  opacity: 1;
349
+  top: 50%;
350
+  -ms-transform: translateX(-50%) translateY(-50%);
351
+  transform: translateX(-50%) translateY(-50%);
352
+}
353
+.native-toast-edge {
354
+  border-radius: 0;
355
+  width: 100%;
356
+  text-align: left;
357
+}
358
+@media screen and (min-width: 40rem) {
359
+  .native-toast:not(.native-toast-edge) {
360
+    max-width: 18rem;
361
+  }
362
+}
363
+/*
364
+  max-width does not seem to work in small screen?
365
+*/
366
+/*@media screen and (max-width: 768px) {
367
+  .native-toast:not(.native-toast-edge) {
368
+    max-width: 400px;
369
+  }
370
+}
371
+
372
+@media screen and (max-width: 468px) {
373
+  .native-toast:not(.native-toast-edge) {
374
+    max-width: 300px;
375
+  }
376
+}*/
377
+/* types */
378
+.native-toast-error {
379
+  background-color: #d92727;
380
+  color: white;
381
+}
382
+.native-toast-success {
383
+  background-color: #62a465;
384
+  color: white;
385
+}
386
+.native-toast-warning {
387
+  background-color: #fdaf17;
388
+  color: white;
389
+}
390
+.native-toast-info {
391
+  background-color: #5060ba;
392
+  color: white;
393
+}
394
+[class^="native-toast-icon-"] {
395
+  vertical-align: middle;
396
+  margin-right: 8px;
397
+}
398
+[class^="native-toast-icon-"] svg {
399
+  width: 16px;
400
+  height: 16px;
401
+}

+ 434
- 0
src/pages/building/list/add/amap.less 查看文件

1
+html {
2
+  font-size: 12px;
3
+}
4
+.amap-copyright{
5
+  box-sizing: content-box
6
+}
7
+* {
8
+  box-sizing: border-box
9
+}
10
+.input-textarea{
11
+   color:grey;
12
+   height:8em;
13
+   overflow:auto;
14
+   border-radius:0.4rem;
15
+   border:1px solid #ced4da;
16
+   margin-bottom:1rem;
17
+}
18
+body {
19
+  margin: 0;
20
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
21
+  line-height: 1.5;
22
+  font-weight: 300;
23
+  color: #111213;
24
+}
25
+
26
+hr {
27
+  margin: 0.5rem 0;
28
+  box-sizing: content-box;
29
+  height: 0;
30
+  overflow: visible;
31
+  border: 0;
32
+  border-top: 1px solid rgba(0, 0, 0, .1)
33
+}
34
+
35
+p {
36
+  margin-top: 0;
37
+  margin-bottom: 0;
38
+}
39
+
40
+label {
41
+  display: inline-block;
42
+  margin-bottom: 0.4rem;
43
+}
44
+
45
+label, .btn {
46
+  margin-left: 0;
47
+  font-size: 1rem;
48
+}
49
+
50
+button, input, select {
51
+  margin: 0;
52
+  font-family: inherit;
53
+  font-size: inherit;
54
+  line-height: inherit;
55
+  overflow: visible;
56
+  text-transform: none
57
+}
58
+
59
+[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner {
60
+  padding: 0;
61
+  border-style: none;
62
+}
63
+
64
+input[type=checkbox], input[type=radio] {
65
+  box-sizing: border-box;
66
+  padding: 0;
67
+  -webkit-box-sizing: border-box;
68
+  box-sizing: border-box;
69
+  padding: 0;
70
+  margin: 0 0.5rem 0 0;
71
+}
72
+
73
+h4 {
74
+  font-family: inherit;
75
+  line-height: 1.8;
76
+  font-weight: 300;
77
+  color: inherit;
78
+  font-size: 1.1rem;
79
+  margin-top: 0;
80
+  margin-bottom: .5rem
81
+}
82
+
83
+.btn {
84
+  display: inline-block;
85
+  font-weight: 400;
86
+  text-align: center;
87
+  white-space: nowrap;
88
+  vertical-align: middle;
89
+  -webkit-user-select: none;
90
+  -moz-user-select: none;
91
+  -ms-user-select: none;
92
+  user-select: none;
93
+  border: 1px solid transparent;
94
+  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
95
+  background-color: transparent;
96
+  background-image: none;
97
+  color: #25A5F7;
98
+  border-color: #25A5F7;
99
+  padding: .25rem .5rem;
100
+  line-height: 1.5;
101
+  border-radius: 1rem;
102
+  -webkit-appearance: button;
103
+  cursor:pointer;
104
+}
105
+
106
+.btn:hover {
107
+  color: #fff;
108
+  background-color: #25A5F7;
109
+  border-color: #25A5F7
110
+}
111
+
112
+.btn:hover {
113
+  text-decoration: none
114
+}
115
+
116
+.input-item {
117
+  position: relative;
118
+  display: -ms-flexbox;
119
+  display: flex;
120
+  -ms-flex-wrap: wrap;
121
+  flex-wrap: wrap;
122
+  -ms-flex-align: center;
123
+  align-items: center;
124
+  width: 100%;
125
+  height: 3rem;
126
+}
127
+
128
+.input-item:last-child {
129
+  margin-bottom: 0;
130
+}
131
+
132
+.input-item>select, .input-item>input[type=text], .input-item>input[type=date] {
133
+  position: relative;
134
+  -ms-flex: 1 1 auto;
135
+  flex: 1 1 auto;
136
+  width: 1%;
137
+  margin-bottom: 0;
138
+}
139
+
140
+.input-item>select:not(:last-child), .input-item>input[type=text]:not(:last-child), .input-item>input[type=date]:not(:last-child) {
141
+  border-top-right-radius: 0;
142
+  border-bottom-right-radius: 0
143
+}
144
+
145
+.input-item>select:not(:first-child), .input-item>input[type=text]:not(:first-child), .input-item>input[type=date]:not(:first-child) {
146
+  border-top-left-radius: 0;
147
+  border-bottom-left-radius: 0
148
+}
149
+
150
+.input-item-prepend {
151
+  margin-right: -1px;
152
+}
153
+
154
+.input-item-text, input[type=text],input[type=date], select {
155
+  height: calc(2.2rem + 2px);
156
+}
157
+
158
+.input-item-text {
159
+  width: 6rem;
160
+  text-align: justify;
161
+  padding: 0.4rem 0.7rem;
162
+  display: inline-block;
163
+  text-justify: distribute-all-lines;
164
+  /*ie6-8*/
165
+  text-align-last: justify;
166
+  /* ie9*/
167
+  -moz-text-align-last: justify;
168
+  /*ff*/
169
+  -webkit-text-align-last: justify;
170
+  /*chrome 20+*/
171
+  -ms-flex-align: center;
172
+  align-items: center;
173
+  margin-bottom: 0;
174
+  font-size: 1rem;
175
+  font-weight: 400;
176
+  line-height: 1.5;
177
+  color: #495057;
178
+  text-align: center;
179
+  white-space: nowrap;
180
+  background-color: #e9ecef;
181
+  border: 1px solid #ced4da;
182
+  border-radius: .25rem;
183
+  border-bottom-right-radius: 0;
184
+  border-top-right-radius: 0;
185
+}
186
+
187
+.input-item-text input[type=checkbox], .input-item-text input[type=radio] {
188
+  margin-top: 0
189
+}
190
+
191
+.input-card {
192
+  display: flex;
193
+  flex-direction: column;
194
+  min-width: 0;
195
+  word-wrap: break-word;
196
+  background-color: #fff;
197
+  background-clip: border-box;
198
+  border-radius: .25rem;
199
+  width: 22rem;
200
+  border-width: 0;
201
+  border-radius: 0.4rem;
202
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);
203
+  position: fixed;
204
+  bottom: 1rem;
205
+  right: 1rem;
206
+  -ms-flex: 1 1 auto;
207
+  flex: 1 1 auto;
208
+  padding: 0.75rem 1.25rem;
209
+}
210
+
211
+.input-text {
212
+  line-height: 2rem;
213
+  margin-right: 2rem;
214
+}
215
+
216
+.info hr {
217
+  margin-right: 0;
218
+  margin-left: 0;
219
+  border-top-color: grey;
220
+}
221
+
222
+.info {
223
+  padding: .75rem 1.25rem;
224
+  margin-bottom: 1rem;
225
+  border-radius: .25rem;
226
+  position: fixed;
227
+  top: 1rem;
228
+  background-color: white;
229
+  width: auto;
230
+  min-width: 22rem;
231
+  border-width: 0;
232
+  right: 1rem;
233
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);
234
+  position: absolute;
235
+  z-index: 100;
236
+}
237
+
238
+.code {
239
+  left: 1.5rem;
240
+  right: 1.5rem;
241
+  top: 1.5rem;
242
+  bottom: 1.5rem;
243
+  overflow: auto;
244
+  margin-bottom: 0rem;
245
+}
246
+
247
+.code .btn {
248
+  top: 1rem;
249
+  position: absolute;
250
+  right: 1rem;
251
+}
252
+
253
+.code .result {
254
+  border: 1px solid rgba(0, 0, 0, 0.1);
255
+  border-radius: 0.5rem;
256
+  padding: 1rem;
257
+  bottom: 1rem;
258
+  position: absolute;
259
+  top: 5.5rem;
260
+  right: 1rem;
261
+  left: 1rem;
262
+  overflow: auto;
263
+}
264
+
265
+.code .status {
266
+  color: #80adff;
267
+  display: inline-block;
268
+  font-size: 14px;
269
+}
270
+
271
+.code h4 {
272
+  display: inline-block;
273
+  max-width: 20rem;
274
+  margin-right: 1rem;
275
+  margin-bottom: 1rem;
276
+}
277
+
278
+select, input[type=text], input[type=date] {
279
+  display: inline-block;
280
+  width: 100%;
281
+  padding: .375rem 1.75rem .375rem .75rem;
282
+  line-height: 1.5;
283
+  color: #495057;
284
+  vertical-align: middle;
285
+  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;
286
+  background-size: 8px 10px;
287
+  border: 1px solid #ced4da;
288
+  border-radius: .25rem;
289
+  -webkit-appearance: none;
290
+  -moz-appearance: none;
291
+  appearance: none
292
+}
293
+
294
+input[type=text],input[type=date] {
295
+  background: #fff;
296
+  padding: .375rem .75rem;
297
+}
298
+
299
+select:focus, input[type=text]:focus, input[type=date]:focus {
300
+  border-color: #80bdff;
301
+  outline: 0;
302
+  box-shadow: 0 0 0 .1rem rgba(128, 189, 255, .1)
303
+}
304
+
305
+.btn:focus {
306
+  outline: 0;
307
+  box-shadow: none;
308
+}
309
+
310
+select:focus::-ms-value, input[type=text]:focus::-ms-value,input[type=date]:focus::-ms-value {
311
+  color: #495057;
312
+  background-color: #fff
313
+}
314
+
315
+
316
+/* native toastr */
317
+.native-toast {
318
+  position: fixed;
319
+  background-color: rgba(50, 50, 50, .8);
320
+  border-radius: 33px;
321
+  color: white;
322
+  left: 50%;
323
+  text-align: center;
324
+  padding: 6px 12px;
325
+  opacity: 0;
326
+  z-index: 99999;
327
+  transition: transform .25s, opacity .25s, top .25s;
328
+  box-sizing: border-box;
329
+}
330
+
331
+.native-toast-bottom {
332
+  bottom: 50px;
333
+  -ms-transform: translateX(-50%) translateY(50px);
334
+      transform: translateX(-50%) translateY(50px)
335
+}
336
+
337
+.native-toast-bottom.native-toast-shown {
338
+  opacity: 1;
339
+  -ms-transform: translateX(-50%) translateY(0);
340
+      transform: translateX(-50%) translateY(0);
341
+}
342
+
343
+.native-toast-bottom.native-toast-edge {
344
+  bottom: 0;
345
+}
346
+
347
+.native-toast-top {
348
+  top: 50px;
349
+  -ms-transform: translateX(-50%) translateY(-50px);
350
+      transform: translateX(-50%) translateY(-50px)
351
+}
352
+
353
+.native-toast-top.native-toast-shown {
354
+  opacity: 1;
355
+  -ms-transform: translateX(-50%) translateY(0);
356
+      transform: translateX(-50%) translateY(0);
357
+}
358
+
359
+.native-toast-top.native-toast-edge {
360
+  top: 0;
361
+}
362
+
363
+.native-toast-center {
364
+  top: 0;
365
+  -ms-transform: translateX(-50%) translateY(-50px);
366
+      transform: translateX(-50%) translateY(-50px)
367
+}
368
+
369
+.native-toast-center.native-toast-shown {
370
+  opacity: 1;
371
+  top: 50%;
372
+  -ms-transform: translateX(-50%) translateY(-50%);
373
+      transform: translateX(-50%) translateY(-50%);
374
+}
375
+
376
+.native-toast-edge {
377
+  border-radius: 0;
378
+  width: 100%;
379
+  text-align: left;
380
+}
381
+
382
+@media screen and (min-width: 40rem) {
383
+  .native-toast:not(.native-toast-edge) {
384
+    max-width: 18rem;
385
+  }
386
+}
387
+
388
+/*
389
+  max-width does not seem to work in small screen?
390
+*/
391
+
392
+/*@media screen and (max-width: 768px) {
393
+  .native-toast:not(.native-toast-edge) {
394
+    max-width: 400px;
395
+  }
396
+}
397
+
398
+@media screen and (max-width: 468px) {
399
+  .native-toast:not(.native-toast-edge) {
400
+    max-width: 300px;
401
+  }
402
+}*/
403
+
404
+/* types */
405
+
406
+.native-toast-error {
407
+  background-color: #d92727;
408
+  color: white;
409
+}
410
+
411
+.native-toast-success {
412
+  background-color: #62a465;
413
+  color: white;
414
+}
415
+
416
+.native-toast-warning {
417
+  background-color: #fdaf17;
418
+  color: white;
419
+}
420
+
421
+.native-toast-info {
422
+  background-color: #5060ba;
423
+  color: white;
424
+}
425
+
426
+[class^="native-toast-icon-"] {
427
+  vertical-align: middle;
428
+  margin-right: 8px
429
+}
430
+
431
+[class^="native-toast-icon-"] svg {
432
+  width: 16px;
433
+  height: 16px;
434
+}

+ 401
- 0
src/pages/building/list/add/amap.wxss 查看文件

1
+html {
2
+  font-size: 12px;
3
+}
4
+.amap-copyright {
5
+  box-sizing: content-box;
6
+}
7
+* {
8
+  box-sizing: border-box;
9
+}
10
+.input-textarea {
11
+  color: grey;
12
+  height: 8em;
13
+  overflow: auto;
14
+  border-radius: 0.4rem;
15
+  border: 1px solid #ced4da;
16
+  margin-bottom: 1rem;
17
+}
18
+body {
19
+  margin: 0;
20
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
21
+  line-height: 1.5;
22
+  font-weight: 300;
23
+  color: #111213;
24
+}
25
+hr {
26
+  margin: 0.5rem 0;
27
+  box-sizing: content-box;
28
+  height: 0;
29
+  overflow: visible;
30
+  border: 0;
31
+  border-top: 1px solid rgba(0, 0, 0, 0.1);
32
+}
33
+p {
34
+  margin-top: 0;
35
+  margin-bottom: 0;
36
+}
37
+label {
38
+  display: inline-block;
39
+  margin-bottom: 0.4rem;
40
+}
41
+label,
42
+.btn {
43
+  margin-left: 0;
44
+  font-size: 1rem;
45
+}
46
+button,
47
+input,
48
+select {
49
+  margin: 0;
50
+  font-family: inherit;
51
+  font-size: inherit;
52
+  line-height: inherit;
53
+  overflow: visible;
54
+  text-transform: none;
55
+}
56
+[type=button]::-moz-focus-inner,
57
+[type=reset]::-moz-focus-inner,
58
+[type=submit]::-moz-focus-inner,
59
+button::-moz-focus-inner {
60
+  padding: 0;
61
+  border-style: none;
62
+}
63
+input[type=checkbox],
64
+input[type=radio] {
65
+  -webkit-box-sizing: border-box;
66
+  box-sizing: border-box;
67
+  padding: 0;
68
+  margin: 0 0.5rem 0 0;
69
+}
70
+h4 {
71
+  font-family: inherit;
72
+  line-height: 1.8;
73
+  font-weight: 300;
74
+  color: inherit;
75
+  font-size: 1.1rem;
76
+  margin-top: 0;
77
+  margin-bottom: 0.5rem;
78
+}
79
+.btn {
80
+  display: inline-block;
81
+  font-weight: 400;
82
+  text-align: center;
83
+  white-space: nowrap;
84
+  vertical-align: middle;
85
+  -webkit-user-select: none;
86
+  -moz-user-select: none;
87
+  -ms-user-select: none;
88
+  user-select: none;
89
+  border: 1px solid transparent;
90
+  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
91
+  background-color: transparent;
92
+  background-image: none;
93
+  color: #25A5F7;
94
+  border-color: #25A5F7;
95
+  padding: .25rem .5rem;
96
+  line-height: 1.5;
97
+  border-radius: 1rem;
98
+  -webkit-appearance: button;
99
+  cursor: pointer;
100
+}
101
+.btn:hover {
102
+  color: #fff;
103
+  background-color: #25A5F7;
104
+  border-color: #25A5F7;
105
+}
106
+.btn:hover {
107
+  text-decoration: none;
108
+}
109
+.input-item {
110
+  position: relative;
111
+  display: -ms-flexbox;
112
+  display: flex;
113
+  -ms-flex-wrap: wrap;
114
+  flex-wrap: wrap;
115
+  -ms-flex-align: center;
116
+  align-items: center;
117
+  width: 100%;
118
+  height: 3rem;
119
+}
120
+.input-item:last-child {
121
+  margin-bottom: 0;
122
+}
123
+.input-item > select,
124
+.input-item > input[type=text],
125
+.input-item > input[type=date] {
126
+  position: relative;
127
+  -ms-flex: 1 1 auto;
128
+  flex: 1 1 auto;
129
+  width: 1%;
130
+  margin-bottom: 0;
131
+}
132
+.input-item > select:not(:last-child),
133
+.input-item > input[type=text]:not(:last-child),
134
+.input-item > input[type=date]:not(:last-child) {
135
+  border-top-right-radius: 0;
136
+  border-bottom-right-radius: 0;
137
+}
138
+.input-item > select:not(:first-child),
139
+.input-item > input[type=text]:not(:first-child),
140
+.input-item > input[type=date]:not(:first-child) {
141
+  border-top-left-radius: 0;
142
+  border-bottom-left-radius: 0;
143
+}
144
+.input-item-prepend {
145
+  margin-right: -1px;
146
+}
147
+.input-item-text,
148
+input[type=text],
149
+input[type=date],
150
+select {
151
+  height: calc(4.2rem);
152
+}
153
+.input-item-text {
154
+  width: 6rem;
155
+  text-align: justify;
156
+  padding: 0.4rem 0.7rem;
157
+  display: inline-block;
158
+  text-justify: distribute-all-lines;
159
+  /*ie6-8*/
160
+  text-align-last: justify;
161
+  /* ie9*/
162
+  -moz-text-align-last: justify;
163
+  /*ff*/
164
+  -webkit-text-align-last: justify;
165
+  /*chrome 20+*/
166
+  -ms-flex-align: center;
167
+  align-items: center;
168
+  margin-bottom: 0;
169
+  font-size: 1rem;
170
+  font-weight: 400;
171
+  line-height: 1.5;
172
+  color: #495057;
173
+  text-align: center;
174
+  white-space: nowrap;
175
+  background-color: #e9ecef;
176
+  border: 1px solid #ced4da;
177
+  border-radius: .25rem;
178
+  border-bottom-right-radius: 0;
179
+  border-top-right-radius: 0;
180
+}
181
+.input-item-text input[type=checkbox],
182
+.input-item-text input[type=radio] {
183
+  margin-top: 0;
184
+}
185
+.input-card {
186
+  display: flex;
187
+  flex-direction: column;
188
+  min-width: 0;
189
+  word-wrap: break-word;
190
+  background-color: #fff;
191
+  background-clip: border-box;
192
+  border-radius: .25rem;
193
+  width: 22rem;
194
+  border-width: 0;
195
+  border-radius: 0.4rem;
196
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, 0.5);
197
+  position: fixed;
198
+  bottom: 1rem;
199
+  right: 1rem;
200
+  -ms-flex: 1 1 auto;
201
+  flex: 1 1 auto;
202
+  padding: 0.75rem 1.25rem;
203
+}
204
+.input-text {
205
+  line-height: 2rem;
206
+  margin-right: 2rem;
207
+}
208
+.info hr {
209
+  margin-right: 0;
210
+  margin-left: 0;
211
+  border-top-color: grey;
212
+}
213
+.info {
214
+  padding: .75rem 1.25rem;
215
+  margin-bottom: 1rem;
216
+  border-radius: .25rem;
217
+  position: fixed;
218
+  top: 1rem;
219
+  background-color: white;
220
+  width: auto;
221
+  min-width: 22rem;
222
+  border-width: 0;
223
+  right: 1rem;
224
+  box-shadow: 0 2px 6px 0 rgba(114, 124, 245, 0.5);
225
+  position: absolute;
226
+  z-index: 100;
227
+}
228
+.code {
229
+  left: 1.5rem;
230
+  right: 1.5rem;
231
+  top: 1.5rem;
232
+  bottom: 1.5rem;
233
+  overflow: auto;
234
+  margin-bottom: 0rem;
235
+}
236
+.code .btn {
237
+  top: 1rem;
238
+  position: absolute;
239
+  right: 1rem;
240
+}
241
+.code .result {
242
+  border: 1px solid rgba(0, 0, 0, 0.1);
243
+  border-radius: 0.5rem;
244
+  padding: 1rem;
245
+  bottom: 1rem;
246
+  position: absolute;
247
+  top: 5.5rem;
248
+  right: 1rem;
249
+  left: 1rem;
250
+  overflow: auto;
251
+}
252
+.code .status {
253
+  color: #80adff;
254
+  display: inline-block;
255
+  font-size: 14px;
256
+}
257
+.code h4 {
258
+  display: inline-block;
259
+  max-width: 20rem;
260
+  margin-right: 1rem;
261
+  margin-bottom: 1rem;
262
+}
263
+select,
264
+input[type=text],
265
+input[type=date] {
266
+  display: inline-block;
267
+  width: 100%;
268
+  padding: .375rem 1.75rem .375rem .75rem;
269
+  line-height: 1.5;
270
+  color: #495057;
271
+  vertical-align: middle;
272
+  background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
273
+  background-size: 8px 10px;
274
+  border: 1px solid #ced4da;
275
+  border-radius: .25rem;
276
+  -webkit-appearance: none;
277
+  -moz-appearance: none;
278
+  appearance: none;
279
+}
280
+input[type=text],
281
+input[type=date] {
282
+  background: #fff;
283
+  padding: .375rem .75rem;
284
+}
285
+select:focus,
286
+input[type=text]:focus,
287
+input[type=date]:focus {
288
+  border-color: #80bdff;
289
+  outline: 0;
290
+  box-shadow: 0 0 0 0.1rem rgba(128, 189, 255, 0.1);
291
+}
292
+.btn:focus {
293
+  outline: 0;
294
+  box-shadow: none;
295
+}
296
+select:focus::-ms-value,
297
+input[type=text]:focus::-ms-value,
298
+input[type=date]:focus::-ms-value {
299
+  color: #495057;
300
+  background-color: #fff;
301
+}
302
+/* native toastr */
303
+.native-toast {
304
+  position: fixed;
305
+  background-color: rgba(50, 50, 50, 0.8);
306
+  border-radius: 33px;
307
+  color: white;
308
+  left: 50%;
309
+  text-align: center;
310
+  padding: 6px 12px;
311
+  opacity: 0;
312
+  z-index: 99999;
313
+  transition: transform .25s, opacity .25s, top .25s;
314
+  box-sizing: border-box;
315
+}
316
+.native-toast-bottom {
317
+  bottom: 50px;
318
+  -ms-transform: translateX(-50%) translateY(50px);
319
+  transform: translateX(-50%) translateY(50px);
320
+}
321
+.native-toast-bottom.native-toast-shown {
322
+  opacity: 1;
323
+  -ms-transform: translateX(-50%) translateY(0);
324
+  transform: translateX(-50%) translateY(0);
325
+}
326
+.native-toast-bottom.native-toast-edge {
327
+  bottom: 0;
328
+}
329
+.native-toast-top {
330
+  top: 50px;
331
+  -ms-transform: translateX(-50%) translateY(-50px);
332
+  transform: translateX(-50%) translateY(-50px);
333
+}
334
+.native-toast-top.native-toast-shown {
335
+  opacity: 1;
336
+  -ms-transform: translateX(-50%) translateY(0);
337
+  transform: translateX(-50%) translateY(0);
338
+}
339
+.native-toast-top.native-toast-edge {
340
+  top: 0;
341
+}
342
+.native-toast-center {
343
+  top: 0;
344
+  -ms-transform: translateX(-50%) translateY(-50px);
345
+  transform: translateX(-50%) translateY(-50px);
346
+}
347
+.native-toast-center.native-toast-shown {
348
+  opacity: 1;
349
+  top: 50%;
350
+  -ms-transform: translateX(-50%) translateY(-50%);
351
+  transform: translateX(-50%) translateY(-50%);
352
+}
353
+.native-toast-edge {
354
+  border-radius: 0;
355
+  width: 100%;
356
+  text-align: left;
357
+}
358
+@media screen and (min-width: 40rem) {
359
+  .native-toast:not(.native-toast-edge) {
360
+    max-width: 18rem;
361
+  }
362
+}
363
+/*
364
+  max-width does not seem to work in small screen?
365
+*/
366
+/*@media screen and (max-width: 768px) {
367
+  .native-toast:not(.native-toast-edge) {
368
+    max-width: 400px;
369
+  }
370
+}
371
+
372
+@media screen and (max-width: 468px) {
373
+  .native-toast:not(.native-toast-edge) {
374
+    max-width: 300px;
375
+  }
376
+}*/
377
+/* types */
378
+.native-toast-error {
379
+  background-color: #d92727;
380
+  color: white;
381
+}
382
+.native-toast-success {
383
+  background-color: #62a465;
384
+  color: white;
385
+}
386
+.native-toast-warning {
387
+  background-color: #fdaf17;
388
+  color: white;
389
+}
390
+.native-toast-info {
391
+  background-color: #5060ba;
392
+  color: white;
393
+}
394
+[class^="native-toast-icon-"] {
395
+  vertical-align: middle;
396
+  margin-right: 8px;
397
+}
398
+[class^="native-toast-icon-"] svg {
399
+  width: 16px;
400
+  height: 16px;
401
+}

+ 84
- 6
src/pages/building/list/add/components/amap.jsx 查看文件

1
 import React from 'react';
1
 import React from 'react';
2
 import ReactDOM from 'react-dom';
2
 import ReactDOM from 'react-dom';
3
-import { Map } from 'react-amap';
3
+import { Map, Marker } from 'react-amap';
4
+import '../amap.less'
4
 
5
 
5
 class Amap extends React.Component {
6
 class Amap extends React.Component {
6
   constructor(props) {
7
   constructor(props) {
7
-    super(props)
8
-    this.state = { coordinates: [] }
8
+    super(props);
9
+    this.amapEvents = {
10
+      created: mapInstance => {
11
+        console.log('高德地图 Map 实例创建成功;如果你要亲自对实例进行操作,可以从这里开始。比如:');
12
+        console.log(mapInstance.getZoom());
13
+        AMap.plugin(['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.CitySearch'], () => {
14
+          // 实例化Autocomplete
15
+          const autoOptions = {
16
+            // city 限定城市,默认全国
17
+            city: '全国',
18
+            // input 为绑定输入提示功能的input的DOM ID
19
+            input: 'amapInput',
20
+          }
21
+          const autoComplete = new AMap.Autocomplete(autoOptions);
22
+          // 无需再手动执行search方法,autoComplete会根据传入input对应的DOM动态触发search
23
+
24
+          const placeSearch = new AMap.PlaceSearch({
25
+            city: '南京',
26
+            map: mapInstance,
27
+          })
28
+          AMap.event.addListener(autoComplete, 'select', e => {
29
+            // TODO 针对选中的poi实现自己的功能
30
+            placeSearch.setCity(e.poi.adcode)
31
+            placeSearch.search(e.poi.name)
32
+          })
33
+
34
+
35
+          const citySearch = new AMap.CitySearch()
36
+          citySearch.getLocalCity((status, result) => {
37
+            if (status === 'complete' && result.info === 'OK') {
38
+              // 查询成功,result即为当前所在城市信息
39
+              console.log('当前所在城市:', result)
40
+              if (result && result.city && result.bounds) {
41
+                // 当前城市名称
42
+                // const cityinfo = result.city;
43
+
44
+                // 当前城市位置信息
45
+                const citybounds = result.bounds;
46
+                // document.getElementById('info').innerHTML = '您当前所在城市:'+cityinfo;
47
+                // 地图显示当前城市
48
+                mapInstance.setBounds(citybounds);
49
+            }
50
+            }
51
+          })
52
+        })
53
+
54
+        mapInstance.on('click', e => {
55
+          const lngLat = `${e.lnglat.getLng()},${e.lnglat.getLat()}`
56
+          console.log('坐标位置:', lngLat)
57
+          this.props.onChange(lngLat)
58
+        });
59
+      },
60
+    };
61
+    this.markerEvents = {
62
+      created: markerInstance => {
63
+        console.log('高德地图 Marker 实例创建成功;如果你要亲自对实例进行操作,可以从这里开始。比如:');
64
+        console.log(markerInstance.getPosition());
65
+
66
+        // 地理坐标位置定位
67
+        // markerInstance.setPosition();
68
+      },
69
+    }
70
+    this.markerPosition = { longitude: 120, latitude: 30 };
9
   }
71
   }
10
 
72
 
11
   render() {
73
   render() {
12
     return (
74
     return (
13
-      <div style={{ width: '100%', height: '400px' }}>
14
-        <Map amapkey="f0d1d4f82432504003ebf46e5e36ff03"/>
15
-      </div>
75
+      <>
76
+        <div style={{ width: '100%', height: '400px' }}>
77
+          <Map events={this.amapEvents} amapkey="f0d1d4f82432504003ebf46e5e36ff03">
78
+            <Marker position={this.markerPosition} events={this.markerEvents} />
79
+          </Map>
80
+          {
81
+              <div className="info">
82
+                <div className="input-item">
83
+                  <div className="input-item-prepend">
84
+                    <span className="input-item-text" style={{ width: '8rem' }}>请输入关键字</span>
85
+                  </div>
86
+                  <input id="amapInput" type="text" />
87
+                </div>
88
+            </div>
89
+            }
90
+        </div>
91
+      </>
16
     )
92
     )
17
   }
93
   }
18
 }
94
 }
19
 
95
 
96
+// f0d1d4f82432504003ebf46e5e36ff03
97
+
20
 export default Amap
98
 export default Amap

+ 2
- 2
src/pages/building/list/add/components/base.jsx 查看文件

125
           <Form.Item label="销售状态" hasFeedback>
125
           <Form.Item label="销售状态" hasFeedback>
126
             {getFieldDecorator('marketStatus')(<Input />)}
126
             {getFieldDecorator('marketStatus')(<Input />)}
127
           </Form.Item>
127
           </Form.Item>
128
-          <Form.Item label="标签" hasFeedback>
128
+          <Form.Item label="标签" hasFeedback style={{ display: 'none' }}>
129
             {getFieldDecorator('tags')(
129
             {getFieldDecorator('tags')(
130
               <Select mode="multiple" placeholder="标签" style={{ width: '1016px' }}>
130
               <Select mode="multiple" placeholder="标签" style={{ width: '1016px' }}>
131
                 <Option value="未知">未知</Option>
131
                 <Option value="未知">未知</Option>
178
             {getFieldDecorator('coordinate')(<Input disabled />)}
178
             {getFieldDecorator('coordinate')(<Input disabled />)}
179
           </Form.Item>
179
           </Form.Item>
180
           <Form.Item label="地图位置" hasFeedback>
180
           <Form.Item label="地图位置" hasFeedback>
181
-            {(<Amap />)}
181
+            {getFieldDecorator('coordinate')(<Amap />)}
182
           </Form.Item>
182
           </Form.Item>
183
           <Form.Item label="周边交通" hasFeedback>
183
           <Form.Item label="周边交通" hasFeedback>
184
             {getFieldDecorator('buildingTransport')(
184
             {getFieldDecorator('buildingTransport')(

+ 21
- 3
src/pages/building/list/add/components/poster.jsx 查看文件

13
 import poster1 from '../../../../../assets/poster1.png';
13
 import poster1 from '../../../../../assets/poster1.png';
14
 import poster2 from '../../../../../assets/poster2.png';
14
 import poster2 from '../../../../../assets/poster2.png';
15
 import Styles from '../style.less';
15
 import Styles from '../style.less';
16
+import apis from '../../../../../services/apis';
16
 
17
 
17
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
18
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
18
 const { TextArea } = Input;
19
 const { TextArea } = Input;
23
   const [imgValue, changeImg] = useState('')
24
   const [imgValue, changeImg] = useState('')
24
   const [posterId, setPosterId] = useState('')
25
   const [posterId, setPosterId] = useState('')
25
 
26
 
27
+  const [building, setBuilding] = useState({})
26
   const { buildingId } = props.building
28
   const { buildingId } = props.building
27
 
29
 
28
   if (buildingId) {
30
   if (buildingId) {
43
       }).catch(err => {
45
       }).catch(err => {
44
         message.info(err.msg || err.message)
46
         message.info(err.msg || err.message)
45
       })
47
       })
48
+
49
+      getById(buildingId)
46
     }, [])
50
     }, [])
47
   }
51
   }
48
 
52
 
53
+  // 获取详情信息
54
+  function getById(currentId) {
55
+    const { url, method } = apis.building.buildingGetById
56
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(currentId)
57
+
58
+    request({ url: tempUrl, method }).then(res => {
59
+      setBuilding(res)
60
+    })
61
+  }
62
+
49
   const submitPoster = () => {
63
   const submitPoster = () => {
50
     if (buildingId) {
64
     if (buildingId) {
51
       if (posterId) {
65
       if (posterId) {
81
         <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
95
         <div style={{ width: '375px', height: '785px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
82
           <img style={{ width: '100%', height: '300px' }} src={imgValue || poster1} alt="" />
96
           <img style={{ width: '100%', height: '300px' }} src={imgValue || poster1} alt="" />
83
 
97
 
84
-          <p className={Styles.tagLabel}><span>全朝南</span><span>品牌开发商</span><span>轨交房</span></p>
98
+          <p className={Styles.tagLabel}>
99
+            {
100
+              building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
101
+            }
102
+          </p>
85
           <p style={{
103
           <p style={{
86
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
104
             margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
87
             display: '-webkit-box', lineClamp: '3', height: '36px',lineHeight:'36px',
105
             display: '-webkit-box', lineClamp: '3', height: '36px',lineHeight:'36px',
89
             WebkitBoxOrient: 'vertical',
107
             WebkitBoxOrient: 'vertical',
90
             overflow: 'hidden',
108
             overflow: 'hidden',
91
             textOverflow: 'ellipsis',
109
             textOverflow: 'ellipsis',
92
-          }}>{inputValue || '海报标题'}</p>
93
-          <p style={{ color: '#999',padding:' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px',marginLeft:'6px' }}>41505</span><span style={{ color: '#fd0d0c', fontSize: '20px' }}>元/m²</span></p>
110
+          }}>{building.buildingName || '楼盘标题'}</p>
111
+          <p style={{ color: '#999',padding:' 0 20px' }}>约<span style={{ color: '#fd0d0c', fontSize: '24px',marginLeft:'6px' }}>{ building.price }</span><span style={{ color: '#fd0d0c', fontSize: '20px' }}>元/m²</span></p>
94
 
112
 
95
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
113
           <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
96
           <p style={{
114
           <p style={{

+ 5
- 21
src/pages/carouselFigure/advertisingList.jsx 查看文件

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
-
9
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
10
 import request from '../../utils/request'
11
 
11
 
12
 const { Option } = Select;
12
 const { Option } = Select;
22
 
22
 
23
   // 查询列表
23
   // 查询列表
24
   const getList = (params) => {
24
   const getList = (params) => {
25
-    request({
26
-        url: '/api/admin/extendContent',
27
-        method: 'GET',
28
-        params: { ...params },
29
-    }).then((data) => {
25
+    request({ ...apis.carsuseFigure.extendContent, params: { ...params },}).then((data) => {
30
         console.log(data)
26
         console.log(data)
31
         setData(data)
27
         setData(data)
32
     })
28
     })
97
           okText: '确定',
93
           okText: '确定',
98
           cancelText: '取消',
94
           cancelText: '取消',
99
           onOk() {
95
           onOk() {
100
-              request({
101
-                  url: '/api/admin/buildingDynamic/finish',
102
-                  method: 'PUT',
103
-                  data: {dynamicId: row.dynamicId, top: ""},
104
-              }).then((data) => {
96
+              request({ ...apis.carsuseFigure.finish, data: {dynamicId: row.dynamicId, top: ""},}).then((data) => {
105
                   console.log(data)
97
                   console.log(data)
106
                   message.info('操作成功!')
98
                   message.info('操作成功!')
107
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
99
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
123
           okText: '确定',
115
           okText: '确定',
124
           cancelText: '取消',
116
           cancelText: '取消',
125
           onOk() {
117
           onOk() {
126
-              request({
127
-                  url: '/api/admin/extendContent/'+row.contentId,
128
-                  method: 'PUT',
129
-                  data: row,
130
-              }).then((data) => {
118
+              request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
131
                   message.info('操作成功!')
119
                   message.info('操作成功!')
132
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
120
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
133
               }).catch((err) => {
121
               }).catch((err) => {
143
           okText: '确定',
131
           okText: '确定',
144
           cancelText: '取消',
132
           cancelText: '取消',
145
           onOk() {
133
           onOk() {
146
-              request({
147
-                  url: '/api/admin/extendContent/'+row.contentId,
148
-                  method: 'PUT',
149
-                  data: row,
150
-              }).then((data) => {
134
+              request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
151
                   message.info('操作成功!')
135
                   message.info('操作成功!')
152
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
136
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
153
               }).catch((err) => {
137
               }).catch((err) => {

+ 5
- 21
src/pages/carouselFigure/carouselFigureList.jsx 查看文件

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
-
9
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
10
 import request from '../../utils/request'
11
 
11
 
12
 const { Option } = Select;
12
 const { Option } = Select;
22
 
22
 
23
   // 查询列表
23
   // 查询列表
24
   const getList = (params) => {
24
   const getList = (params) => {
25
-    request({
26
-        url: '/api/admin/extendContent',
27
-        method: 'GET',
28
-        params: { ...params },
29
-    }).then((data) => {
25
+    request({ ...apis.carsuseFigure.extendContent, params: { ...params },}).then((data) => {
30
         console.log(data)
26
         console.log(data)
31
         setData(data)
27
         setData(data)
32
     })
28
     })
97
           okText: '确定',
93
           okText: '确定',
98
           cancelText: '取消',
94
           cancelText: '取消',
99
           onOk() {
95
           onOk() {
100
-              request({
101
-                  url: '/api/admin/buildingDynamic/finish',
102
-                  method: 'PUT',
103
-                  data: {dynamicId: row.dynamicId, top: ""},
104
-              }).then((data) => {
96
+            request({ ...apis.carsuseFigure.finish, data: {dynamicId: row.dynamicId, top: ""},}).then((data) => {
105
                   console.log(data)
97
                   console.log(data)
106
                   message.info('操作成功!')
98
                   message.info('操作成功!')
107
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
99
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
123
           okText: '确定',
115
           okText: '确定',
124
           cancelText: '取消',
116
           cancelText: '取消',
125
           onOk() {
117
           onOk() {
126
-              request({
127
-                  url: '/api/admin/extendContent/'+row.contentId,
128
-                  method: 'PUT',
129
-                  data: row,
130
-              }).then((data) => {
118
+            request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
131
                   message.info('操作成功!')
119
                   message.info('操作成功!')
132
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
120
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
133
               }).catch((err) => {
121
               }).catch((err) => {
143
           okText: '确定',
131
           okText: '确定',
144
           cancelText: '取消',
132
           cancelText: '取消',
145
           onOk() {
133
           onOk() {
146
-              request({
147
-                  url: '/api/admin/extendContent/'+row.contentId,
148
-                  method: 'PUT',
149
-                  data: row,
150
-              }).then((data) => {
134
+            request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
151
                   message.info('操作成功!')
135
                   message.info('操作成功!')
152
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
136
                   getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
153
               }).catch((err) => {
137
               }).catch((err) => {

+ 4
- 14
src/pages/carouselFigure/editAdvertising.jsx 查看文件

7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import XForm, { FieldTypes } from '../../components/XForm';
8
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
11
 import request from '../../utils/request'
11
 
12
 
12
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
27
 
28
 
28
   // 查询列表
29
   // 查询列表
29
   const getDetail = (contentId) => {
30
   const getDetail = (contentId) => {
30
-    request({
31
-        url: '/api/admin/extendContent/' + contentId,
32
-        method: 'GET',
33
-    }).then((data) => {
31
+    request({ ...apis.carsuseFigure.getExtendContent,urlData:{id: contentId}}).then((data) => {
34
         console.log(data)
32
         console.log(data)
35
         setData(data)
33
         setData(data)
36
     })
34
     })
123
     const handleSubmit = val => { 
121
     const handleSubmit = val => { 
124
       val.showType = 'screen'
122
       val.showType = 'screen'
125
       if(contentId){
123
       if(contentId){
126
-        request({
127
-          url: '/api/admin/extendContent/'+contentId,
128
-          method: 'PUT',
129
-          data: val,
130
-        }).then((data) => {
124
+        request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: contentId}, data: val,}).then((data) => {
131
           cancelPage()
125
           cancelPage()
132
         }).catch((err) => {
126
         }).catch((err) => {
133
           message.info(err.msg || err.message)
127
           message.info(err.msg || err.message)
134
         })
128
         })
135
       }else{
129
       }else{
136
-        request({
137
-          url: '/api/admin/extendContent',
138
-          method: 'POST',
139
-          data: val,
140
-        }).then((data) => {
130
+        request({ ...apis.carsuseFigure.addExtendContent, data: val,}).then((data) => {
141
           cancelPage()
131
           cancelPage()
142
         }).catch((err) => {
132
         }).catch((err) => {
143
           message.info(err.msg || err.message)
133
           message.info(err.msg || err.message)

+ 4
- 14
src/pages/carouselFigure/editCarousel.jsx 查看文件

7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import XForm, { FieldTypes } from '../../components/XForm';
8
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
11
 import request from '../../utils/request'
11
 
12
 
12
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
27
 
28
 
28
   // 查询列表
29
   // 查询列表
29
   const getDetail = (contentId) => {
30
   const getDetail = (contentId) => {
30
-    request({
31
-        url: '/api/admin/extendContent/' + contentId,
32
-        method: 'GET',
33
-    }).then((data) => {
31
+    request({ ...apis.carsuseFigure.getExtendContent,urlData:{id: contentId}}).then((data) => {
34
         console.log(data)
32
         console.log(data)
35
         setData(data)
33
         setData(data)
36
     })
34
     })
123
     const handleSubmit = val => { 
121
     const handleSubmit = val => { 
124
       val.showType = 'banner'
122
       val.showType = 'banner'
125
       if(contentId){
123
       if(contentId){
126
-        request({
127
-          url: '/api/admin/extendContent/'+contentId,
128
-          method: 'PUT',
129
-          data: val,
130
-        }).then((data) => {
124
+        request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: contentId}, data: val,}).then((data) => {
131
           cancelPage()
125
           cancelPage()
132
         }).catch((err) => {
126
         }).catch((err) => {
133
           message.info(err.msg || err.message)
127
           message.info(err.msg || err.message)
134
         })
128
         })
135
       }else{
129
       }else{
136
-        request({
137
-          url: '/api/admin/extendContent',
138
-          method: 'POST',
139
-          data: val,
140
-        }).then((data) => {
130
+        request({ ...apis.carsuseFigure.addExtendContent, data: val,}).then((data) => {
141
           cancelPage()
131
           cancelPage()
142
         }).catch((err) => {
132
         }).catch((err) => {
143
           message.info(err.msg || err.message)
133
           message.info(err.msg || err.message)

+ 3
- 11
src/pages/integralMall/GoodsList.jsx 查看文件

4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import BuildSelect from '../../components/SelectButton/BuildSelect'
6
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
-
7
+import apis from '../../services/apis';
8
 import request from '../../utils/request'
8
 import request from '../../utils/request'
9
 
9
 
10
 const { Option } = Select;
10
 const { Option } = Select;
20
 
20
 
21
   // 查询列表
21
   // 查询列表
22
   const getList = (params) => {
22
   const getList = (params) => {
23
-    request({
24
-        url: '/api/admin/taGoods',
25
-        method: 'GET',
26
-        params: { ...params },
27
-    }).then((data) => {
23
+    request({ ...apis.integralMall.getTaGoods, params: { ...params },}).then((data) => {
28
         console.log(data)
24
         console.log(data)
29
         setData(data)
25
         setData(data)
30
     })
26
     })
62
       okText: '确认',
58
       okText: '确认',
63
       cancelText: '取消',
59
       cancelText: '取消',
64
       onOk() {
60
       onOk() {
65
-        request({
66
-          url: '/api/admin/taGoods/change',
67
-          method: 'PUT',
68
-          data: { ...row },
69
-        }).then((data) => {
61
+        request({ ...apis.integralMall.changeTaGoods, data: { ...row },}).then((data) => {
70
           message.info('操作成功!')
62
           message.info('操作成功!')
71
           getList({ pageNum: 1, pageSize: 10 });
63
           getList({ pageNum: 1, pageSize: 10 });
72
         })
64
         })

+ 3
- 10
src/pages/integralMall/achieve.jsx 查看文件

5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
+import apis from '../../services/apis';
8
 import request from '../../utils/request'
9
 import request from '../../utils/request'
9
 
10
 
10
 const { TabPane } = Tabs;
11
 const { TabPane } = Tabs;
28
 
29
 
29
 // 查询列表
30
 // 查询列表
30
 const getList = (params) => {
31
 const getList = (params) => {
31
-  request({
32
-      url: '/api/admin/tdPointsRules',
33
-      method: 'GET',
34
-      params: { ...params },
35
-  }).then((data) => {
32
+  request({ ...apis.integralMall.tdPointsRules, params: { ...params },}).then((data) => {
36
       console.log(data)
33
       console.log(data)
37
       setData(data)
34
       setData(data)
38
   })
35
   })
54
   }
51
   }
55
 
52
 
56
   const changeStatus = (row) => () => {
53
   const changeStatus = (row) => () => {
57
-    request({
58
-      url: '/api/admin/tdPointsRules/change',
59
-      method: 'PUT',
60
-      data: { ...row },
61
-    }).then((data) => {
54
+    request({ ...apis.integralMall.change, data: { ...row },}).then((data) => {
62
       message.info('操作成功!')
55
       message.info('操作成功!')
63
       getList({ pageNum: 1, pageSize: 10, type: carType})
56
       getList({ pageNum: 1, pageSize: 10, type: carType})
64
     })
57
     })

+ 4
- 14
src/pages/integralMall/editGoods.jsx 查看文件

6
 import XForm, { FieldTypes } from '../../components/XForm';
6
 import XForm, { FieldTypes } from '../../components/XForm';
7
 import Wangedit from '../../components/Wangedit/Wangedit'
7
 import Wangedit from '../../components/Wangedit/Wangedit'
8
 import router from 'umi/router';
8
 import router from 'umi/router';
9
+import apis from '../../services/apis';
9
 import request from '../../utils/request'
10
 import request from '../../utils/request'
10
 
11
 
11
 const { TextArea } = Input;
12
 const { TextArea } = Input;
21
 
22
 
22
   // 查询列表
23
   // 查询列表
23
   const getGoodsData = (goodsId) => {
24
   const getGoodsData = (goodsId) => {
24
-    request({
25
-        url: '/api/admin/taGoods/' + goodsId,
26
-        method: 'GET',
27
-    }).then((data) => {
25
+    request({ ...apis.integralMall.taGoods, urlData: { id: goodsId },}).then((data) => {
28
         console.log(data)
26
         console.log(data)
29
         setGoodsData(data)
27
         setGoodsData(data)
30
     })
28
     })
111
   const handleSubmit = (values) => {
109
   const handleSubmit = (values) => {
112
     if(goodsId){
110
     if(goodsId){
113
       values.goodsId = goodsId
111
       values.goodsId = goodsId
114
-      request({
115
-        url: '/api/admin/taGoods',
116
-        method: 'PUT',
117
-        data: values,
118
-      }).then((data) => {
112
+      request({ ...apis.integralMall.updateTaGoods, data: values,}).then((data) => {
119
         cancelPage()
113
         cancelPage()
120
       }).catch((err) => {
114
       }).catch((err) => {
121
         message.info(err.msg || err.message)
115
         message.info(err.msg || err.message)
122
       })
116
       })
123
       }else{
117
       }else{
124
-      request({
125
-        url: '/api/admin/taGoods/add',
126
-        method: 'POST',
127
-        data: values,
128
-      }).then((data) => {
118
+      request({ ...apis.integralMall.addTaGoods, data: values,}).then((data) => {
129
         cancelPage()
119
         cancelPage()
130
       }).catch((err) => {
120
       }).catch((err) => {
131
         message.info(err.msg || err.message)
121
         message.info(err.msg || err.message)

+ 2
- 6
src/pages/integralMall/exchangeRecords.jsx 查看文件

5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
-
8
+import apis from '../../services/apis';
9
 import request from '../../utils/request'
9
 import request from '../../utils/request'
10
 
10
 
11
 /**
11
 /**
27
 
27
 
28
   // 查询列表
28
   // 查询列表
29
   const getList = (params) => {
29
   const getList = (params) => {
30
-    request({
31
-        url: '/api/admin/taPointsExchange',
32
-        method: 'GET',
33
-        params: { ...params },
34
-    }).then((data) => {
30
+    request({ ...apis.integralMall.taPointsExchange, params: { ...params },}).then((data) => {
35
         setData(data)
31
         setData(data)
36
     })
32
     })
37
   }
33
   }

+ 3
- 11
src/pages/integralMall/verifyList.jsx 查看文件

4
 import styles from '../style/GoodsList.less';
4
 import styles from '../style/GoodsList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
 import moment from 'moment';
6
 import moment from 'moment';
7
-
7
+import apis from '../../services/apis';
8
 import request from '../../utils/request'
8
 import request from '../../utils/request'
9
 
9
 
10
 const { Option } = Select;
10
 const { Option } = Select;
19
 
19
 
20
   // 查询列表
20
   // 查询列表
21
   const getVerifyList = (params) => {
21
   const getVerifyList = (params) => {
22
-    request({
23
-      url: '/api/admin/taPointsExchange',
24
-      method: 'GET',
25
-      params: { ...params },
26
-    }).then((data) => {
22
+    request({ ...apis.integralMall.taPointsExchange, params: { ...params },}).then((data) => {
27
         setData(data)
23
         setData(data)
28
     })
24
     })
29
   }
25
   }
39
   }
35
   }
40
 
36
 
41
   const changeStatus = (row) => () => {
37
   const changeStatus = (row) => () => {
42
-    request({
43
-      url: '/api/admin/taPointsExchange/change',
44
-      method: 'PUT',
45
-      data: row
46
-    }).then((data) => {
38
+    request({ ...apis.integralMall.changeTaPointsExchange, data: row}).then((data) => {
47
         message.info("操作成功")
39
         message.info("操作成功")
48
         getVerifyList({ pageNum: pageNumber, pageSize: 10, phone: props.location.query.telValue })
40
         getVerifyList({ pageNum: pageNumber, pageSize: 10, phone: props.location.query.telValue })
49
     })
41
     })

+ 37
- 24
src/pages/staff/list/StaffList.jsx 查看文件

5
 import styles from '../../style/GoodsList.less';
5
 import styles from '../../style/GoodsList.less';
6
 import router from 'umi/router';
6
 import router from 'umi/router';
7
 import { Card, Avatar } from 'antd';
7
 import { Card, Avatar } from 'antd';
8
+import apis from '../../../services/apis';
8
 import request from '../../../utils/request'
9
 import request from '../../../utils/request'
9
 import Styles from './style.less';
10
 import Styles from './style.less';
10
 
11
 
22
   });
23
   });
23
 }
24
 }
24
 
25
 
26
+
25
 /**
27
 /**
26
  *卡片
28
  *卡片
27
  *
29
  *
30
 const CartBody = (props) => {
32
 const CartBody = (props) => {
31
   const { data } = props
33
   const { data } = props
32
 
34
 
33
-  const confirm = () => {
34
-    Modal.confirm({
35
-      title: '确认停用该角色?',
36
-      okText: '确认',
37
-      cancelText: '取消',
38
-      onOk() {
39
-        console.log('OK');
40
-      },
41
-      onCancel() {
42
-        console.log('Cancel');
43
-      },
44
-    });
35
+  const confirm = (data) => () => {
36
+    console.log(data,"11111")
37
+    if(data.status === 1){
38
+      Modal.confirm({
39
+        title: '确认停用该角色?',
40
+        okText: '确认',
41
+        cancelText: '取消',
42
+        onOk() {
43
+          request({ ...apis.staff.change, urlData: {id:data.userId,type:'off'}}).then((data) => {
44
+            message.info("操作成功")
45
+            props.onFresh()
46
+          })
47
+        }
48
+      });
49
+    }else{
50
+      Modal.confirm({
51
+        title: '确认启用该角色?',
52
+        okText: '确认',
53
+        cancelText: '取消',
54
+        onOk() {
55
+          request({ ...apis.staff.change, urlData: {id:data.userId,type:'on'}}).then((data) => {
56
+            message.info("操作成功")
57
+            props.onFresh()
58
+          })
59
+        }
60
+      });
61
+    }
62
+    
45
   }
63
   }
46
   return (
64
   return (
47
 
65
 
53
           编辑
71
           编辑
54
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
72
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
55
         </Button>
73
         </Button>
56
-        <Button type="link" style={{ fontSize: '18px', color: '#cacaca', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
57
-          停用
74
+        <Button type="link" style={{ fontSize: '18px', color: '#cacaca', position: 'absolute', top: '50px', right: '0' }} onClick={confirm(data)}>
75
+          {data.status === 1 ? '停用' : '启用'}
58
                 <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
76
                 <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
59
         </Button>
77
         </Button>
60
-        <Button type="link" style={{ fontSize: '18px', color: '#FF925C', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
78
+        {/* <Button type="link" style={{ fontSize: '18px', color: '#FF925C', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
61
           启用
79
           启用
62
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
80
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
63
-        </Button>
81
+        </Button> */}
64
 
82
 
65
       </div>
83
       </div>
66
       <div>
84
       <div>
75
 
93
 
76
         <p className={Styles.cardText} >姓名 : {data.userName}
94
         <p className={Styles.cardText} >姓名 : {data.userName}
77
         </p>
95
         </p>
78
-        <p className={Styles.statusText} > 状态 : {data.status === '1' ? '启用' : '停用'} </p>
96
+        <p className={Styles.statusText} > 状态 : {data.status === 1 ? '启用' : '停用'} </p>
79
         <p className={Styles.phoneText} >
97
         <p className={Styles.phoneText} >
80
           电话 : {data.phone}
98
           电话 : {data.phone}
81
         </p>
99
         </p>
85
   )
103
   )
86
 }
104
 }
87
 
105
 
88
-
89
 const header = (props) => {
106
 const header = (props) => {
90
   const [tempData, setTempData] = useState([])
107
   const [tempData, setTempData] = useState([])
91
   useEffect(() => {
108
   useEffect(() => {
93
   }, [])
110
   }, [])
94
 
111
 
95
   const getList = (params) => {
112
   const getList = (params) => {
96
-    request({
97
-      url: '/api/admin/taUser',
98
-      method: 'GET',
99
-      params: { ...params },
100
-    }).then((data) => {
113
+    request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
101
       console.log(data, "listData")
114
       console.log(data, "listData")
102
       setTempData(data.records)
115
       setTempData(data.records)
103
     })
116
     })
162
         {
175
         {
163
           tempData.map((item, index) => (
176
           tempData.map((item, index) => (
164
             <Col span={6}>
177
             <Col span={6}>
165
-              <CartBody data={item} />
178
+              <CartBody data={item} onFresh={()=> getList({ pageNum: 1, pageSize: 10 })}/>
166
             </Col>
179
             </Col>
167
           ))
180
           ))
168
         }
181
         }

+ 5
- 19
src/pages/staff/list/editStaff.jsx 查看文件

9
 import Wangedit from '../../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../../components/Wangedit/Wangedit'
10
 import channels from './channelList.less';
10
 import channels from './channelList.less';
11
 import Tagss from '../components/Tagss.jsx';
11
 import Tagss from '../components/Tagss.jsx';
12
+import apis from '../../../services/apis';
12
 import request from '../../../utils/request'
13
 import request from '../../../utils/request'
13
 
14
 
14
 const { TextArea } = Input;
15
 const { TextArea } = Input;
27
   const [tagData, setTagData] = useState([])
28
   const [tagData, setTagData] = useState([])
28
 
29
 
29
   const getTagList = () => {
30
   const getTagList = () => {
30
-    request({
31
-      url: '/api/admin/taTags',
32
-      method: 'GET',
33
-      params: {pageNum:1,pageSize:999}
34
-    }).then((data) => {
31
+    request({ ...apis.staff.taTags, params: {pageNum:1,pageSize:999} }).then((data) => {
35
       setTagData(data.records)
32
       setTagData(data.records)
36
     })
33
     })
37
   }
34
   }
38
 
35
 
39
   // 查询列表
36
   // 查询列表
40
   const getUserData = (userId) => {
37
   const getUserData = (userId) => {
41
-    request({
42
-      url: '/api/admin/taUser/'+userId,
43
-      method: 'GET',
44
-    }).then((data) => {
38
+    request({ ...apis.staff.getTaUser, urlData: {id:userId} }).then((data) => {
45
       console.log(data,"tauser")
39
       console.log(data,"tauser")
46
       setUserData(data)
40
       setUserData(data)
47
     })
41
     })
60
 
54
 
61
   const handleSubmit = val => {
55
   const handleSubmit = val => {
62
     if(userId){
56
     if(userId){
63
-      request({
64
-        url: '/api/admin/taUser/' + userId,
65
-        method: 'PUT',
66
-        data: val,
67
-      }).then((data) => {
57
+      request({ ...apis.staff.updateTaUser, urlData: {id:userId},data: val, }).then((data) => {
68
         console.log(data,"tauser")
58
         console.log(data,"tauser")
69
         message.info("保存成功")
59
         message.info("保存成功")
70
         router.go(-1)
60
         router.go(-1)
71
       })
61
       })
72
     }else{
62
     }else{
73
-      request({
74
-        url: '/api/admin/taUser',
75
-        method: 'POST',
76
-        data: val,
77
-      }).then((data) => {
63
+      request({ ...apis.staff.addTaUser, data: val, }).then((data) => {
78
         console.log(data,"tauser")
64
         console.log(data,"tauser")
79
         message.info("保存成功")
65
         message.info("保存成功")
80
         router.go(-1)
66
         router.go(-1)

+ 4
- 14
src/pages/system/editPolicy.jsx 查看文件

8
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import SelectCity from '../../components/SelectButton/CitySelect'
9
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import XForm, { FieldTypes } from '../../components/XForm';
10
 import Wangedit from '../../components/Wangedit/Wangedit'
10
 import Wangedit from '../../components/Wangedit/Wangedit'
11
+import apis from '../../services/apis';
11
 import request from '../../utils/request'
12
 import request from '../../utils/request'
12
 
13
 
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
27
 
28
 
28
   // 查询列表
29
   // 查询列表
29
   const getPolicyData = (policyId) => {
30
   const getPolicyData = (policyId) => {
30
-    request({
31
-        url: '/api/admin/taPolicy/' + policyId,
32
-        method: 'GET',
33
-    }).then((data) => {
31
+    request({ ...apis.system.taPolicy, urlData: {id: policyId} }).then((data) => {
34
         console.log(data)
32
         console.log(data)
35
         setPolicyData(data)
33
         setPolicyData(data)
36
     })
34
     })
80
       console.log('submit data --->', val)
78
       console.log('submit data --->', val)
81
       if(policyId){
79
       if(policyId){
82
         val.policyId = policyId
80
         val.policyId = policyId
83
-        request({
84
-          url: '/api/admin/taPolicy/'+policyId,
85
-          method: 'PUT',
86
-          data: val,
87
-        }).then((data) => {
81
+        request({ ...apis.system.updateTaPolicy, urlData: {id: policyId},data: val, }).then((data) => {
88
           message.info("保存成功")
82
           message.info("保存成功")
89
           cancelPage()
83
           cancelPage()
90
         }).catch((err) => {
84
         }).catch((err) => {
91
           message.info(err.msg || err.message)
85
           message.info(err.msg || err.message)
92
         })
86
         })
93
       }else{
87
       }else{
94
-        request({
95
-          url: '/api/admin/taPolicy',
96
-          method: 'POST',
97
-          data: val,
98
-        }).then((data) => {
88
+        request({ ...apis.system.addTaPolicy,data: val, }).then((data) => {
99
           message.info("保存成功")
89
           message.info("保存成功")
100
           cancelPage()
90
           cancelPage()
101
         }).catch((err) => {
91
         }).catch((err) => {

+ 5
- 20
src/pages/system/housingPolicy.jsx 查看文件

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
-
9
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
10
 import request from '../../utils/request'
11
 
11
 
12
 const { Option } = Select;
12
 const { Option } = Select;
21
 
21
 
22
   // 查询列表
22
   // 查询列表
23
   const getList = (params) => {
23
   const getList = (params) => {
24
-    request({
25
-        url: '/api/admin/taPolicy',
26
-        method: 'GET',
27
-        params: { ...params },
28
-    }).then((data) => {
24
+    request({ ...apis.system.getTaPolicy, params: { ...params }, }).then((data) => {
29
         console.log(data)
25
         console.log(data)
30
         setData(data)
26
         setData(data)
31
     })
27
     })
104
     okText: '确定',
100
     okText: '确定',
105
     cancelText: '取消',
101
     cancelText: '取消',
106
     onOk() {
102
     onOk() {
107
-        request({
108
-            url: '/api/admin/taPolicy/'+policyId,
109
-            method: 'DELETE',
110
-        }).then((data) => {
103
+        request({ ...apis.system.deleteTaPolicy, urlData: {id: policyId }, }).then((data) => {
111
             message.info('操作成功!')
104
             message.info('操作成功!')
112
             getList({ pageNum: 1, pageSize: 10,cityId: '' });
105
             getList({ pageNum: 1, pageSize: 10,cityId: '' });
113
         }).catch((err) => {
106
         }).catch((err) => {
123
   const topPolicy = (row) => () => {
116
   const topPolicy = (row) => () => {
124
       const weight = Math.abs(row.weight - 1)
117
       const weight = Math.abs(row.weight - 1)
125
       row.weight = weight
118
       row.weight = weight
126
-      request({
127
-          url: '/api/admin/taPolicy/'+row.policyId,
128
-          method: 'PUT',
129
-          data: row,
130
-      }).then((data) => {
119
+      request({ ...apis.system.updateTaPolicy, urlData: {id: row.policyId},data: row, }).then((data) => {
131
           console.log(data)
120
           console.log(data)
132
           message.info('操作成功!')
121
           message.info('操作成功!')
133
           getList({ pageNum: 1, pageSize: 10,cityId: '' });
122
           getList({ pageNum: 1, pageSize: 10,cityId: '' });
144
         row.publishStatus = 1
133
         row.publishStatus = 1
145
       }
134
       }
146
 
135
 
147
-      request({
148
-        url: '/api/admin/taPolicy/'+row.policyId,
149
-        method: 'PUT',
150
-        data: row,
151
-      }).then((data) => {
136
+      request({ ...apis.system.updateTaPolicy, urlData: {id: row.policyId},data: row, }).then((data) => {
152
           console.log(data)
137
           console.log(data)
153
           message.info('操作成功!')
138
           message.info('操作成功!')
154
           getList({ pageNum: 1, pageSize: 10,cityId: '' });
139
           getList({ pageNum: 1, pageSize: 10,cityId: '' });

+ 3
- 10
src/pages/system/intention.jsx 查看文件

7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import XForm, { FieldTypes } from '../../components/XForm';
8
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
11
 import request from '../../utils/request'
11
 import SelectCity from '../../components/SelectButton/CitySelect'
12
 import SelectCity from '../../components/SelectButton/CitySelect'
12
 
13
 
23
 
24
 
24
   const changBuilding = (buildingId) => {
25
   const changBuilding = (buildingId) => {
25
     setBuildingIdData(buildingId)
26
     setBuildingIdData(buildingId)
26
-    request({
27
-      url: '/api/admin/tdBizEventIntention',
28
-      method: 'GET',
29
-      params: {pageNum: 1, pageSize: 999,buildingId}
30
-    }).then((data) => {
27
+    request({ ...apis.system.tdBizEventIntention, params: {pageNum: 1, pageSize: 999,buildingId}}).then((data) => {
31
       console.log(data)
28
       console.log(data)
32
       setData(data.records)
29
       setData(data.records)
33
     })
30
     })
50
     if(buildingIdValue === ''){
47
     if(buildingIdValue === ''){
51
       return
48
       return
52
     }
49
     }
53
-    request({
54
-      url: '/api/admin/taBuildingIntentionAddOrUpdate/' + buildingIdValue,
55
-      method: 'POST',
56
-      data
57
-    }).then((data) => {
50
+    request({ ...apis.system.taBuildingIntentionAddOrUpdate, urlData: {id: buildingIdValue}, data,}).then((data) => {
58
       message.info("保存成功")
51
       message.info("保存成功")
59
     })
52
     })
60
   }
53
   }

+ 2
- 6
src/pages/system/messageList.jsx 查看文件

6
 import moment from 'moment';
6
 import moment from 'moment';
7
 import SelectCity from '../../components/SelectButton/CitySelect'
7
 import SelectCity from '../../components/SelectButton/CitySelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import BuildSelect from '../../components/SelectButton/BuildSelect'
9
-
9
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
10
 import request from '../../utils/request'
11
 
11
 
12
 const { Option } = Select;
12
 const { Option } = Select;
22
 
22
 
23
   // 查询列表
23
   // 查询列表
24
   const getList = (params) => {
24
   const getList = (params) => {
25
-    request({
26
-        url: '/api/admin/taCustomerMessage',
27
-        method: 'GET',
28
-        params: { ...params },
29
-    }).then((data) => {
25
+    request({ ...apis.system.taCustomerMessage, params: { ...params },}).then((data) => {
30
         console.log(data)
26
         console.log(data)
31
         setData(data)
27
         setData(data)
32
     })
28
     })

+ 4
- 13
src/pages/system/report.jsx 查看文件

7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
7
 import BuildSelect from '../../components/SelectButton/BuildSelect'
8
 import XForm, { FieldTypes } from '../../components/XForm';
8
 import XForm, { FieldTypes } from '../../components/XForm';
9
 import Wangedit from '../../components/Wangedit/Wangedit'
9
 import Wangedit from '../../components/Wangedit/Wangedit'
10
+import apis from '../../services/apis';
10
 import request from '../../utils/request'
11
 import request from '../../utils/request'
11
 
12
 
12
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
27
 
28
 
28
   // 查询数据
29
   // 查询数据
29
   const getReportList = () => {
30
   const getReportList = () => {
30
-    request({
31
-        url: '/api/admin/tdReports',
32
-        method: 'GET',
33
-    }).then((data) => {
31
+    request({ ...apis.system.tdReports, }).then((data) => {
34
         setData((data.records || []).map(x => ({label: x.reportName, value: x.reportCode}) ))
32
         setData((data.records || []).map(x => ({label: x.reportName, value: x.reportCode}) ))
35
     })
33
     })
36
   }
34
   }
37
 
35
 
38
   const getCheckedList = () => {
36
   const getCheckedList = () => {
39
-    request({
40
-      url: '/api/admin/taBuildingReports',
41
-      method: 'GET',
42
-    }).then((data) => {
37
+    request({ ...apis.system.taBuildingReports, }).then((data) => {
43
       setCheckData((data.records || []).map((x) => x.reportCode))
38
       setCheckData((data.records || []).map((x) => x.reportCode))
44
     })
39
     })
45
   }
40
   }
51
 
46
 
52
   const saveCheckedReport = () => {
47
   const saveCheckedReport = () => {
53
     console.log(checkData)
48
     console.log(checkData)
54
-    request({
55
-      url: '/api/admin/taBuildingReport/add',
56
-      method: 'POST',
57
-      data: {list: checkData}
58
-    }).then((data) => {
49
+    request({ ...apis.system.addTaBuildingReports, data: {list: checkData}}).then((data) => {
59
       message.info("保存成功")
50
       message.info("保存成功")
60
     })
51
     })
61
   }
52
   }

+ 194
- 0
src/services/apis.js 查看文件

161
       url: `${prefix}/selectUserResource`
161
       url: `${prefix}/selectUserResource`
162
     },
162
     },
163
 
163
 
164
+  },
165
+  activity: {
166
+      list: {
167
+        method: 'GET',
168
+        url: `${prefix}/iBuildingDynamicList`,
169
+      },
170
+      weight: {
171
+        method: 'PUT',
172
+        url: `${prefix}/buildingDynamic/weight`,
173
+      },
174
+      cancel: {
175
+        method: 'PUT',
176
+        url: `${prefix}/buildingDynamic/cancel/:id`,
177
+      },
178
+      send: {
179
+        url: `${prefix}/buildingDynamic/send/:id`,
180
+        method: 'PUT',
181
+      },
182
+      finish: {
183
+        url: `${prefix}/buildingDynamic/finish`,
184
+        method: 'PUT',
185
+      },
186
+      details: {
187
+        url: `${prefix}/buildingDynamic/Details`,
188
+        method: 'GET',
189
+      },
190
+      update: {
191
+        url: `${prefix}/buildingDynamic/update`,
192
+        method: 'PUT',
193
+      },
194
+      add: {
195
+        url: `${prefix}/buildingDynamic/add`,
196
+        method: 'POST',
197
+      },
198
+      poster: {
199
+        url: `${prefix}/poster`,
200
+        method: 'GET',
201
+      },
202
+      updatePoster: {
203
+        url: `${prefix}/poster/:id`,
204
+        method: 'PUT',
205
+      },
206
+      addPoster: {
207
+        url: `${prefix}/poster`,
208
+        method: 'POST',
209
+      },
210
+      shareContent: {
211
+        url: `${prefix}/shareContent`,
212
+        method: 'GET',
213
+      },
214
+      updateShareContent: {
215
+        url: `${prefix}/shareContent/:id`,
216
+        method: 'PUT',
217
+      },
218
+      addShareContent: {
219
+        url: `${prefix}/shareContent`,
220
+        method: 'POST',
221
+      },
222
+      signList: {
223
+        url: `${prefix}/SignList`,
224
+        method: 'GET',
225
+      }
226
+  },
227
+  integralMall: {
228
+    tdPointsRules: {
229
+      url: `${prefix}/tdPointsRules`,
230
+      method: 'GET',
231
+    },
232
+    change: {
233
+      url: `${prefix}/tdPointsRules/change`,
234
+      method: 'PUT',
235
+    },
236
+    taGoods: {
237
+      url: `${prefix}/taGoods/:id`,
238
+      method: 'GET',
239
+    },
240
+    updateTaGoods: {
241
+      url: `${prefix}/taGoods`,
242
+      method: 'PUT',
243
+    },
244
+    addTaGoods: {
245
+      url: `${prefix}/taGoods/add`,
246
+      method: 'POST',
247
+    },
248
+    taPointsExchange: {
249
+      url: `${prefix}/taPointsExchange`,
250
+        method: 'GET',
251
+    },
252
+    getTaGoods: {
253
+      url: `${prefix}/taGoods`,
254
+      method: 'GET',
255
+    },
256
+    changeTaGoods: {
257
+      url: `${prefix}/taGoods/change`,
258
+      method: 'PUT',
259
+    },
260
+    changeTaPointsExchange: {
261
+      url: `${prefix}/taPointsExchange/change`,
262
+      method: 'PUT',
263
+    }
264
+  },
265
+  carsuseFigure: {
266
+    extendContent: {
267
+      url: `${prefix}/extendContent`,
268
+      method: 'GET',
269
+    },
270
+    finish: {
271
+      url: `${prefix}/buildingDynamic/finish`,
272
+      method: 'PUT',
273
+    },
274
+    updataExtendContent: {
275
+      url: `${prefix}/extendContent/:id`,
276
+      method: 'PUT',
277
+    },
278
+    getExtendContent: {
279
+      url: `${prefix}/extendContent/:id`,
280
+      method: 'GET',
281
+    },
282
+    addExtendContent: {
283
+      url: `${prefix}/extendContent`,
284
+      method: 'POST',
285
+    }
286
+  },
287
+  system: {
288
+    taPolicy: {
289
+      url: `${prefix}/taPolicy/:id`,
290
+      method: 'GET',
291
+    },
292
+    updateTaPolicy: {
293
+      url: `${prefix}/taPolicy/:id`,
294
+      method: 'PUT',
295
+    },
296
+    addTaPolicy: {
297
+      url: `${prefix}/taPolicy`,
298
+      method: 'POST',
299
+    },
300
+    getTaPolicy: {
301
+      url: `${prefix}/taPolicy`,
302
+      method: 'GET',
303
+    },
304
+    deleteTaPolicy: {
305
+      url: `${prefix}/taPolicy/:id`,
306
+      method: 'DELETE',
307
+    },
308
+    tdBizEventIntention: {
309
+      url: `${prefix}/tdBizEventIntention`,
310
+      method: 'GET',
311
+    },
312
+    taBuildingIntentionAddOrUpdate: {
313
+      url: `${prefix}/taBuildingIntentionAddOrUpdate/:id`,
314
+      method: 'POST',
315
+    },
316
+    taCustomerMessage: {
317
+      url: `${prefix}/taCustomerMessage`,
318
+      method: 'GET',
319
+    },
320
+    tdReports: {
321
+      url: `${prefix}/tdReports`,
322
+      method: 'GET',
323
+    },
324
+    taBuildingReports: {
325
+      url: `${prefix}/taBuildingReports`,
326
+      method: 'GET',
327
+    },
328
+    addTaBuildingReports: {
329
+      url: `${prefix}/taBuildingReport/add`,
330
+      method: 'POST',
331
+    }
332
+  },
333
+  staff: {
334
+    taUser: {
335
+      url: `${prefix}/taUser`,
336
+      method: 'GET',
337
+    },
338
+    taTags: {
339
+      url: `${prefix}/taTags`,
340
+      method: 'GET',
341
+    },
342
+    getTaUser: {
343
+      url: `${prefix}/taUser/:id`,
344
+      method: 'GET',
345
+    },
346
+    updateTaUser: {
347
+      url: `${prefix}/taUser/:id`,
348
+      method: 'PUT',
349
+    },
350
+    addTaUser: {
351
+      url: `${prefix}/taUser`,
352
+      method: 'POST',
353
+    },
354
+    change: {
355
+      url: `${prefix}/turn/taUser/:id/:type`,
356
+      method: 'PUT',
357
+    }
164
   }
358
   }
165
   // indexEcharts:{
359
   // indexEcharts:{
166
   //   list:{
360
   //   list:{