张延森 3 年之前
父節點
當前提交
b9e4347c89

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

9
   dev: {
9
   dev: {
10
     '/api/': {
10
     '/api/': {
11
       // target: 'https://xlk.njyz.tech/',
11
       // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://localhost:8567/',
12
+      target: 'http://localhost:8081/',
13
       // target: 'https://xlj.newlandsh.com/',
13
       // target: 'https://xlj.newlandsh.com/',
14
       changeOrigin: true,
14
       changeOrigin: true,
15
       pathRewrite: {
15
       pathRewrite: {

+ 5
- 0
config/routes.js 查看文件

525
                 hideInMenu: true,
525
                 hideInMenu: true,
526
                 component: './findRoom/addedValueService/audit',
526
                 component: './findRoom/addedValueService/audit',
527
               },
527
               },
528
+              {
529
+                path: '/findRoom/setting',
530
+                name: '回访设置',
531
+                component: './findRoom/setting',
532
+              },
528
               // {
533
               // {
529
               //   path: '/home/recommend/auditcopy',
534
               //   path: '/home/recommend/auditcopy',
530
               //   name: '回访确认',
535
               //   name: '回访确认',

+ 0
- 2
src/pages/carouselFigure/customImg/list.jsx 查看文件

27
       } else {
27
       } else {
28
         setData([
28
         setData([
29
           { 'imgUrl': 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg', 'imgType': 'index', 'imgDesc': '小程序首页分享配图' },
29
           { 'imgUrl': 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg', 'imgType': 'index', 'imgDesc': '小程序首页分享配图' },
30
-          { 'imgUrl': 'http://njcj.oss-cn-shanghai.aliyuncs.com/icon.png', 'imgType': 'indexNews', 'imgDesc': '首页资讯logo' }
31
         ])
30
         ])
32
       }
31
       }
33
-
34
     })
32
     })
35
   }
33
   }
36
 
34
 

+ 5
- 5
src/pages/customer/Customer/style.less 查看文件

136
     position: relative;
136
     position: relative;
137
   }
137
   }
138
   .tit{
138
   .tit{
139
-    font-size:0.15rem;
139
+    // font-size:0.15rem;
140
     font-weight:600;
140
     font-weight:600;
141
     color:#222;
141
     color:#222;
142
     margin: 10px 0 0 0;
142
     margin: 10px 0 0 0;
158
   }
158
   }
159
   .infoItem{
159
   .infoItem{
160
     color:#666;
160
     color:#666;
161
-    font-size: 0.1rem;
161
+    // font-size: 0.1rem;
162
     margin: 0 0 30px 0;
162
     margin: 0 0 30px 0;
163
     
163
     
164
   }
164
   }
165
   .rightItem{
165
   .rightItem{
166
     color:#666;
166
     color:#666;
167
-    font-size: 0.1rem;
167
+    // font-size: 0.1rem;
168
     margin: 0 0 15px 0;
168
     margin: 0 0 15px 0;
169
   }
169
   }
170
   .right{
170
   .right{
206
     min-width: 1.3rem;
206
     min-width: 1.3rem;
207
     margin: 0 0 15px 0;
207
     margin: 0 0 15px 0;
208
     color:#666;
208
     color:#666;
209
-    font-size: 0.1rem;
209
+    // font-size: 0.1rem;
210
     padding-top: 0.3rem;
210
     padding-top: 0.3rem;
211
   }
211
   }
212
 
212
 
219
     margin: 0 0 15px 0;
219
     margin: 0 0 15px 0;
220
     padding-top: 0.3rem;
220
     padding-top: 0.3rem;
221
     color:#666;
221
     color:#666;
222
-    font-size: 0.1rem;
222
+    // font-size: 0.1rem;
223
   }
223
   }
224
   
224
   
225
 }
225
 }

+ 67
- 0
src/pages/findRoom/setting/index.jsx 查看文件

1
+import React, { useEffect, useRef, useState } from 'react'
2
+import { Card, Descriptions, Input, message } from 'antd'
3
+import { fetch, apis } from '@/utils/request'
4
+
5
+const getSettings = fetch(apis.searchHouse.setting.get)
6
+const savePhone = fetch(apis.searchHouse.setting.phone)
7
+
8
+const EditableField = (props) => {
9
+  const [val, setVal] = useState()
10
+
11
+  const handleChange = (e) => {
12
+    setVal(e.target.value)
13
+  }
14
+
15
+  useEffect(() => {
16
+    setVal(props.value)
17
+  }, [props.value])
18
+
19
+  return (
20
+    <Input.Search
21
+      {...props}
22
+      enterButton="保存"
23
+      onSearch={props.onSubmit}
24
+      onChange={handleChange}
25
+      value={val}
26
+    />
27
+  )
28
+}
29
+
30
+export default (props) => {
31
+  const [loading, setLoading] = useState(false)
32
+  const [phone, setPhone] = useState()
33
+
34
+  const handlePhoneSubmit = (phone) => {
35
+    if (!phone) return;
36
+
37
+    setLoading(true)
38
+    savePhone({ urlData: { phone} }).then(() => {
39
+      setLoading(false)
40
+      setPhone(phone)
41
+      message.success('设置成功')
42
+    }).catch(() => {
43
+      setLoading(false)
44
+    })
45
+  }
46
+
47
+  useEffect(() => {
48
+    // 获取客服电话
49
+    setLoading(true)
50
+    getSettings().then((res) => {
51
+      setLoading(false)
52
+      setPhone(res.phone)
53
+    }).catch(() => {
54
+      setLoading(false)
55
+    })
56
+  }, [])
57
+
58
+  return (
59
+    <Card loading={loading}>
60
+      <Descriptions column={1} bordered size="middle" style={{maxWidth: '800px'}}>
61
+        <Descriptions.Item label="客服热线">
62
+          <EditableField value={phone} onSubmit={handlePhoneSubmit} />
63
+        </Descriptions.Item>
64
+      </Descriptions>
65
+    </Card>
66
+  )
67
+}

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

338
       url: `${prefix}/reply/:id`,
338
       url: `${prefix}/reply/:id`,
339
       action: '',
339
       action: '',
340
     },
340
     },
341
+    setting: {
342
+      get: {
343
+        method: 'GET',
344
+        url: `${prefix}/searchHouse/setting`,
345
+        action: 'admin.searchHouse.setting.get',
346
+      },
347
+      phone: {
348
+        method: 'PUT',
349
+        url: `${prefix}/searchHouse/setting/phone/:phone`,
350
+        action: 'admin.searchHouse.setting.phone.put',
351
+      },
352
+    }
341
   },
353
   },
342
 
354
 
343
   customer: {
355
   customer: {