吃个甘蔗嚼一年 3 лет назад
Родитель
Сommit
bd6cb4320b

+ 1
- 6
src/components/BadgeTag/index.jsx Просмотреть файл

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

+ 0
- 1
src/components/CouponCard/Media/style.less Просмотреть файл

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

+ 2
- 2
src/hotel/pages/components/Extend/index.jsx Просмотреть файл

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

+ 1
- 1
src/hotel/pages/landlord/addRoom/addRoom.jsx Просмотреть файл

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

+ 1
- 1
src/pages/details/foodDetails/foodDetails.jsx Просмотреть файл

@@ -159,7 +159,7 @@ export default withLayout((props) => {
159 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 163
         <scroll-view
164 164
           scrollY={isScroll}
165 165
           style={{ height: '100%' }}

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx Просмотреть файл

@@ -111,7 +111,7 @@ export default withLayout((props) => {
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 115
         <scroll-view scrollY style={{ height: '100%' }}>
116 116
           <view className='storeDetails'>
117 117
             <View className='huadong'>

+ 0
- 2
src/pages/index/index.jsx Просмотреть файл

@@ -4,7 +4,6 @@ import React, { useState, useEffect } from 'react'
4 4
 import Taro, { useDidShow } from '@tarojs/taro'
5 5
 import CustomNav from '@/components/CustomNav'
6 6
 import logo from '@/assets/icons/comm/logo_small.png'
7
-
8 7
 import { getHotelDetail } from '@/services/landlord'
9 8
 import { getTaRoom } from '@/services/taRoom​'
10 9
 import withLayout from '@/layouts'
@@ -71,7 +70,6 @@ export default withLayout((props) => {
71 70
           settitleLogo(e?.logo || logo)
72 71
         })
73 72
       })
74
-
75 73
     }
76 74
   }, [roomId, hotelId])
77 75
 

+ 24
- 58
src/pages/index/tabs/Guide.jsx Просмотреть файл

@@ -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
+}

+ 4
- 15
src/pages/index/tabs/GuideCss/style.less Просмотреть файл

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

+ 1
- 9
src/pages/index/tabs/Recommend.jsx Просмотреть файл

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