张延森 3 years ago
parent
commit
e0395822c1
4 changed files with 12 additions and 10 deletions
  1. 5
    5
      config/prod.js
  2. 1
    1
      src/layout/index.js
  3. 3
    1
      src/pages/chat/chatDetail/index.jsx
  4. 3
    3
      src/utils/customer.js

+ 5
- 5
config/prod.js View File

@@ -3,14 +3,14 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://www.newhousehold.cn"', //正式
7
-    // WSS_HOST: '"wss://www.newhousehold.cn"',
8
-    HOST: '"https://xlk.njyz.tech"', //正式
9
-    WSS_HOST: '"wss://xlk.njyz.tech"',
6
+    HOST: '"https://www.newhousehold.cn"', //正式
7
+    WSS_HOST: '"wss://www.newhousehold.cn"',
8
+    // HOST: '"https://xlk.njyz.tech"', //正式
9
+    // WSS_HOST: '"wss://xlk.njyz.tech"',
10 10
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
11 11
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
12 12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
13
-    Version: '"V0.0.61-20210824"'
13
+    Version: '"V0.0.62-20210824"'
14 14
   },
15 15
   mini: {},
16 16
   h5: {

+ 1
- 1
src/layout/index.js View File

@@ -22,7 +22,6 @@ export default (ChildComponent) => (props) => {
22 22
   const mode = Taro.getStorageSync('mode')
23 23
   const isSinglePage = mode === 'singlePage'
24 24
 
25
-  const consultant = useSelector(s => s.system.consultant)
26 25
   const city = useSelector(s => s.city.curCity)
27 26
   const { spinning, userInfo } = useSelector(s => s.user)
28 27
   const { person, ...extInfo } = userInfo || {}
@@ -31,6 +30,7 @@ export default (ChildComponent) => (props) => {
31 30
   const [loading, setLoading] = useState(false)
32 31
   const [authPhone, authAvatar, authPage] = useAuth(person, page)
33 32
   const [shareTimelineVisible, setShareTimelineVisible] = useState(false)
33
+  const consultant = useSelector(s => s.system.consultant)
34 34
 
35 35
   const { id, scene, qrInited } = router.params
36 36
 

+ 3
- 1
src/pages/chat/chatDetail/index.jsx View File

@@ -58,7 +58,9 @@ export default withLayout((props) => {
58 58
   }
59 59
 
60 60
   const submitText = () => {
61
-    sendMessage(text)
61
+    if (text && text.trim()) {
62
+      sendMessage(text.trim())
63
+    }
62 64
   }
63 65
 
64 66
   const submitImage = () => {

+ 3
- 3
src/utils/customer.js View File

@@ -12,17 +12,17 @@ function report(person, consultant, showToast) {
12 12
     return Promise.reject('用户手机号不存在');
13 13
   }
14 14
 
15
-  if (!consultant || !consultant.id) {
15
+  if (!consultant || !consultant.personId) {
16 16
     return Promise.reject('置业顾问信息不存在');
17 17
   }
18 18
 
19
-  if (consultant.id == person.personId) {
19
+  if (consultant.personId == person.personId) {
20 20
     return Promise.resolve();
21 21
   }
22 22
 
23 23
   const realPhone = person.tel || person.phone
24 24
   const payload = {
25
-    realtyConsultant: consultant.id, //报备人 置业顾问
25
+    realtyConsultant: consultant.personId, //报备人 置业顾问
26 26
     phone: realPhone,
27 27
     showToast,
28 28
   }