张延森 5 years ago
parent
commit
ba1c69e7fe

+ 2
- 2
config/dev.js View File

@@ -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: {}

+ 16
- 12
src/pages/activity/detail/assemble.js View File

@@ -74,9 +74,8 @@ export default class Detail extends Component {
74 74
   // 初始化页面数据
75 75
   initPageData = () => {
76 76
     if (!this.state.detail.groupActivityId) {
77
-      const router = Taro.getStorageSync('router')
78
-      const id = this.$router.params.id || router.query.id
79
-      const recordId = this.$router.params.recordId || router.query.recordId
77
+      const id = this.$router.params.id
78
+      const recordId = this.$router.params.recordId
80 79
 
81 80
       this.setState({ id, recordId }, () => {
82 81
         this.loadDetail()
@@ -195,6 +194,8 @@ export default class Detail extends Component {
195 194
         this.updateLeftTime(res.taShareActivity.startTime, res.taShareActivity.endTime)
196 195
       }
197 196
 
197
+      Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
198
+
198 199
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
199 200
 
200 201
       // savePoint({
@@ -297,6 +298,12 @@ export default class Detail extends Component {
297 298
       }).catch(err => {
298 299
         console.log('err:', err)
299 300
         Taro.hideLoading()
301
+        
302
+        Taro.showToast({
303
+          title: '失败: ' + err.message,
304
+          icon: 'none'
305
+        })
306
+
300 307
         this.setState({ submitting: false })
301 308
       })
302 309
     })
@@ -420,15 +427,12 @@ export default class Detail extends Component {
420 427
               <Notice></Notice>
421 428
               <View className="detail-banner">
422 429
                 <Image mode="widthFix" src={detail.mainImg} className="detail-banner__img"></Image>
423
-                {
424
-                  groupState === GroupInProcess && actState != ActFinished &&
425
-                  (
426
-                    <View className="rest-time">
427
-                      <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '活动已结束')} </Text>
428
-                      <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : ''}</Text>
429
-                    </View>
430
-                  )
431
-                }
430
+                
431
+                <View className="rest-time">
432
+                  <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
433
+                  <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : '活动已结束'}</Text>
434
+                </View>
435
+
432 436
               </View>
433 437
               <ScrollView
434 438
                 scrollY

+ 15
- 12
src/pages/activity/detail/assistance.js View File

@@ -79,9 +79,8 @@ export default class Detail extends Component {
79 79
   // 初始化页面数据
80 80
   initPageData = () => {
81 81
     if (!this.state.detail.helpActivityId) {
82
-      const router = Taro.getStorageSync('router')
83
-      const id = this.$router.params.id || router.query.id
84
-      const initiateId = this.$router.params.initiateId || router.query.initiateId
82
+      const id = this.$router.params.id
83
+      const initiateId = this.$router.params.initiateId
85 84
 
86 85
       this.setState({ id, initiateId }, () => {
87 86
         this.loadDetail()
@@ -201,6 +200,8 @@ export default class Detail extends Component {
201 200
         this.updateLeftTime(res.helpActivity.startDate, res.helpActivity.endDate)
202 201
       }
203 202
 
203
+      Taro.setNavigationBarTitle({ title: res.helpActivity.title })
204
+
204 205
       // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
205 206
 
206 207
       // savePoint({
@@ -303,6 +304,11 @@ export default class Detail extends Component {
303 304
       }).catch(err => {
304 305
         console.log('err:', err)
305 306
         Taro.hideLoading()
307
+        
308
+        Taro.showToast({
309
+          title: '失败: ' + err.message,
310
+          icon: 'none'
311
+        })
306 312
         this.setState({ submitting: false })
307 313
       })
308 314
     })
@@ -424,15 +430,12 @@ export default class Detail extends Component {
424 430
               <Notice></Notice>
425 431
               <View className="detail-banner">
426 432
                 <Image mode="widthFix" src={detail.img} className="detail-banner__img"></Image>
427
-                {
428
-                  helpState === HelpInProcess && actState != ActFinished &&
429
-                  (
430
-                    <View className="rest-time">
431
-                      <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '活动已结束')} </Text>
432
-                      <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : ''}</Text>
433
-                    </View>
434
-                  )
435
-                }
433
+                
434
+                <View className="rest-time">
435
+                  <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
436
+                  <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : '活动已结束'}</Text>
437
+                </View>
438
+
436 439
               </View>
437 440
               <ScrollView
438 441
                 scrollY

+ 2
- 2
src/pages/activity/item/index.js View File

@@ -31,10 +31,10 @@ export default class Item extends Component {
31 31
             
32 32
           }
33 33
 
34
-          {/* <View className="time">活动开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD hh:mm:ss')}`}</View> */}
34
+          {/* <View className="time">活动开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD HH:mm:ss')}`}</View> */}
35 35
 
36 36
           <View className="left">
37
-            <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 hh:mm:ss')}`}</View>
37
+            <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
38 38
             <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>
39 39
           </View>
40 40
         </View>

+ 3
- 0
src/pages/person/profile/index.js View File

@@ -65,6 +65,9 @@ export default class Profile extends Component {
65 65
   }
66 66
 
67 67
   onChange(files) {
68
+    
69
+
70
+
68 71
     this.setState({
69 72
       files
70 73
     })