李志伟 3 years ago
parent
commit
f487df7e3f

+ 1
- 6
src/components/BadgeTag/index.jsx View File

12
 
12
 
13
   const icon = type === 'food' ||type=='shop'? food :type=='tourist'?mjTip : glTip;
13
   const icon = type === 'food' ||type=='shop'? food :type=='tourist'?mjTip : glTip;
14
 
14
 
15
-  const style = {
16
-    top,
17
-    left
18
-  }
19
-
20
   return (
15
   return (
21
-    <View className='badge-tag-box' style={style}>
16
+    <View className='badge-tag-box' style={{top:top,left:left,zIndex:1}}>
22
       <Image src={icon} className='badge-icon' />
17
       <Image src={icon} className='badge-icon' />
23
     </View>
18
     </View>
24
   )
19
   )

+ 0
- 1
src/components/CouponCard/Media/style.less View File

5
     box-sizing: border-box;
5
     box-sizing: border-box;
6
     width: 184px;
6
     width: 184px;
7
     position: relative;
7
     position: relative;
8
-
9
     padding: 0 20px 40px 0;
8
     padding: 0 20px 40px 0;
10
   }
9
   }
11
 
10
 

+ 2
- 2
src/hotel/pages/components/Extend/index.jsx View File

62
     newstr = newstr.substr(0, i + 1);
62
     newstr = newstr.substr(0, i + 1);
63
     return newstr;
63
     return newstr;
64
   }
64
   }
65
-  const [content2,setContent2]=useState(content)
65
+  const [content2, setContent2] = useState(content)
66
   const handelEdit = () => {
66
   const handelEdit = () => {
67
     if (javaTrim(content2) == '') {
67
     if (javaTrim(content2) == '') {
68
       Taro.showToast({
68
       Taro.showToast({
73
     }
73
     }
74
     setContent(content2)
74
     setContent(content2)
75
     const date = {
75
     const date = {
76
-      content:content2,
76
+      content: content2,
77
       contentType: 'text'
77
       contentType: 'text'
78
     }
78
     }
79
     update(item.extId, { ...item, ...date })
79
     update(item.extId, { ...item, ...date })

+ 1
- 1
src/hotel/pages/landlord/addRoom/addRoom.jsx View File

1
 import withLayout from '@/layouts'
1
 import withLayout from '@/layouts'
2
-import Taro, { useDidShow } from '@tarojs/taro'
2
+import Taro from '@tarojs/taro'
3
 import CustomNav from '@/components/CustomNav'
3
 import CustomNav from '@/components/CustomNav'
4
 import { View, Input, Button, Label, Textarea, Text, Image } from '@tarojs/components';
4
 import { View, Input, Button, Label, Textarea, Text, Image } from '@tarojs/components';
5
 import { useEffect, useState } from "react"
5
 import { useEffect, useState } from "react"

+ 2
- 3
src/hotel/pages/landlord/roomOrder/roomOrder.jsx View File

1
 import withLayout from '@/layouts'
1
 import withLayout from '@/layouts'
2
-import React, { useState, useEffect, useRef, useMemo } from 'react'
2
+import React, { useState, useEffect, useMemo } from 'react'
3
 import CustomNav from '@/components/CustomNav'
3
 import CustomNav from '@/components/CustomNav'
4
 import Taro from '@tarojs/taro'
4
 import Taro from '@tarojs/taro'
5
 import { useModel } from '@/store'
5
 import { useModel } from '@/store'
6
-import SpinBox from "@/components/Spin/SpinBox";
7
 import copy from '@/assets/icons/landlord/copy.png'
6
 import copy from '@/assets/icons/landlord/copy.png'
8
-import { Input, Button, View, Picker, Label, Image } from '@tarojs/components'
7
+import {View,  Label, Image } from '@tarojs/components'
9
 import List from '@/components/List';
8
 import List from '@/components/List';
10
 import { getRoomOrderList, getHotelDetail } from '@/services/landlord'
9
 import { getRoomOrderList, getHotelDetail } from '@/services/landlord'
11
 import './roomOrder.less'
10
 import './roomOrder.less'

+ 1
- 1
src/pages/details/foodDetails/foodDetails.jsx View File

159
           </view>
159
           </view>
160
       }
160
       }
161
 
161
 
162
-      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
162
+      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8'  }}>
163
         <scroll-view
163
         <scroll-view
164
           scrollY={isScroll}
164
           scrollY={isScroll}
165
           style={{ height: '100%' }}
165
           style={{ height: '100%' }}

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx View File

111
       }
111
       }
112
 
112
 
113
 
113
 
114
-      <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
114
+      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
115
         <scroll-view scrollY style={{ height: '100%' }}>
115
         <scroll-view scrollY style={{ height: '100%' }}>
116
           <view className='storeDetails'>
116
           <view className='storeDetails'>
117
             <View className='huadong'>
117
             <View className='huadong'>

+ 0
- 6
src/pages/index/index.jsx View File

4
 import Taro, { useDidShow } from '@tarojs/taro'
4
 import Taro, { useDidShow } from '@tarojs/taro'
5
 import CustomNav from '@/components/CustomNav'
5
 import CustomNav from '@/components/CustomNav'
6
 import logo from '@/assets/icons/comm/logo_small.png'
6
 import logo from '@/assets/icons/comm/logo_small.png'
7
-
8
 import { getHotelDetail } from '@/services/landlord'
7
 import { getHotelDetail } from '@/services/landlord'
9
 import { getTaRoom } from '@/services/taRoom​'
8
 import { getTaRoom } from '@/services/taRoom​'
10
 import withLayout from '@/layouts'
9
 import withLayout from '@/layouts'
70
           settitleLogo(e?.logo || logo)
69
           settitleLogo(e?.logo || logo)
71
         })
