Browse Source

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

张延森 5 years ago
parent
commit
e30702413d

+ 8
- 3
src/pages/activity/detail/assemble.js View File

84
         this.toggleGrantAvatar()
84
         this.toggleGrantAvatar()
85
       }
85
       }
86
       this.initPageData()
86
       this.initPageData()
87
-      // Taro.setStorageSync('router', { query: {} })
88
-      // console.log(Taro.getStorageSync('router'),"hhhhhhhhhhhhhhhhhhhhhh")
89
     })
87
     })
90
   }
88
   }
91
 
89
 
93
     this.stopTicker()
91
     this.stopTicker()
94
     this.state.pointRecordId && updatePoint(this.state.pointRecordId)
92
     this.state.pointRecordId && updatePoint(this.state.pointRecordId)
95
 
93
 
96
-    Taro.setStorageSync('router', { query: {} })
94
+    const router = Taro.getStorageSync('router')
95
+    Taro.setStorageSync('router', {
96
+      ...router,
97
+      query: {
98
+        ...router.query,
99
+        consultant: undefined,
100
+      }
101
+    })
97
   }
102
   }
98
 
103
 
99
   componentDidShow() {
104
   componentDidShow() {

+ 10
- 3
src/pages/activity/detail/assistance.js View File

93
     this.stopTicker()
93
     this.stopTicker()
94
     this.state.pointRecordId && updatePoint(this.state.pointRecordId)
94
     this.state.pointRecordId && updatePoint(this.state.pointRecordId)
95
 
95
 
96
-    Taro.setStorageSync('router', { query: {} })
96
+    const router = Taro.getStorageSync('router')
97
+    Taro.setStorageSync('router', {
98
+      ...router,
99
+      query: {
100
+        ...router.query,
101
+        consultant: undefined,
102
+      }
103
+    })
97
   }
104
   }
98
 
105
 
99
   componentDidShow() {
106
   componentDidShow() {
480
 
487
 
481
       },
488
       },
482
       complete() {
489
       complete() {
483
-        
490
+
484
         // 必须授权头像
491
         // 必须授权头像
485
         if (that.toggleGrantAvatar()) {
492
         if (that.toggleGrantAvatar()) {
486
           const detail = that.state.detail
493
           const detail = that.state.detail
520
   }
527
   }
521
 
528
 
522
   // 请求好友助力
529
   // 请求好友助力
523
-  askForHelp = () => {    
530
+  askForHelp = () => {
524
     // 必须授权头像
531
     // 必须授权头像
525
     if (this.toggleGrantAvatar()) {
532
     if (this.toggleGrantAvatar()) {
526
       const initiateDetail = this.state.initiateDetail
533
       const initiateDetail = this.state.initiateDetail

+ 8
- 1
src/pages/activity/detail/index.js View File

79
     const { recordId } = this.state
79
     const { recordId } = this.state
80
     recordId && updatePoint(recordId)
80
     recordId && updatePoint(recordId)
81
 
81
 
82
-    Taro.setStorageSync('router', { query: {} })
82
+    const router = Taro.getStorageSync('router')
83
+    Taro.setStorageSync('router', {
84
+      ...router,
85
+      query: {
86
+        ...router.query,
87
+        consultant: undefined,
88
+      }
89
+    })
83
   }
90
   }
84
 
91
 
85
   componentWillReceiveProps() {
92
   componentWillReceiveProps() {

+ 67
- 64
src/pages/news/detail/index.js View File

86
     const { recordId } = this.state
86
     const { recordId } = this.state
87
     recordId && updatePoint(recordId)
87
     recordId && updatePoint(recordId)
88
 
88
 
89
-    Taro.setStorageSync('router', { query: {} })
89
+    const router = Taro.getStorageSync('router')
90
+    Taro.setStorageSync('router', {
91
+      ...router,
92
+      query: {
93
+        ...router.query,
94
+        consultant: undefined,
95
+      }
96
+    })
90
   }
97
   }
91
   
98
   
92
   // 报备客户
99
   // 报备客户
221
         })
228
         })
222
         console.info('资讯详情')
229
         console.info('资讯详情')
223
       })
230
       })
224
-    
231
+
225
       this.setState({
232
       this.setState({
226
         detail: res,
233
         detail: res,
227
         loaded: true,
234
         loaded: true,
308
       console.info('生成资讯详情海报')
315
       console.info('生成资讯详情海报')
309
     })
316
     })
310
   }
317
   }
