|
@@ -14,10 +14,10 @@ export default withLayout((props) => {
|
14
|
14
|
const { router, shareContent, trackData, person, page } = props;
|
15
|
15
|
const { id } = router.params;
|
16
|
16
|
|
17
|
|
- const [data,setData] = useState({})
|
|
17
|
+ const [data, setData] = useState({})
|
18
|
18
|
// 直播间信息
|
19
|
19
|
const livingRef = useRef()
|
20
|
|
-
|
|
20
|
+
|
21
|
21
|
// 本页面分享或者海报参数
|
22
|
22
|
const paramsRef = useParams({
|
23
|
23
|
id,
|
|
@@ -26,7 +26,7 @@ export default withLayout((props) => {
|
26
|
26
|
from: `${page.type}_share`,
|
27
|
27
|
});
|
28
|
28
|
const fullTrackData = { ...trackData, buildingId: data?.buildingId };
|
29
|
|
-
|
|
29
|
+
|
30
|
30
|
useShare(
|
31
|
31
|
{
|
32
|
32
|
title: shareContent.shareContentTitle || data?.name,
|
|
@@ -37,14 +37,14 @@ export default withLayout((props) => {
|
37
|
37
|
);
|
38
|
38
|
|
39
|
39
|
const getData = () => {
|
40
|
|
- queryLiveDetail(id).then(res=>{
|
41
|
|
- setData(res)
|
42
|
|
- if (res?.liveRoomParam) {
|
43
|
|
- const { livingid } = JSON.parse(res.liveRoomParam)
|
44
|
|
- getLivingCode(livingid).then((liveInfo) => {
|
45
|
|
- livingRef.current = liveInfo
|
46
|
|
- })
|
47
|
|
- }
|
|
40
|
+ queryLiveDetail(id).then(res => {
|
|
41
|
+ setData(res)
|
|
42
|
+ if (res?.liveRoomParam) {
|
|
43
|
+ const { livingid } = JSON.parse(res.liveRoomParam)
|
|
44
|
+ getLivingCode(livingid).then((liveInfo) => {
|
|
45
|
+ livingRef.current = liveInfo
|
|
46
|
+ })
|
|
47
|
+ }
|
48
|
48
|
})
|
49
|
49
|
};
|
50
|
50
|
|
|
@@ -58,7 +58,7 @@ export default withLayout((props) => {
|
58
|
58
|
}
|
59
|
59
|
|
60
|
60
|
// https://work.weixin.qq.com/api/doc/90000/90135/93635
|
61
|
|
- const { livingCode, status } = livingRef.current
|
|
61
|
+ const { livingCode, status } = livingRef.current
|
62
|
62
|
|
63
|
63
|
//
|
64
|
64
|
if (status >= 3) {
|
|
@@ -85,13 +85,19 @@ export default withLayout((props) => {
|
85
|
85
|
getData(id);
|
86
|
86
|
}
|
87
|
87
|
}, [id]);
|
88
|
|
-//
|
|
88
|
+ //
|
89
|
89
|
return <view className="liveDetail">
|
90
|
|
- {data.liveActivityId&&<><Image mode='aspectFill' src={getImgURL(data.detailTypeImg)} className='liveImg'></Image>
|
91
|
|
- <view className='liveDetail-menu'>
|
92
|
|
- <view onClick={()=>{Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${data.buildingId}` })}}><text className="iconfont icon-fenxiang"></text><text>查看楼盘</text></view>
|
93
|
|
- <view onClick={handleLive}><text className="iconfont icon-camera"></text><text>观看直播</text></view>
|
94
|
|
- <button openType="share"><text className="iconfont icon-fenxiang"></text><text>分享好友</text></button>
|
95
|
|
- </view></>}
|
|
90
|
+ {data.liveActivityId && <><Image mode='aspectFill' src={getImgURL(data.detailTypeImg)} className='liveImg'></Image>
|
|
91
|
+ <view className='liveDetail-menu flex-h'>
|
|
92
|
+ <view className='flex-item'>
|
|
93
|
+ <view onClick={() => { Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${data.buildingId}` }) }}><text className="iconfont icon-fenxiang"></text><text>查看楼盘</text></view>
|
|
94
|
+ </view>
|
|
95
|
+ <view className='flex-item'>
|
|
96
|
+ <view onClick={handleLive}><text className="iconfont icon-camera"></text><text>观看直播</text></view>
|
|
97
|
+ </view>
|
|
98
|
+ <view className='flex-item'>
|
|
99
|
+ <button openType="share"><text className="iconfont icon-fenxiang"></text><text>分享好友</text></button>
|
|
100
|
+ </view>
|
|
101
|
+ </view></>}
|
96
|
102
|
</view>;
|
97
|
103
|
});
|