张延森 hace 3 años
padre
commit
b9e4347c89

+ 1
- 1
config/proxy.js Ver fichero

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

+ 5
- 0
config/routes.js Ver fichero

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

+ 0
- 2
src/pages/carouselFigure/customImg/list.jsx Ver fichero

@@ -27,10 +27,8 @@ function header(props) {
27 27
       } else {
28 28
         setData([
29 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 Ver fichero

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

@@ -0,0 +1,67 @@
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 Ver fichero

@@ -338,6 +338,18 @@ export default {
338 338
       url: `${prefix}/reply/:id`,
339 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 355
   customer: {