311
-  renderNews() {
318
+
319
+  render() {
312
     const { detail, loaded, isSaved, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
320
     const { detail, loaded, isSaved, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
313
     const { userInfo: { person: { personId, nickname, name } } } = this.props
321
     const { userInfo: { person: { personId, nickname, name } } } = this.props
314
     return (
322
     return (
315
-      <Block>
316
-        {/* 生成海报 */}
317
-        {posterVisible && (<Poster data={posterData} toggle={this.handleTogglePoster}></Poster>)}
318
-        {
319
-          loaded && (
320
-            <Block>
321
-              <ScrollView className="detail" scrollY>
322
-                <View class="detail-title">{detail.newsName}</View>
323
-                <View className="detail-stat">
324
-                  <View className='left-icon'>
325
-                    <View className='eye-num'><Text className="iconfont icon-eye"></Text>{detail.pvNum || 0}</View>
326
-                    {/* <View><Text className="iconfont icon-fenxiang1"></Text>{detail.shareNum || 0}</View> */}
327
-                    <View className='fenx'><Image src={require('@assets/person/fenxiang.png')} className='fenxiang1-img'></Image>{detail.shareNum || 0}</View>
323
+      <authorizationComponent>
324
+        <Block>
325
+          {/* 生成海报 */}
326
+          {posterVisible && (<Poster data={posterData} toggle={this.handleTogglePoster}></Poster>)}
327
+          {
328
+            loaded && (
329
+              <Block>
330
+                <ScrollView className="detail" scrollY>
331
+                  <View class="detail-title">{detail.newsName}</View>
332
+                  <View className="detail-stat">
333
+                    <View className='left-icon'>
334
+                      <View className='eye-num'><Text className="iconfont icon-eye"></Text>{detail.pvNum || 0}</View>
335
+                      {/* <View><Text className="iconfont icon-fenxiang1"></Text>{detail.shareNum || 0}</View> */}
336
+                      <View className='fenx'><Image src={require('@assets/person/fenxiang.png')} className='fenxiang1-img'></Image>{detail.shareNum || 0}</View>
337
+                    </View>
338
+                    <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
339
+                  </View>
340
+                  {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.newsImg)}></Image> */}
341
+                  <View className="detail-con">
342
+                    {/* <richText nodes={detail.newsDetail} ></richText> */}
343
+                    <import src='../../../components/wxParse/wxParse.wxml' />
344
+                    <template is='wxParse' data='{{wxParseData:article.nodes}}' />
345
+                  </View>
346
+                </ScrollView>
347
+                <Notice></Notice>
348
+                <BackHomeBtn style={consultShow ? "bottom:310rpx" : ''}></BackHomeBtn>
349
+                {
350
+                  consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={personId} name={name || nickname} data={consultData}></Consultant>
351
+                }
352
+                <View className="bot-nav flex">
353
+                  <View className='btn poster-btn' style={{ display: posterShow }} onClick={() => { this.handleTogglePoster(true) }}>
354
+                    {/* <Text className="iconfont icon-xiazai"></Text> */}
355
+                    <Image src={require('@assets/news/tupian.png')} className='poster-img'></Image>
356
+                    <Text className="txt">海报</Text>
357
+                  </View>
358
+                  <Button className="btn share-btn" open-type="share">
359
+                    {/* <Text className="icon-fenxiang iconfont"></Text> */}
360
+                    <Image src={require('@assets/news/fasong.png')} className='fenxiang-img'></Image>
361
+                    <Text className="txt">分享</Text>
362
+                  </Button>
363
+                  <View className="btn collection-btn" onClick={this.handleFavor}>
364
+                    {
365
+                      isSaved ? (
366
+                        <Text className="iconfont icon-shoucang saved"></Text>
367
+                      ) : (
368
+                          <Text className="iconfont icon-shoucang1"></Text>
369
+                        )
370
+                    }
371
+                    <Text className="txt">收藏</Text>
328
                   </View>
372
                   </View>
329
-                  <View>{dayjs(detail.createDate).format('YYYY-MM-DD')}</View>
330
-                </View>
331
-                {/* <Image mode="widthFix" style={{ width: '100%', marginTop: '20px' }} src={transferImage(detail.newsImg)}></Image> */}
332
-                <View className="detail-con">
333
-                  <import src='../../../components/wxParse/wxParse.wxml' />
334
-                  <template is='wxParse' data='{{wxParseData:article.nodes}}' />
335
-                </View>
336
-              </ScrollView>
337
-              <Notice></Notice>
338
-              <BackHomeBtn style={consultShow ? "bottom:310rpx" : ''}></BackHomeBtn>
339
-              {
340
-                consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={personId} name={name || nickname} data={consultData}></Consultant>
341
-              }
342
-              <View className="bot-nav flex">
343
-                <View className='btn poster-btn' style={{ display: posterShow }} onClick={() => { this.handleTogglePoster(true) }}>
344
-                  {/* <Text className="iconfont icon-xiazai"></Text> */}
345
-                  <Image src={require('@assets/news/tupian.png')} className='poster-img'></Image>
346
-                  <Text className="txt">海报</Text>
347
-                </View>
348
-                <Button className="btn share-btn" open-type="share">
349
-                  {/* <Text className="icon-fenxiang iconfont"></Text> */}
350
-                  <Image src={require('@assets/news/fasong.png')} className='fenxiang-img'></Image>
351
-                  <Text className="txt">分享</Text>
352
-                </Button>
353
-                <View className="btn collection-btn" onClick={this.handleFavor}>
354
-                  {
355
-                    isSaved ? (
356
-                      <Text className="iconfont icon-shoucang saved"></Text>
357
-                    ) : (
358
-                        <Text className="iconfont icon-shoucang1"></Text>
359
-                      )
360
-                  }
361
-                  <Text className="txt">收藏</Text>
362
-                </View>
363
 
373
 
364
-              </View>
365
-            </Block>
366
-          )
367
-        }
368
-      </Block>
369
-    );
370
-  }
371
-  
372
-  render(){
373
-  	return (
374
-  		<authorizationComponent>
375
-  			{this.renderNews()}
376
-  		</authorizationComponent>
377
-  	)
374
+                </View>
375
+              </Block>
376
+            )
377
+          }
378
+        </Block>
379
+      </authorizationComponent>
380
+    )
378
   }
381
   }
379
 }
382
 }

+ 8
- 1
src/pages/project/detail/index.js View File

105
     const { recordId } = this.state
105
     const { recordId } = this.state
106
     recordId && updatePoint(recordId)
106
     recordId && updatePoint(recordId)
107
 
107
 
108
-    Taro.setStorageSync('router', { query: {} })
108
+    const router = Taro.getStorageSync('router')
109
+    Taro.setStorageSync('router', {
110
+      ...router,
111
+      query: {
112
+        ...router.query,
113
+        consultant: undefined,
114
+      }
115
+    })
109
   }
116
   }
110
 
117
 
111
   componentWillReceiveProps() {
118
   componentWillReceiveProps() {