Sfoglia il codice sorgente

Merge branch 'v4' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v4

张延森 5 anni fa
parent
commit
b452d4e6eb

+ 2
- 2
config/dev.js Vedi File

9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://192.168.0.131:8080"',
13
-    WSS_HOST: '"ws://192.168.0.131:8080"',
12
+    HOST: '"http://192.168.0.84:8080"',
13
+    WSS_HOST: '"ws://192.168.0.84:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 3
- 2
src/pages/activity/detail/assemble.js Vedi File

366
           title: '失败: ' + err.message,
366
           title: '失败: ' + err.message,
367
           icon: 'none'
367
           icon: 'none'
368
         })
368
         })
369
+        setTimeout(() => {
370
+          this.initPageData()
371
+        }, 500)
369
 
372
 
370
         this.setState({ submitting: false })
373
         this.setState({ submitting: false })
371
       })
374
       })
387
           phone: person.tel || person.phone,
390
           phone: person.tel || person.phone,
388
           avatarurl: person.avatarurl,
391
           avatarurl: person.avatarurl,
389
         }).then(res => {
392
         }).then(res => {
390
-          console.log(res,"res")
391
-
392
           this.setState({
393
           this.setState({
393
             recordDetail: res.taShareRecord,
394
             recordDetail: res.taShareRecord,
394
             recordId: res.taShareRecord.recordId,
395
             recordId: res.taShareRecord.recordId,

+ 3
- 0
src/pages/activity/detail/assistance.js Vedi File

367
           title: '失败: ' + err.message,
367
           title: '失败: ' + err.message,
368
           icon: 'none'
368
           icon: 'none'
369
         })
369
         })
370
+        setTimeout(() => {
371
+          this.initPageData()
372
+        }, 500)
370
         this.setState({ submitting: false })
373
         this.setState({ submitting: false })
371
       })
374
       })
372
     })
375
     })

+ 5
- 3
src/pages/activity/item/index.js Vedi File

40
             {data.endDate &&
40
             {data.endDate &&
41
               <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
41
               <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
42
             }
42
             }
43
-            {!data.endDate  &&
44
-              <View className="time">{data.type != 'dynamic'?'参与截止时间:':''}</View>
43
+            {!data.endDate &&
44
+              <View className="time">{data.type != 'dynamic' ? '参与截止时间:' : ''}</View>
45
+            }
46
+            {data.endDate &&
47
+              <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
45
             }
48
             }
46
-            <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
47
           </View>
49
           </View>
48
         </View>
50
         </View>
49
       </View >
51
       </View >

+ 10
- 5
src/pages/activity/myActivity.js Vedi File

38
     })
38
     })
39
   }
39
   }
40
   componentDidMount() {
40
   componentDidMount() {
41
-    console.log(this.$router, "9999999999999999")
42
   }
41
   }
43
   componentWillUnmount() {
42
   componentWillUnmount() {
44
     const { recordId } = this.state
43
     const { recordId } = this.state
70
   }
69
   }
71
 
70
 
72
   handleItemClick(item) {
71
   handleItemClick(item) {
73
-
74
-    Taro.navigateTo({
75
-      url: '/pages/activity/detail/index?id=' + item.id
76
-    })
72
+    if (item.status == 0) {
73
+      Taro.showToast({
74
+        title: '当前活动已失效',
75
+        icon: 'none'
76
+      })
77
+    } else {
78
+      Taro.navigateTo({
79
+        url: '/pages/activity/detail/index?id=' + item.dynamicId
80
+      })
81
+    }
77
 
82
 
78
 
83
 
79
   }
84
   }

+ 2
- 1
src/pages/agent/recommend/index.js Vedi File

