소스 검색

recommend

许静 5 년 전
부모
커밋
900436f9d9

+ 1
- 1
src/pages/activity/assembleItem/index.js 파일 보기

@@ -87,7 +87,7 @@ export default class Item extends Component {
87 87
             <View className="hexiaoma">核销码:{data.verificationCode}</View>
88 88
           </Block>
89 89
         }
90
-        <View className="start-date">{`${dayjs(data.createTime).format('YYYY-MM-DD HH:mm:ss')}`}</View>
90
+        {data.createTime&&<View className="start-date">{`${dayjs(data.createTime).format('YYYY-MM-DD HH:mm:ss')}`}</View>}
91 91
         {data.status == 0 &&
92 92
           <Image className="status-icon" src={groupSuccess} ></Image>
93 93
         }

+ 7
- 7
src/pages/activity/assistanceItem/index.js 파일 보기

@@ -71,14 +71,14 @@ export default class Item extends Component {
71 71
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
72 72
         <Image className="pic" src={data.img} ></Image>
73 73
         <View className="title">{data.title}</View>
74
-        {(!data.verification &&data.status == 1 )&&
75
-          <View className="time">参与截止时间: 
76
-          {data.endDate&&
77
-            <Text className="count-time">{`${dayjs(data.endDate).format('YYYY-MM-DD HH:mm:ss')}`}</Text>
78
-          }
74
+        {(!data.verification && data.status == 1) &&
75
+          <View className="time">参与截止时间:
76
+          {data.endDate &&
77
+              <Text className="count-time">{`${dayjs(data.endDate).format('YYYY-MM-DD HH:mm:ss')}`}</Text>
78
+            }
79 79
           </View>
80 80
         }
81
-        {(!data.verification &&data.status != 1)&&
81
+        {(!data.verification && data.status != 1) &&
82 82
           <View className="time"><Text className="count-time">活动已结束</Text></View>
83 83
         }
84 84
         {data.verification &&
@@ -87,7 +87,7 @@ export default class Item extends Component {
87 87
             <View className="hexiaoma">核销码:{data.verification}</View>
88 88
           </Block>
89 89
         }
90
-        <View className="start-date">{`${dayjs(data.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</View>
90
+        {data.createDate && <View className="start-date">{`${dayjs(data.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</View>}
91 91
         {data.status == 0 &&
92 92
           <Image className="status-icon" src={helpSuccess} ></Image>
93 93
         }

+ 5
- 4
src/pages/activity/detail/assistance.js 파일 보기

@@ -204,7 +204,6 @@ export default class Detail extends Component {
204 204
         isStarter: !initiateDetail.personId || userInfo.person.personId === initiateDetail.personId,
205 205
         actState,
206 206
         leftTime,
207
-        isJoin: res.isJoin
208 207
       })
209 208
 
210 209
       if (actState != ActFinished) {
@@ -301,7 +300,6 @@ export default class Detail extends Component {
301 300
         this.setState({
302 301
           submitting: false,
303 302
           helpList,
304
-          isJoin: res.isJoin,
305 303
           initiateDetail: res.helpInitiateRecord,
306 304
           initiateId: res.helpInitiateRecord.helpRecordInitiateId,
307 305
           helpState: res.helpInitiateRecord.status === undefined ? HelpInProcess : res.helpInitiateRecord.status,
@@ -311,6 +309,7 @@ export default class Detail extends Component {
311 309
           title: '助力成功',
312 310
           icon: 'success'
313 311
         })
312
+
314 313
       }).catch(err => {
315 314
         console.log('err:', err)
316 315
         Taro.hideLoading()
@@ -424,6 +423,8 @@ export default class Detail extends Component {
424 423
       avatarurl: getDownloadURL(userInfo.person.avatarurl, 'avatar') || '',
425 424
     }
426 425
 
426
+    const isJoin = helpList.filter(x => x.personId === userInfo.person.personId)[0] || isStarter
427
+
427 428
     return (
428 429
       <Block>
429 430
         {/* 生成海报 */}
@@ -526,10 +527,10 @@ export default class Detail extends Component {
526 527
                       <View className="btn-box" style="padding:25px 0;">
527 528
 
528 529
                         {
529
-                          (helpState === HelpInProcess && !this.state.isJoin) &&
530
+                          (helpState === HelpInProcess && !isJoin) &&
530 531
                           (<Button className="assistance-btn" onClick={this.handleHelp}>立即助力好友</Button>)
531 532
                         }
532
-                        <Button className={(helpState === HelpInProcess && !this.state.isJoin) ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的助力</Button>
533
+                        <Button className={(helpState === HelpInProcess && !isJoin) ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的助力</Button>
533 534
                       </View>
534 535
                     )
535 536
                   }

+ 1
- 1
src/pages/activity/detail/index.js 파일 보기

@@ -317,7 +317,7 @@ export default class Detail extends Component {
317 317
               <ScrollView
318 318
                 scrollY
319 319
                 className="detail-wrap">
320
-                <View className="detail">
320
+                <View className="detail bottom-box">
321 321
                   {detail.isEnlist == 0 &&
322 322
                     <View className="detail-sign__num">不需要报名</View>
323 323
                   }

+ 4
- 2
src/pages/activity/detail/index.scss 파일 보기

@@ -85,7 +85,9 @@
85 85
 .detail-wrap {
86 86
   background: transparent;
87 87
 }
88
-
88
+.bottom-box{
89
+  padding-bottom:120px!important; 
90
+}
89 91
 .detail {
90 92
   background: white;
91 93
   border-top-left-radius: 28px;
@@ -93,7 +95,7 @@
93 95
   padding: 30px 40px 0 40px;
94 96
   position: relative;
95 97
   overflow: hidden;
96
-  padding-bottom:120px; 
98
+
97 99
   .status__img{
98 100
     width: 176px;
99 101
     height: 176px;

+ 35
- 3
src/pages/agent/recommend/index.js 파일 보기

@@ -70,7 +70,16 @@ export default class Index extends Component {
70 70
         this.setState({
71 71
           intention: this.props.projectDetail.buildingName ? this.props.projectDetail.buildingName : this.props.proList.records[0].buildingName,
72 72
           floor: this.props.projectDetail.buildingId ? this.props.projectDetail.buildingId : this.props.proList.records[0].buildingId
73
+        }, () => {
74
+          if (this.state.floorID != 0 || this.state.intention) {
75
+            this.loadCardList()
76
+          } else {
77
+            this.setState({
78
+              adviserArray: [{ name: '请选择', id: 0 }]
79
+            })
80
+          }
73 81
         })
82
+
74 83
       }
75 84
     })
76 85
 
@@ -92,8 +101,12 @@ export default class Index extends Component {
92 101
     const { recordId } = this.state
93 102
     updatePoint(recordId)
94 103
   }
104
+
95 105
   loadData() {
106
+
96 107
     this.loadAgentList()
108
+
109
+
97 110
     this.loadSelectOpts()
98 111
   }
99 112
   loadAgentList() {
@@ -112,8 +125,17 @@ export default class Index extends Component {
112 125
       })
113 126
     })
114 127
 
128
+  }
129
+
130
+  loadCardList() {
131
+    const params = {
132
+      pageNumber: 1,
133
+      pageSize: 50,
134
+      buildingId: this.state.floor || this.props.projectDetail.buildingId
135
+    }
115 136
     getCardList(params).then(res => {
116 137
       res.records.unshift({ name: '请选择', id: 0 })
138
+      console.log(res, "res")
117 139
       this.setState({
118 140
         adviserArray: res.records
119 141
       })
@@ -217,7 +239,7 @@ export default class Index extends Component {
217 239
       this.Alert('请输入正确的手机号码');
218 240
       return false;
219 241
     }
220
-    if (floor == "" ) {
242
+    if (floor == "") {
221 243
       this.Alert("请选择意向楼盘");
222 244
       return false;
223 245
     }
@@ -241,7 +263,7 @@ export default class Index extends Component {
241 263
       describe: remarks,//客户描述
242 264
       realtyConsultant: adviser,//置业顾问
243 265
       recommendPerson: personId,
244
-      buildingId,
266
+      buildingId: buildingId || floor,
245 267
       status: 1
246 268
     }
247 269
     recommendClient(param).then(res => {
@@ -279,7 +301,16 @@ export default class Index extends Component {
279 301
         floorID: e.detail.value,
280 302
         floor: ID,
281 303
         floorColor: 'color:#000'
304
+      }, () => {
305
+        if (this.state.floorID != 0 || this.state.intention) {
306
+          this.loadCardList()
307
+        } else {
308
+          this.setState({
309
+            adviserArray: [{ name: '请选择', id: 0 }]
310
+          })
311
+        }
282 312
       })
313
+
283 314
     } else {
284 315
       this.setState({
285 316
         floorID: e.detail.value,
@@ -290,6 +321,7 @@ export default class Index extends Component {
290 321
   }
291 322
   // 置业顾问
292 323
   bindAdviserChange(e) {
324
+
293 325
     var index = e.detail.value;
294 326
     var ID = this.state.adviserArray[index].id;
295 327
     if (e.detail.value != 0) {
@@ -305,6 +337,7 @@ export default class Index extends Component {
305 337
         adviserColor: 'color:#716D6D'
306 338
       })
307 339
     }
340
+
308 341
   }
309 342
   // 物业
310 343
   bindPropertyChange(e) {
@@ -411,7 +444,6 @@ export default class Index extends Component {
411 444
               </Picker>) : (<Input className="input customers__name" style='color:#999;' disabled='disabled' name="name" value={this.state.intention} onInput={this.bindFloorChange.bind(this)} placeholder="" />)
412 445
             }
413 446
 
414
-
415 447
           </View>
416 448
           <View className='info info__4__1'>
417 449
             <Text className='customers__txt'>置业顾问</Text>

+ 6
- 2
src/pages/im/index.js 파일 보기

@@ -78,7 +78,7 @@ export default class Chat extends Component {
78 78
       const { sendId, sendName, receiverId, receiverName } = this.$router.params
79 79
       const { scene } = Taro.getStorageSync('router')
80 80
 
81
-      
81
+
82 82
       /**
83 83
        * 当 scene ==1014 时,是从服务消息直接进入聊天页面,
84 84
        * 则id为 sendId,反之是为receiverId
@@ -398,7 +398,11 @@ export default class Chat extends Component {
398 398
         list: [data]
399 399
       })
400 400
     }
401
-
401
+    this.setState({
402
+      inputText: '',
403
+      imageFile: '',
404
+      msgList: list
405
+    }, this.toBottom)
402 406
     this.setState({
403 407
       inputText: '',
404 408
       imageFile: '',

+ 1
- 2
src/pages/project/index.js 파일 보기

@@ -158,10 +158,9 @@ export default class Index extends Component {
158 158
   }
159 159
 
160 160
   loadHelpGroupList() {
161
-    queryHelpGroup().then(res => {
161
+    queryHelpGroup({cityId:this.props.curCity.id,buildingId:''}).then(res => {
162 162
       console.log(res, "res")
163 163
       this.setState({
164
-
165 164
         helpGroupList: res || []
166 165
       })
167 166
     }