许静 5 gadus atpakaļ
vecāks
revīzija
a93411b760

+ 5
- 5
src/pages/agent/index.js Parādīt failu

@@ -6,7 +6,7 @@ import Poster from './poster'
6 6
 import { agentCurrent } from '@services/agent'
7 7
 import BackHomeBtn from '@components/BackHomeBtn'
8 8
 import { getMiniQrcode } from '@services/common'
9
-const topImg ='https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/top.jpg'
9
+const topImg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/top.jpg'
10 10
 @connect(state => state.user, { ...actions })
11 11
 
12 12
 export default class Index extends Component {
@@ -38,7 +38,7 @@ export default class Index extends Component {
38 38
 
39 39
   }
40 40
   onShareAppMessage = () => {
41
-    const { agent: { nickname,personId,agentCode } } = this.state
41
+    const { agent: { nickname, personId, agentCode } } = this.state
42 42
     return {
43 43
       title: `${nickname}邀请你成为经纪人`,
44 44
       path: `/pages/agent/become/index?id=${personId}&from=share&recommender=${personId}&agentCode=${agentCode}`,//分享地址
@@ -53,7 +53,7 @@ export default class Index extends Component {
53 53
         return
54 54
       }
55 55
       const { userInfo: { person } } = this.props
56
-      const { agent: { avatarurl, phone, agentCode },qrcode } = this.state
56
+      const { agent: { avatarurl, phone, agentCode }, qrcode } = this.state
57 57
       let data = {
58 58
         codeImg: qrcode,
59 59
         avatarurl: avatarurl,//访问者头像
@@ -81,7 +81,7 @@ export default class Index extends Component {
81 81
     }
82 82
   }
83 83
   render() {
84
-    const { posterVisible, posterData, posterShow, agent,qrcode } = this.state
84
+    const { posterVisible, posterData, posterShow, agent, qrcode } = this.state
85 85
     return (
86 86
       <Block>
87 87
         {/* 生成海报 */}
@@ -91,7 +91,7 @@ export default class Index extends Component {
91 91
           <View className='agent_info'>
92 92
             <Image src={agent.avatarurl} className='agent_avatar'></Image>
93 93
             <View className='agent_info-center'>
94
-              <View>手机号:<Text className='agent_info-tel'>{agent.phone}</Text></View>
94
+              <View>手机号:<Text className='agent_info-tel'>{agent.tel || agent.phone}</Text></View>
95 95
               <View>我的推荐码:<Text className='agent_info-code'>{agent.agentCode}</Text></View>
96 96
             </View>
97 97
             <Image src={qrcode} className='agent_code'></Image>

+ 3
- 3
src/pages/agent/recommend/index.js Parādīt failu

@@ -12,7 +12,7 @@ export default class Index extends Component {
12 12
     navigationBarTitleText: '新增客户'
13 13
   }
14 14
   state = {
15
-    name: '',//客户姓名
15
+    name: '',//客户姓名 
16 16
     sex: '',//性别
17 17
     phone: '',//电话
18 18
     floor: '',//楼盘
@@ -61,8 +61,8 @@ export default class Index extends Component {
61 61
   componentWillMount() {
62 62
     // const defaultHouseVal = Taro.getStorageSync('targetHouse')
63 63
 
64
-    const { type, cityId } = this.$router.params
65
-    console.log(this.$router.params, "cityId")
64
+    const { type } = this.$router.params
65
+   
66 66
     this.setState({
67 67
       reType: type,
68 68
       sex: '',

+ 8
- 6
src/pages/im/index.js Parādīt failu

@@ -375,7 +375,13 @@ export default class Chat extends Component {
375 375
     // 发送消息
376 376
     socket.sendNotice(payload, res => {
377 377
       console.log('发送成功')
378
+
378 379
       this.appendData(payload)
380
+      this.setState({
381
+        inputText: '',
382
+        imageFile: '',
383
+        msgList: list
384
+      }, this.toBottom)
379 385
     })
380 386
   }
381 387
 
@@ -398,11 +404,7 @@ export default class Chat extends Component {
398 404
         list: [data]
399 405
       })
400 406
     }
401
-    this.setState({
402
-      inputText: '',
403
-      imageFile: '',
404
-      msgList: list
405
-    }, this.toBottom)
407
+ 
406 408
     this.setState({
407 409
       inputText: '',
408 410
       imageFile: '',
@@ -574,7 +576,7 @@ export default class Chat extends Component {
574 576
           <View className="import-top">
575 577
             <Input
576 578
               className="import-top__input"
577
-              cursor-spacing={0}
579
+              cursor-spacing={6}
578 580
               value={inputText}
579 581
               onInput={this.bindTextInput}
580 582
               onConfirm={this.bindInputConfirm}

+ 20
- 6
src/pages/person/personDetail/editDetail/index.js Parādīt failu

@@ -98,12 +98,26 @@ export default class editDetail extends Component {
98 98
         this.Alert('请输入渠道码')
99 99
         return;
100 100
       }
101
-
102 101
     }
103
-    becomeChannel({
104
-      personType: this.state.personType,//经纪人类型
105
-      channelCode: this.state.channelCode//渠道码
106
-    }).then((data) => {
102
+
103
+    if (this.state.personType == 'channel agent' || this.state.personType == 'estate agent') {
104
+      becomeChannel({
105
+        personType: this.state.personType,//经纪人类型
106
+        channelCode: this.state.channelCode//渠道码
107
+      }).then((data) => {
108
+        const playload = {
109
+          name: this.state.name,
110
+          avatar: avatar,
111
+          phone: this.state.phone
112
+        }
113
+        editAgent(playload).then(res => {
114
+          Taro.switchTab({
115
+            url: '/pages/person/index'
116
+          })
117
+        })
118
+
119
+      })
120
+    } else {
107 121
       const playload = {
108 122
         name: this.state.name,
109 123
         avatar: avatar,
@@ -114,7 +128,7 @@ export default class editDetail extends Component {
114 128
           url: '/pages/person/index'
115 129
         })
116 130
       })
117
-    })
131
+    }
118 132
   }
119 133
   Alert(content, title) {
120 134
     title = title ? title : "温馨提示";

+ 5
- 0
src/utils/im.js Parādīt failu

@@ -138,7 +138,12 @@ class IMManager {
138 138
           console.log('socket发送成功')
139 139
         },
140 140
         fail(err) {
141
+
141 142
           console.log(err, '发送失败了')
143
+          Taro.showToast({
144
+            title: '发送失败',
145
+            icon: 'none'
146
+          })
142 147
         }
143 148
       })
144 149
     } else {