61
   componentWillMount() {
61
   componentWillMount() {
62
     // const defaultHouseVal = Taro.getStorageSync('targetHouse')
62
     // const defaultHouseVal = Taro.getStorageSync('targetHouse')
63
 
63
 
64
-    const { type } = this.$router.params
64
+    const { type,cityId } = this.$router.params
65
+    console.log(this.$router.params,"cityId")
65
     this.setState({
66
     this.setState({
66
       reType: type
67
       reType: type
67
     }, () => {
68
     }, () => {

+ 1
- 1
src/pages/im/index.js Vedi File

574
           <View className="import-top">
574
           <View className="import-top">
575
             <Input
575
             <Input
576
               className="import-top__input"
576
               className="import-top__input"
577
-              cursor-spacing={20}
577
+              cursor-spacing={0}
578
               value={inputText}
578
               value={inputText}
579
               onInput={this.bindTextInput}
579
               onInput={this.bindTextInput}
580
               onConfirm={this.bindInputConfirm}
580
               onConfirm={this.bindInputConfirm}

+ 5
- 0
src/pages/person/index.js Vedi File

56
       Taro.showToast({
56
       Taro.showToast({
57
         title: '签到成功'
57
         title: '签到成功'
58
       })
58
       })
59
+      this.setState({
60
+        user: {
61
+          points: res.points
62
+        }
63
+      })
59
 
64
 
60
       this.loadUserInfo()
65
       this.loadUserInfo()
61
 
66
 

+ 3
- 2
src/pages/person/menus.js Vedi File

13
   calculator: require('@assets/mine/calculator.png'),
13
   calculator: require('@assets/mine/calculator.png'),
14
   encyclopedia: require('@assets/mine/encyclopedia.png'),
14
   encyclopedia: require('@assets/mine/encyclopedia.png'),
15
   feedback: require('@assets/mine/feedback.png'),
15
   feedback: require('@assets/mine/feedback.png'),
16
+  client: require('@assets/mine/client.png'),
16
 }
17
 }
17
 
18
 
18
 const DRIFT = ROLE_CODE['DRIFT']
19
 const DRIFT = ROLE_CODE['DRIFT']
63
     {
64
     {
64
       name: '我的客户',
65
       name: '我的客户',
65
       url: '/pages/person/myGuest/index',
66
       url: '/pages/person/myGuest/index',
66
-      icon: icons.activities,
67
+      icon: icons.client,
67
       extends: undefined,
68
       extends: undefined,
68
       userTypes: [CONSULTANT],
69
       userTypes: [CONSULTANT],
69
     },
70
     },
84
     {
85
     {
85
       name: '我的助力',
86
       name: '我的助力',
86
       url: '/pages/activity/assistancePage',
87
       url: '/pages/activity/assistancePage',
87
-      icon: icons.regiment,
88
+      icon: icons.help,
88
       extends: undefined,
89
       extends: undefined,
89
       userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
90
       userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
90
     },
91
     },

+ 10
- 4
src/pages/person/profile/index.js Vedi File

14
   }
14
   }
15
 
15
 
16
   state = {
16
   state = {
17
-   
17
+
18
     documentVerifyId: '',
18
     documentVerifyId: '',
19
     imgList: [],
19
     imgList: [],
20
     documentTitle: '',
20
     documentTitle: '',
24
 
24
 
25
   }
25
   }
26
 
26
 
27
-  componentDidMount() {
27
+  componentDidShow() {
28
     this.getProfile()
28
     this.getProfile()
29
   }
29
   }
30
 
30
 
62
       showWhich: false
62
       showWhich: false
63
     })
63
     })
64
     e.stopPropagation()
64
     e.stopPropagation()
65
+    Taro.showLoading({
66
+      title: '上传中',
67
+    })
65
     Taro.chooseImage({
68
     Taro.chooseImage({
66
       sizeType: ['original', 'compressed'],  //可选择原图或压缩后的图片
69
       sizeType: ['original', 'compressed'],  //可选择原图或压缩后的图片
67
       sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
70
       sourceType: ['album', 'camera'], //可选择性开放访问相册、相机
76
             marginTop: 0,
79
             marginTop: 0,
77
             messageType: 'image',
80
             messageType: 'image',
78
             imgList: imgList || []
81
             imgList: imgList || []
79
-          }, this.onSendMsg)
82
+          })
80
         })
83
         })
84
+      },
85
+      complete: res => {
86
+        Taro.hideLoading()
81
       }
87
       }
82
     })