70
         })
72
       })
71
       })
73
-
74
-
75
     } else {
72
     } else {
76
-
77
     }
73
     }
78
-
79
-
80
   }, [roomId, hotelId])
74
   }, [roomId, hotelId])
81
 
75
 
82
   return (
76
   return (

+ 24
- 58
src/pages/index/tabs/Guide.jsx View File

1
-import { useState, useEffect, useRef } from "react";
1
+import { useState, useEffect } from "react";
2
 import Taro, { useDidShow } from '@tarojs/taro'
2
 import Taro, { useDidShow } from '@tarojs/taro'
3
 import MoreGuide from "@/components/MoreGuide";
3
 import MoreGuide from "@/components/MoreGuide";
4
 import BossCard from '@/components/BossCard'
4
 import BossCard from '@/components/BossCard'
5
 import SpinBox from "@/components/Spin/SpinBox";
5
 import SpinBox from "@/components/Spin/SpinBox";
6
-import {Image } from "@tarojs/components";
6
+import { Image } from "@tarojs/components";
7
 import GPS from '@/assets/icons/GuideCheck/GPS.png'
7
 import GPS from '@/assets/icons/GuideCheck/GPS.png'
8
 import copy_logo from '@/assets/icons/GuideCheck/copy_logo.png'
8
 import copy_logo from '@/assets/icons/GuideCheck/copy_logo.png'
9
 import Cup from '@/assets/icons/GuideCheck/Cup.png'
9
 import Cup from '@/assets/icons/GuideCheck/Cup.png'
33
   const trackClick = useTrackClick(router)
33
   const trackClick = useTrackClick(router)
34
 
34
 
35
   const [taRoomContent, setTaRoomContent] = useState([])
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
   const goContent = () => {
37
   const goContent = () => {
44
     if (roomOrderId) {
38
     if (roomOrderId) {
52
     }
46
     }
53
   }
47
   }
54
 
48
 
55
-
56
   useEffect(() => {
49
   useEffect(() => {
57
     goContent()
50
     goContent()
58
   }, [roomId, roomOrderId])
51
   }, [roomId, roomOrderId])
64
   const getGuidelist = () => {
57
   const getGuidelist = () => {
65
     setLoading(true)
58
     setLoading(true)
66
     getExtendContent('room', roomId, { pageSize: 500 }).then((res) => {
59
     getExtendContent('room', roomId, { pageSize: 500 }).then((res) => {
67
-      // setExtend(res.records || [])
68
-      setExtend(res.records)
60
+      setExtend(res.records || [])
69
       setIfroomId('reality')
61
       setIfroomId('reality')
70
       setLoading(false)
62
       setLoading(false)
71
-
72
     })
63
     })
73
     setLoading(true)
64
     setLoading(true)
74
   }
65
   }
92
       getRecommendList({ location: location }).then((res) => {
83
       getRecommendList({ location: location }).then((res) => {
93
         setPackage(res || [])
84
         setPackage(res || [])
94
         setLoading(false)
85
         setLoading(false)
95
-
96
       })
86
       })
97
       return
87
       return
98
     }
88
     }
