|
@@ -86,7 +86,14 @@ export default class NewsDetail extends Component {
|
86
|
86
|
const { recordId } = this.state
|
87
|
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,7 +228,7 @@ export default class NewsDetail extends Component {
|
221
|
228
|
})
|
222
|
229
|
console.info('资讯详情')
|
223
|
230
|
})
|
224
|
|
-
|
|
231
|
+
|
225
|
232
|
this.setState({
|
226
|
233
|
detail: res,
|
227
|
234
|
loaded: true,
|
|
@@ -308,72 +315,68 @@ export default class NewsDetail extends Component {
|
308
|
315
|
console.info('生成资讯详情海报')
|
309
|
316
|
})
|
310
|
317
|
}
|
311
|
|
- renderNews() {
|
|
318
|
+
|
|
319
|
+ render() {
|
312
|
320
|
const { detail, loaded, isSaved, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
|
313
|
321
|
const { userInfo: { person: { personId, nickname, name } } } = this.props
|
314
|
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
|
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
|
}
|