张延森 3 年之前
父節點
當前提交
e58f78c8ca

+ 1
- 1
src/components/List/index.jsx 查看文件

@@ -107,7 +107,7 @@ export default React.forwardRef((props, ref) => {
107 107
       {...leftProps}
108 108
       className={`${className} list-view`}
109 109
     >
110
-      <SpinBox loading={loading} className='index-container' >
110
+      <SpinBox loading={loading}>
111 111
 
112 112
         {!render
113 113
           ? props.children

+ 1
- 1
src/components/toggleRole/ToggleRole.jsx 查看文件

@@ -31,7 +31,7 @@ export default (props) => {
31 31
   return (
32 32
 
33 33
     <Popup show={showCutover} maskClosable={maskClosable} onClose={onClose}>
34
-      <SpinBox loading={loading} className='index-container' >
34
+      <SpinBox loading={loading}>
35 35
         <view className='User-box-sths' >
36 36
           <view className='User-box-selectUser'>请选择身份:</view>
37 37
           <view className='User-box-tourist' onClick={goToPerson}>

+ 1
- 1
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx 查看文件

@@ -124,7 +124,7 @@ export default withLayout((props) => {
124 124
       <View className='index-container'>
125 125
         <View className='box-content'>
126 126
           <scroll-view scroll-y style='height: 100%;' >
127
-            <SpinBox loading={loading} className='index-container' >
127
+            <SpinBox loading={loading}>
128 128
 
129 129
               <view className='Refund-Content-box'>
130 130
                 <view className='title-image'>

+ 1
- 1
src/pages/MineUserAll/RefundMoney/index.jsx 查看文件

@@ -66,7 +66,7 @@ export default withLayout((props) => {
66 66
       <view className='index-navbar'>
67 67
         <CustomNav title='售后退款' />
68 68
       </view>
69
-      <SpinBox loading={loading} className='index-container' >
69
+      <SpinBox loading={loading}>
70 70
         <scroll-view
71 71
           scrollY
72 72
           style='height: calc(100vh - 176rpx);'

+ 27
- 35
src/pages/index/tabs/Guide.jsx 查看文件

@@ -33,12 +33,6 @@ export default (props) => {
33 33
 
34 34
   const trackClick = useTrackClick(router)
35 35
 
36
-  // 住宿经纬度
37
-  const Roomlog = useRef('')
38
-  const Roomlat = useRef('')
39
-  // 停车场经纬度
40
-  const Parklog = useRef('')
41
-  const Parklat = useRef('')
42 36
   const [taRoomContent, setTaRoomContent] = useState([])
43 37
   const RoomLocation = taRoomContent?.location
44 38
   //没有停车 wifi的就不显示按钮
@@ -73,10 +67,6 @@ export default (props) => {
73 67
       // 点击’去这里‘跳转导航
74 68
       setLoading(true)
75 69
       getTaRoom(roomId).then((res) => {
76
-        Roomlog.current = (!res.location).toString().split(',')[0]
77
-        Roomlat.current = (!res.location).toString().split(',')[1]
78
-        Parklog.current = (!res.parkingLocation).toString().split(',')[0]
79
-        Parklat.current = (!res.parkingLocation).toString().split(',')[1]
80 70
         setTaRoomContent(res || [])
81 71
         setLoading(false)
82 72
 
@@ -141,10 +131,10 @@ export default (props) => {
141 131
       setLoading(true)
142 132
       // 点击’去这里‘跳转导航
143 133
       getTaRoom(roomId).then((res) => {
144
-        Roomlog.current = (!res.location).toString().split(',')[0]
145
-        Roomlat.current = (!res.location).toString().split(',')[1]
146
-        Parklog.current = (!res.parkingLocation).toString().split(',')[0]
147
-        Parklat.current = (!res.parkingLocation).toString().split(',')[1]
134
+        // Roomlog.current = (!res.location).toString().split(',')[0]
135
+        // Roomlat.current = (!res.location).toString().split(',')[1]
136
+        // Parklog.current = (!res.parkingLocation).toString().split(',')[0]
137
+        // Parklat.current = (!res.parkingLocation).toString().split(',')[1]
148 138
         setTaRoomContent(res || [])
149 139
         setLoading(false)
150 140
       })
@@ -178,28 +168,33 @@ export default (props) => {
178 168
 
179 169
 
180 170
   const goRoomMap = () => {
181
-    Taro.openLocation({
182
-      longitude: Roomlog.current - 0,
183
-      latitude: Roomlat.current - 0,
184
-      name: taRoomContent.roomName,
185
-      address: taRoomContent.address,
186
-      scale: 12,
187
-    })
171
+    if (taRoomContent.location) {
172
+      const [longitude, latitude] = taRoomContent.location.split(',').map(x => x - 0)
173
+      
174
+      Taro.openLocation({
175
+        longitude,
176
+        latitude,
177
+        name: taRoomContent.roomName,
178
+        address: taRoomContent.address,
179
+        scale: 12,
180
+      })
181
+    }
188 182
   }
189 183
 
190 184
   const goParkMap = () => {
191
-    Taro.openLocation({
192
-      longitude: Parklog.current - 0,
193
-      latitude: Parklat.current - 0,
194
-      name: taRoomContent.parkingAddress,
195
-      address: taRoomContent.parkingAddress,
196
-      scale: 12,
197
-    })
185
+    if (taRoomContent.parkingLocation) {
186
+      const [longitude, latitude] = taRoomContent.parkingLocation.split(',').map(x => x - 0)
187
+
188
+      Taro.openLocation({
189
+        longitude,
190
+        latitude,
191
+        name: taRoomContent.parkingAddress,
192
+        address: taRoomContent.parkingAddress,
193
+        scale: 12,
194
+      })
195
+    }
198 196
   }
199 197
 
200
-
201
-
202
-
203 198
   const wifiCopy = () => {
204 199
     Taro.setClipboardData({
205 200
       data: taRoomContent?.wifiPassword,
@@ -213,12 +208,9 @@ export default (props) => {
213 208
     })
214 209
   }
215 210
 
216
-
217
-
218
-
219 211
   return (
220 212
     <scroll-view scrollY style='height:100%;'  >
221
-      <SpinBox loading={loading} className='index-container' >
213
+      <SpinBox loading={loading}>
222 214
 
223 215
         <view className='Guide-Home-box'>
224 216
           {