99
-    if (taRoomContent?.wifiPassword === "") {
100
-      setWifiButtonStyle('none')
101
-    }
102
-    if (taRoomContent?.parkingAddress === "") {
103
-      setParkingButtonStyle('none')
104
-    }
105
   }, [roomId, taRoomContent?.wifiPassword, taRoomContent?.parkingAddress, location, taRoomContent.location])
89
   }, [roomId, taRoomContent?.wifiPassword, taRoomContent?.parkingAddress, location, taRoomContent.location])
106
 
90
 
107
 
91
 
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
   return (
135
   return (
152
     <scroll-view scrollY style={{ height: '100%' }}  >
136
     <scroll-view scrollY style={{ height: '100%' }}  >
171
                 </view>
155
                 </view>
172
               </view>
156
               </view>
173
               {/* --------房屋位置-------- */}
157
               {/* --------房屋位置-------- */}
174
-
175
-
176
               <view className='room-box-info-HouLocation'>
158
               <view className='room-box-info-HouLocation'>
177
                 <view className='room-bi-name-HouLocation' >
159
                 <view className='room-bi-name-HouLocation' >
178
                   <view className='room-bin-title-HouLocation'>房屋位置</view>
160
                   <view className='room-bin-title-HouLocation'>房屋位置</view>
179
                   <view className='room-bint-nameInfo-HouLocation'>
161
                   <view className='room-bint-nameInfo-HouLocation'>
180
                     <view className='room-bint-nameInfo-bool-HouLocation' >{taRoomContent?.address}</view>
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
                       <image className='room-bintn-image-HouLocation' src={GPS} />
164
                       <image className='room-bintn-image-HouLocation' src={GPS} />
183
                       <text className='room-bintn-text-HouLocation'>去这里</text>
165
                       <text className='room-bintn-text-HouLocation'>去这里</text>
184
                     </view>
166
                     </view>
185
                   </view>
167
                   </view>
186
                 </view>
168
                 </view>
187
               </view>
169
               </view>
188
-
189
-
190
-
191
-
192
-
193
-
194
               {/* --------停车场-------- */}
170
               {/* --------停车场-------- */}
195
               {
171
               {
196
-                !taRoomContent.parkingLocation ? <view></view>
197
-                  :
172
+                !taRoomContent.parkingLocation ?null:
198
                   <view className='room-box-info-Parking'>
173
                   <view className='room-box-info-Parking'>
199
                     <view className='room-bi-name-Parking' >
174
                     <view className='room-bi-name-Parking' >
200
                       <view className='room-bin-title-Parking'>停车位置</view>
175
                       <view className='room-bin-title-Parking'>停车位置</view>
201
                       <view className='room-bint-nameInfo-Parking'>
176
                       <view className='room-bint-nameInfo-Parking'>
202
                         <view className='room-bint-nameInfo-bool-Parking' >{taRoomContent?.parkingAddress}</view>
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
                           <image className='room-bintn-image-Parking' src={GPS} />
179
                           <image className='room-bintn-image-Parking' src={GPS} />
205
                           <text className='room-bintn-text-Parking'>去这里</text>
180
                           <text className='room-bintn-text-Parking'>去这里</text>
206
                         </view>
181
                         </view>
208
                     </view>
183
                     </view>
209
                   </view>
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
                   <view className='room-box-info-WIFIContent'>
189
                   <view className='room-box-info-WIFIContent'>
221
                     <view className='room-bi-name-WIFIContent' >
190
                     <view className='room-bi-name-WIFIContent' >
222
                       <view className='room-bin-title-WIFIContent'>WiFi信息</view>
191
                       <view className='room-bin-title-WIFIContent'>WiFi信息</view>
223
                       <view className='room-bint-nameInfo-WIFIContent'>
192
                       <view className='room-bint-nameInfo-WIFIContent'>
224
                         <view className='room-bint-nameInfo-bool-WIFIContent-wifi' >名称:{taRoomContent?.wifiName}</view>
193
                         <view className='room-bint-nameInfo-bool-WIFIContent-wifi' >名称:{taRoomContent?.wifiName}</view>
225
                         <view className='room-bint-nameInfo-bool-WIFIContent-password' >密码:{taRoomContent?.wifiPassword}</view>
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
                           <image className='room-bintn-image-WIFIContent' src={copy_logo} />
196
                           <image className='room-bintn-image-WIFIContent' src={copy_logo} />
228
                           <text className='room-bintn-text-WIFIContent'>复制</text>
197
                           <text className='room-bintn-text-WIFIContent'>复制</text>
229
                         </view>
198
                         </view>
230
                       </view>
199
                       </view>
231
                     </view>
200
                     </view>
232
                   </view>
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
             </SpinBox>
215
             </SpinBox>
250
           )
216
           )
251
         }
217
         }
