|
@@ -1,9 +1,9 @@
|
1
|
|
-import { useState, useEffect, useRef } from "react";
|
|
1
|
+import { useState, useEffect } from "react";
|
2
|
2
|
import Taro, { useDidShow } from '@tarojs/taro'
|
3
|
3
|
import MoreGuide from "@/components/MoreGuide";
|
4
|
4
|
import BossCard from '@/components/BossCard'
|
5
|
5
|
import SpinBox from "@/components/Spin/SpinBox";
|
6
|
|
-import {Image } from "@tarojs/components";
|
|
6
|
+import { Image } from "@tarojs/components";
|
7
|
7
|
import GPS from '@/assets/icons/GuideCheck/GPS.png'
|
8
|
8
|
import copy_logo from '@/assets/icons/GuideCheck/copy_logo.png'
|
9
|
9
|
import Cup from '@/assets/icons/GuideCheck/Cup.png'
|
|
@@ -33,12 +33,6 @@ export default (props) => {
|
33
|
33
|
const trackClick = useTrackClick(router)
|
34
|
34
|
|
35
|
35
|
const [taRoomContent, setTaRoomContent] = useState([])
|
36
|
|
- //没有停车 wifi的就不显示按钮
|
37
|
|
- const [wifiButtonStyle, setWifiButtonStyle] = useState('')
|
38
|
|
- const [parkingButtonStyle, setParkingButtonStyle] = useState('')
|
39
|
|
- const [guideStyle, setGuideStyle] = useState('')
|
40
|
|
- const parkingGps = taRoomContent.parkingLocation || []
|
41
|
|
- const roomGps = taRoomContent.location || []
|
42
|
36
|
|
43
|
37
|
const goContent = () => {
|
44
|
38
|
if (roomOrderId) {
|
|
@@ -52,7 +46,6 @@ export default (props) => {
|
52
|
46
|
}
|
53
|
47
|
}
|
54
|
48
|
|
55
|
|
-
|
56
|
49
|
useEffect(() => {
|
57
|
50
|
goContent()
|
58
|
51
|
}, [roomId, roomOrderId])
|
|
@@ -64,11 +57,9 @@ export default (props) => {
|
64
|
57
|
const getGuidelist = () => {
|
65
|
58
|
setLoading(true)
|
66
|
59
|
getExtendContent('room', roomId, { pageSize: 500 }).then((res) => {
|
67
|
|
- // setExtend(res.records || [])
|
68
|
|
- setExtend(res.records)
|
|
60
|
+ setExtend(res.records || [])
|
69
|
61
|
setIfroomId('reality')
|
70
|
62
|
setLoading(false)
|
71
|
|
-
|
72
|
63
|
})
|
73
|
64
|
setLoading(true)
|
74
|
65
|
}
|
|
@@ -92,16 +83,9 @@ export default (props) => {
|
92
|
83
|
getRecommendList({ location: location }).then((res) => {
|
93
|
84
|
setPackage(res || [])
|
94
|
85
|
setLoading(false)
|
95
|
|
-
|
96
|
86
|
})
|
97
|
87
|
return
|
98
|
88
|
}
|
99
|
|
- if (taRoomContent?.wifiPassword === "") {
|
100
|
|
- setWifiButtonStyle('none')
|
101
|
|
- }
|
102
|
|
- if (taRoomContent?.parkingAddress === "") {
|
103
|
|
- setParkingButtonStyle('none')
|
104
|
|
- }
|
105
|
89
|
}, [roomId, taRoomContent?.wifiPassword, taRoomContent?.parkingAddress, location, taRoomContent.location])
|
106
|
90
|
|
107
|
91
|
|
|
@@ -145,8 +129,8 @@ export default (props) => {
|
145
|
129
|
}
|
146
|
130
|
})
|
147
|
131
|
}
|
148
|
|
- const goIndex=()=>{
|
149
|
|
- Taro.redirectTo({url:'/pages/index/index'})
|
|
132
|
+ const goIndex = () => {
|
|
133
|
+ Taro.redirectTo({ url: '/pages/index/index' })
|
150
|
134
|
}
|
151
|
135
|
return (
|
152
|
136
|
<scroll-view scrollY style={{ height: '100%' }} >
|
|
@@ -171,36 +155,27 @@ export default (props) => {
|
171
|
155
|
</view>
|
172
|
156
|
</view>
|
173
|
157
|
{/* --------房屋位置-------- */}
|
174
|
|
-
|
175
|
|
-
|
176
|
158
|
<view className='room-box-info-HouLocation'>
|
177
|
159
|
<view className='room-bi-name-HouLocation' >
|
178
|
160
|
<view className='room-bin-title-HouLocation'>房屋位置</view>
|
179
|
161
|
<view className='room-bint-nameInfo-HouLocation'>
|
180
|
162
|
<view className='room-bint-nameInfo-bool-HouLocation' >{taRoomContent?.address}</view>
|
181
|
|
- <view className='room-bintn-button-HouLocation' onClick={() => { goRoomMap() }} style={{ display: wifiButtonStyle }}>
|
|
163
|
+ <view className='room-bintn-button-HouLocation' onClick={() => { goRoomMap() }}>
|
182
|
164
|
<image className='room-bintn-image-HouLocation' src={GPS} />
|
183
|
165
|
<text className='room-bintn-text-HouLocation'>去这里</text>
|
184
|
166
|
</view>
|
185
|
167
|
</view>
|
186
|
168
|
</view>
|
187
|
169
|
</view>
|
188
|
|
-
|
189
|
|
-
|
190
|
|
-
|
191
|
|
-
|
192
|
|
-
|
193
|
|
-
|
194
|
170
|
{/* --------停车场-------- */}
|
195
|
171
|
{
|
196
|
|
- !taRoomContent.parkingLocation ? <view></view>
|
197
|
|
- :
|
|
172
|
+ !taRoomContent.parkingLocation ?null:
|
198
|
173
|
<view className='room-box-info-Parking'>
|
199
|
174
|
<view className='room-bi-name-Parking' >
|
200
|
175
|
<view className='room-bin-title-Parking'>停车位置</view>
|
201
|
176
|
<view className='room-bint-nameInfo-Parking'>
|
202
|
177
|
<view className='room-bint-nameInfo-bool-Parking' >{taRoomContent?.parkingAddress}</view>
|
203
|
|
- <view className='room-bintn-button-Parking' onClick={() => { goParkMap() }} style={{ display: wifiButtonStyle }}>
|
|
178
|
+ <view className='room-bintn-button-Parking' onClick={() => { goParkMap() }}>
|
204
|
179
|
<image className='room-bintn-image-Parking' src={GPS} />
|
205
|
180
|
<text className='room-bintn-text-Parking'>去这里</text>
|
206
|
181
|
</view>
|
|
@@ -208,44 +183,35 @@ export default (props) => {
|
208
|
183
|
</view>
|
209
|
184
|
</view>
|
210
|
185
|
}
|
211
|
|
-
|
212
|
|
-
|
213
|
186
|
{/* --------无线网-------- */}
|
214
|
|
-
|
215
|
|
-
|
216
|
187
|
{
|
217
|
|
- !taRoomContent.wifiName && !taRoomContent.wifiPassword ? <view></view>
|
218
|
|
- :
|
219
|
|
-
|
|
188
|
+ !taRoomContent.wifiName && !taRoomContent.wifiPassword ?null:
|
220
|
189
|
<view className='room-box-info-WIFIContent'>
|
221
|
190
|
<view className='room-bi-name-WIFIContent' >
|
222
|
191
|
<view className='room-bin-title-WIFIContent'>WiFi信息</view>
|
223
|
192
|
<view className='room-bint-nameInfo-WIFIContent'>
|
224
|
193
|
<view className='room-bint-nameInfo-bool-WIFIContent-wifi' >名称:{taRoomContent?.wifiName}</view>
|
225
|
194
|
<view className='room-bint-nameInfo-bool-WIFIContent-password' >密码:{taRoomContent?.wifiPassword}</view>
|
226
|
|
- <view className='room-bintn-button-WIFIContent' onClick={() => { wifiCopy() }} style={{ display: wifiButtonStyle }}>
|
|
195
|
+ <view className='room-bintn-button-WIFIContent' onClick={() => { wifiCopy() }}>
|
227
|
196
|
<image className='room-bintn-image-WIFIContent' src={copy_logo} />
|
228
|
197
|
<text className='room-bintn-text-WIFIContent'>复制</text>
|
229
|
198
|
</view>
|
230
|
199
|
</view>
|
231
|
200
|
</view>
|
232
|
201
|
</view>
|
233
|
|
-
|
234
|
202
|
}
|
235
|
|
-
|
236
|
|
-
|
237
|
|
-
|
238
|
|
-
|
239
|
|
-
|
240
|
|
- <view className='Guide-Content-box' >
|
241
|
|
- <view className='title-image' style={{ display: guideStyle }} >
|
242
|
|
- <image mode='scaleToFill' className='title-image-cup' src={BlackSpot} />
|
243
|
|
- <text className='title-title-boss' >更多指引</text>
|
244
|
|
- </view>
|
245
|
|
- <view style={{ padding: '0 30rpx', boxSizing: 'border-box' }}>
|
246
|
|
- {(extend || []).map((item, index) => <MoreGuide key={(index)} item={item} />)}
|
247
|
|
- </view>
|
248
|
|
- </view>
|
|
203
|
+ {
|
|
204
|
+ extend.length === 0 ? null :
|
|
205
|
+ <view className='Guide-Content-box' >
|
|
206
|
+ <view className='title-image'>
|
|
207
|
+ <image mode='scaleToFill' className='title-image-cup' src={BlackSpot} />
|
|
208
|
+ <text className='title-title-boss' >更多指引</text>
|
|
209
|
+ </view>
|
|
210
|
+ <view style={{ padding: '0 30rpx', boxSizing: 'border-box' }}>
|
|
211
|
+ {(extend || []).map((item, index) => <MoreGuide key={(index)} item={item} />)}
|
|
212
|
+ </view>
|
|
213
|
+ </view>
|
|
214
|
+ }
|
249
|
215
|
</SpinBox>
|
250
|
216
|
)
|
251
|
217
|
}
|
|
@@ -258,8 +224,8 @@ export default (props) => {
|
258
|
224
|
<view style={{ marginTop: '10rpx', paddingBottom: '60rpx' }}>
|
259
|
225
|
{(spackage || []).map((item, index) => <BossCard det={item} st={parseFloat(item.score.toFixed(1))} key={(index)} trackClick={trackClick} taRoomContent={taRoomContent} item={item} />)}
|
260
|
226
|
</view>
|
261
|
|
- <Image mode='widthFix' style={{width:'100%'}} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex}/>
|
|
227
|
+ <Image mode='widthFix' style={{ width: '100%' }} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex} />
|
262
|
228
|
</view>
|
263
|
229
|
</scroll-view>
|
264
|
230
|
)
|
265
|
|
-}
|
|
231
|
+}
|