Bläddra i källkod

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

张延森 5 år sedan
förälder
incheckning
b452d4e6eb

+ 2
- 2
config/dev.js Visa fil

@@ -9,8 +9,8 @@ module.exports = {
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 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 15
   weapp: {},
16 16
   h5: {}

+ 3
- 2
src/pages/activity/detail/assemble.js Visa fil

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

+ 3
- 0
src/pages/activity/detail/assistance.js Visa fil

@@ -367,6 +367,9 @@ export default class Detail extends Component {
367 367
           title: '失败: ' + err.message,
368 368
           icon: 'none'
369 369
         })
370
+        setTimeout(() => {
371
+          this.initPageData()
372
+        }, 500)
370 373
         this.setState({ submitting: false })
371 374
       })
372 375
     })

+ 5
- 3
src/pages/activity/item/index.js Visa fil

@@ -40,10 +40,12 @@ export default class Item extends Component {
40 40
             {data.endDate &&
41 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 49
           </View>
48 50
         </View>
49 51
       </View >

+ 10
- 5
src/pages/activity/myActivity.js Visa fil

@@ -38,7 +38,6 @@ export default class Index extends Component {
38 38
     })
39 39
   }
40 40
   componentDidMount() {
41
-    console.log(this.$router, "9999999999999999")
42 41
   }
43 42
   componentWillUnmount() {
44 43
     const { recordId } = this.state
@@ -70,10 +69,16 @@ export default class Index extends Component {
70 69
   }
71 70
 
72 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 Visa fil

@@ -61,7 +61,8 @@ export default class Index extends Component {
61 61
   componentWillMount() {
62 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 66
     this.setState({
66 67
       reType: type
67 68
     }, () => {

+ 1
- 1
src/pages/im/index.js Visa fil

@@ -574,7 +574,7 @@ export default class Chat extends Component {
574 574
           <View className="import-top">
575 575
             <Input
576 576
               className="import-top__input"
577
-              cursor-spacing={20}
577
+              cursor-spacing={0}
578 578
               value={inputText}
579 579
               onInput={this.bindTextInput}
580 580
               onConfirm={this.bindInputConfirm}

+ 5
- 0
src/pages/person/index.js Visa fil

@@ -56,6 +56,11 @@ export default class Person extends Component {
56 56
       Taro.showToast({
57 57
         title: '签到成功'
58 58
       })
59
+      this.setState({
60
+        user: {
61
+          points: res.points
62
+        }
63
+      })
59 64
 
60 65
       this.loadUserInfo()
61 66
 

+ 3
- 2
src/pages/person/menus.js Visa fil

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

+ 10
- 4
src/pages/person/profile/index.js Visa fil

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

+ 5
- 5
src/pages/project/index.js Visa fil

@@ -158,7 +158,7 @@ export default class Index extends Component {
158 158
   }
159 159
 
160 160
   loadHelpGroupList() {
161
-    queryHelpGroup({cityId:this.props.curCity.id,buildingId:''}).then(res => {
161
+    queryHelpGroup({ cityId: this.props.curCity.id, buildingId: '' }).then(res => {
162 162
       console.log(res, "res")
163 163
       this.setState({
164 164
         helpGroupList: res || []
@@ -260,8 +260,8 @@ export default class Index extends Component {
260 260
     })
261 261
   }
262 262
 
263
-  handleBannerClick=(item) =>{
264
-    console.log(this,"this")
263
+  handleBannerClick = (item) => {
264
+    console.log(this, "this")
265 265
     this.redirectTo(item)
266 266
   }
267 267
 
@@ -298,7 +298,7 @@ export default class Index extends Component {
298 298
       // 资讯
299 299
       case 'news':
300 300
         Taro.navigateTo({
301
-          url: 'pages/news/detail/index?id=' + targetId
301
+          url: '/pages/news/detail/index?id=' + targetId
302 302
         })
303 303
         return;
304 304
 
@@ -380,7 +380,7 @@ export default class Index extends Component {
380 380
       })
381 381
     } else {
382 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 Visa fil

@@ -70,7 +70,7 @@ export default class Shop extends Component {
70 70
     const params = {
71 71
       pageNum: '1',
72 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 74
       cityId: this.props.curCity.id
75 75
     }
76 76
 
@@ -164,13 +164,18 @@ export default class Shop extends Component {
164 164
       Taro.showToast({
165 165
         title: '签到成功'
166 166
       })
167
+      this.setState({
168
+        user: {
169
+          points: res.points
170
+        }
171
+      })
167 172
 
168 173
       this.loadUserInfo()
169 174
 
170 175
       // App.zhuge.track('签到成功')
171 176
     })
172 177
   }
173
-  
178
+
174 179
   loadUserInfo() {
175 180
     // debugger
176 181
     queryUserInfo().then(user => {
@@ -277,8 +282,8 @@ export default class Shop extends Component {
277 282
               <View className='user__left__name'>{person.nickname}</View>
278 283
               {
279 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 288
               <View className='message'>
284 289
                 <View className='message__left'>