258
         <view style={{ marginTop: '10rpx', paddingBottom: '60rpx' }}>
224
         <view style={{ marginTop: '10rpx', paddingBottom: '60rpx' }}>
259
           {(spackage || []).map((item, index) => <BossCard det={item} st={parseFloat(item.score.toFixed(1))} key={(index)} trackClick={trackClick} taRoomContent={taRoomContent} item={item} />)}
225
           {(spackage || []).map((item, index) => <BossCard det={item} st={parseFloat(item.score.toFixed(1))} key={(index)} trackClick={trackClick} taRoomContent={taRoomContent} item={item} />)}
260
         </view>
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
       </view>
228
       </view>
263
     </scroll-view>
229
     </scroll-view>
264
   )
230
   )
265
-}
231
+}

+ 4
- 15
src/pages/index/tabs/GuideCss/style.less View File

1
 @whiteColor: #fff;
1
 @whiteColor: #fff;
2
 
2
 
3
 .Guide-Home-box {
3
 .Guide-Home-box {
4
-  // width: 333333333333px;
5
   width: 94%;
4
   width: 94%;
6
   margin: auto;
5
   margin: auto;
7
 
6
 
8
   .room-box-info-ROOM {
7
   .room-box-info-ROOM {
9
-    width: 97%;
10
     display: flex;
8
     display: flex;
11
-    margin-top: 35px;
12
-    margin: auto;
9
+    padding: 10px;
13
     .room-bi-name-ROOM {
10
     .room-bi-name-ROOM {
14
       width: 100%;
11
       width: 100%;
15
 
12
 
32
   }
29
   }
33
   // -----------------房屋位置
30
   // -----------------房屋位置
34
   .room-box-info-HouLocation {
31
   .room-box-info-HouLocation {
35
-    width: 97%;
36
     display: flex;
32
     display: flex;
37
-    margin-top: 35px;
38
-    margin: auto;
33
+    padding: 10px;
39
 
34
 
40
     .room-bi-name-HouLocation {
35
     .room-bi-name-HouLocation {
41
       width: 100%;
36
       width: 100%;
90
   // -----------------停车场位置
85
   // -----------------停车场位置
91
 
86
 
92
   .room-box-info-Parking {
87
   .room-box-info-Parking {
93
-    width: 97%;
94
     display: flex;
88
     display: flex;
95
-    margin-top: 35px;
96
-    margin: auto;
89
+    padding: 10px;
97
     .room-bi-name-Parking {
90
     .room-bi-name-Parking {
98
       width: 100%;
91
       width: 100%;
99
 
92
 
147
   // -----------------WIFI
140
   // -----------------WIFI
148
 
141
 
149
   .room-box-info-WIFIContent {
142
   .room-box-info-WIFIContent {
150
-    width: 97%;
151
     display: flex;
143
     display: flex;
152
-    margin-top: 35px;
153
-    margin: auto;
144
+    padding: 10px;
154
     .room-bi-name-WIFIContent {
145
     .room-bi-name-WIFIContent {
155
       width: 100%;
146
       width: 100%;
156
 
147
 
318
     
309
     
319
   //攻略卡片.
310
   //攻略卡片.
320
   .Raiders-box-one {
311
   .Raiders-box-one {
321
-    // width: 100%;
322
-    // // background-color: black;
323
     margin-bottom: 60px;
312
     margin-bottom: 60px;
324
     display: flex;
313
     display: flex;
325
 
314
 

+ 1
- 9
src/pages/index/tabs/Recommend.jsx View File

4
 import locationimg from '@/assets/icons/housemantj/location.png'
4
 import locationimg from '@/assets/icons/housemantj/location.png'
5
 import Tip from '@/components/tip'
5
 import Tip from '@/components/tip'
6
 import List from '@/components/List';
6
 import List from '@/components/List';
7
-import NoData from '@/components/NoData'
8
-import Waterfall from '@/components/MasonryLayout/Waterfall';
9
 import MasonryLayout from '@/components/MasonryLayout';
7
 import MasonryLayout from '@/components/MasonryLayout';
10
 import { getIndexType, getResourceList } from '@/services/home'
8
 import { getIndexType, getResourceList } from '@/services/home'
11
 import { random } from '@/utils'
9
 import { random } from '@/utils'
12
 import Card from '../components/Card'
10
 import Card from '../components/Card'
13
 import './less/Recommend.less'
11
 import './less/Recommend.less'
14
 import { OfficialAccount } from '@tarojs/components'
12
 import { OfficialAccount } from '@tarojs/components'
15
-
16
 const listStyle = { height: '100%' }
13
 const listStyle = { height: '100%' }
17
 
14
 
18
 export default (props) => {
15
 export default (props) => {
19
   const { router, person, location } = props
16
   const { router, person, location } = props
20
-
21
   const listClass = useMemo(() => random('f'), [])
17
   const listClass = useMemo(() => random('f'), [])
22
   const [activeTab, setActiveTab] = useState(0)
18
   const [activeTab, setActiveTab] = useState(0)
23
   const [typeList, setTypeList] = useState([])
19
   const [typeList, setTypeList] = useState([])
27
   const rfTimes = useRef(0)
23
   const rfTimes = useRef(0)
28
 
24
 
29
   // 获取资源表信息
25
   // 获取资源表信息
30
-  // const [alllist, setAllList] = useState([])
31
   const [listData, setListData] = useState({ list: [], rfTimes: 0 })
26
   const [listData, setListData] = useState({ list: [], rfTimes: 0 })
32
 
27
 
33
 
28
 
49
   const handleDataChange = (value, e) => {
44
   const handleDataChange = (value, e) => {
50
     if (e.paramsChanged) {
45
     if (e.paramsChanged) {
51
       rfTimes.current += 1
46
       rfTimes.current += 1
52
-
53
       //如果context有的话代表他滚动了   那么切换tab页就置顶
47
       //如果context有的话代表他滚动了   那么切换tab页就置顶
54
       if (listRef.current?.context) {
48
       if (listRef.current?.context) {
55
         listRef.current.context.scrollTo({ top: 0 })
49
         listRef.current.context.scrollTo({ top: 0 })
56
       }
50
       }
57
     }
51
     }
58
-
59
     setListData({ list: value, rfTimes: rfTimes.current })
52
     setListData({ list: value, rfTimes: rfTimes.current })
60
   }
53
   }
61
 
54
 
64
     getIndexType({ pageSize: 20 }).then((res) => {
57
     getIndexType({ pageSize: 20 }).then((res) => {
65
       setTypeList(res.records || [])
58
       setTypeList(res.records || [])
66
       details(1, res.records[0].typeId)
59
       details(1, res.records[0].typeId)
67
-
68
     })
60
     })
69
   }, [])
61
   }, [])
70
 
62
 
125
       </view>
117
       </view>
126
     </view>
118
     </view>
127
   )
119
   )
128
-}
120
+}