88
     })
83
   }
89
   }
186
 
192
 
187
 
193
 
188
   render() {
194
   render() {
189
-    const { imgList, documentTitle, verfyList, descVisible,showWhich } = this.state
195
+    const { imgList, documentTitle, verfyList, descVisible, showWhich } = this.state
190
 
196
 
191
     return (
197
     return (
192
       <View className="profile-page" style={`background: url(${profileBg}) no-repeat top;background-size: 100% 100%;`}>
198
       <View className="profile-page" style={`background: url(${profileBg}) no-repeat top;background-size: 100% 100%;`}>

+ 5
- 5
src/pages/project/index.js Vedi File

158
   }
158
   }
159
 
159
 
160
   loadHelpGroupList() {
160
   loadHelpGroupList() {
161
-    queryHelpGroup({cityId:this.props.curCity.id,buildingId:''}).then(res => {
161
+    queryHelpGroup({ cityId: this.props.curCity.id, buildingId: '' }).then(res => {
162
       console.log(res, "res")
162
       console.log(res, "res")
163
       this.setState({
163
       this.setState({
164
         helpGroupList: res || []
164
         helpGroupList: res || []
260
     })
260
     })
261
   }
261
   }
262
 
262
 
263
-  handleBannerClick=(item) =>{
264
-    console.log(this,"this")
263
+  handleBannerClick = (item) => {
264
+    console.log(this, "this")
265
     this.redirectTo(item)
265
     this.redirectTo(item)
266
   }
266
   }
267
 
267
 
298
       // 资讯
298
       // 资讯
299
       case 'news':
299
       case 'news':
300
         Taro.navigateTo({
300
         Taro.navigateTo({
301
-          url: 'pages/news/detail/index?id=' + targetId
301
+          url: '/pages/news/detail/index?id=' + targetId
302
         })
302
         })
303
         return;
303
         return;
304
 
304
 
380
       })
380
       })
381
     } else {
381
     } else {
382
       Taro.navigateTo({
382
       Taro.navigateTo({
383
-        url: `/pages/agent/recommend/index?type=index`
383
+        url: `/pages/agent/recommend/index?type=index` 
384
       })
384
       })
385
     }
385
     }
386
   }
386
   }

+ 9
- 4
src/pages/shop/index.js Vedi File

70
     const params = {
70
     const params = {
71
       pageNum: '1',
71
       pageNum: '1',
72
       pageSize: '9999',
72
       pageSize: '9999',
73
-      buildingId:this.state.goodsBuilding[current].buildingId|| this.state.goodsBuilding[0].buildingId,
73
+      buildingId: this.state.goodsBuilding[current].buildingId || this.state.goodsBuilding[0].buildingId,
74
       cityId: this.props.curCity.id
74
       cityId: this.props.curCity.id
75
     }
75
     }
76
 
76
 
164
       Taro.showToast({
164
       Taro.showToast({
165
         title: '签到成功'
165
         title: '签到成功'
166
       })
166
       })
167
+      this.setState({
168
+        user: {
169
+          points: res.points
170
+        }
171
+      })
167
 
172
 
168
       this.loadUserInfo()
173
       this.loadUserInfo()
169
 
174
 
170
       // App.zhuge.track('签到成功')
175
       // App.zhuge.track('签到成功')
171
     })
176
     })
172
   }
177
   }
173
-  
178
+
174
   loadUserInfo() {
179
   loadUserInfo() {
175
     // debugger
180
     // debugger
176
     queryUserInfo().then(user => {
181
     queryUserInfo().then(user => {
277
               <View className='user__left__name'>{person.nickname}</View>
282
               <View className='user__left__name'>{person.nickname}</View>
278
               {
283
               {
279
                 user.havaSigned ?
284
                 user.havaSigned ?
280
-                (<View className="qiandao__btn">已签到</View>) :
281
-                (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
285
+                  (<View className="qiandao__btn">已签到</View>) :
286
+                  (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
282
               }
287
               }
283
               <View className='message'>
288
               <View className='message'>
284
                 <View className='message__left'>
289
                 <View className='message__left'>