李志伟 3 years ago
parent
commit
b92e53b404

+ 20
- 19
src/pages/details/foodDetails/foodDetails.jsx View File

8
 } from "@/services/home";
8
 } from "@/services/home";
9
 import { getVerifyTargetList } from "@/services/payOrder";
9
 import { getVerifyTargetList } from "@/services/payOrder";
10
 import { useState, useEffect, useRef } from "react";
10
 import { useState, useEffect, useRef } from "react";
11
-import { Button, Swiper, SwiperItem } from "@tarojs/components";
11
+import { Button, Swiper, SwiperItem, View } from "@tarojs/components";
12
 import Star from "@/components/Star/Star.jsx";
12
 import Star from "@/components/Star/Star.jsx";
13
 import NoData from '@/components/NoData'
13
 import NoData from '@/components/NoData'
14
 import Cards from "@/components/foodCards/foodCards.jsx";
14
 import Cards from "@/components/foodCards/foodCards.jsx";
164
           style={{ height: '100%' }}
164
           style={{ height: '100%' }}
165
         >
165
         >
166
           <view className='storeDetails'>
166
           <view className='storeDetails'>
167
-            <Swiper
168
-              className='swiper'
169
-              circular
170
-              current={index}
171
-              onChange={handchange}
172
-            >
173
-              {imglist.map((item, inx) => (
174
-                <SwiperItem key={inx}>
175
-                  <image src={item.url} mode='aspectFit' className='storeImage'>
176
-                    <view className='tpPage'>
177
-                      <text>
178
-                        {index + 1}/{imglist.length}
179
-                      </text>
180
-                    </view>
181
-                  </image>
182
-                </SwiperItem>
183
-              ))}
184
-            </Swiper>
167
+            <View className='huadong'>
168
+              <Swiper
169
+                circular
170
+                className='swiper'
171
+                onChange={handchange}
172
+              >
173
+                {imglist.map((item, inx) => (
174
+                  <SwiperItem key={inx}>
175
+                    <image src={item.url} mode='aspectFit' className='storeImage' />
176
+                  </SwiperItem>
177
+                ))}
178
+              </Swiper>
179
+              <view className='tpPage'>
180
+                <text>
181
+                  {index + 1}/{imglist.length}
182
+                </text>
183
+              </view>
184
+            </View>
185
+
185
             <view className='storeJs'>
186
             <view className='storeJs'>
186
               <view style={{ overflow: "hidden" }}>
187
               <view style={{ overflow: "hidden" }}>
187
                 <view className='storeName'>{detail.shopName}</view>
188
                 <view className='storeName'>{detail.shopName}</view>

+ 12
- 17
src/pages/details/foodDetails/foodDetails.less View File

3
   border-radius: 12px;
3
   border-radius: 12px;
4
   margin-bottom: 20px;
4
   margin-bottom: 20px;
5
 
5
 
6
-  .swiper {
7
-    height: calc((100vw - 60px) * 0.6);
8
-  }
9
-  .storeImage {
6
+  
7
+
8
+  .huadong{    
10
     position: relative;
9
     position: relative;
11
-    border-radius: 22px;
12
-    width: 100%;
13
-    height: 100%;
10
+    .swiper {
11
+      height: calc((100vw - 60px) * 0.6);
12
+      .storeImage {
13
+        border-radius: 22px;
14
+        width: 100%;
15
+        height: 100%;
16
+      }
17
+    }
14
     .tpPage {
18
     .tpPage {
15
       position: absolute;
19
       position: absolute;
16
       right: 20px;
20
       right: 20px;
26
       text {
30
       text {
27
         opacity: 0.64;
31
         opacity: 0.64;
28
       }
32
       }
29
-    }
33
+    }  
30
   }
34
   }
31
   .storeJs {
35
   .storeJs {
32
     padding: 20px;
36
     padding: 20px;
117
 }
121
 }
118
 .cs {
122
 .cs {
119
   height: 500px;
123
   height: 500px;
120
-  // background: rgb(240, 142, 142);
121
-  // background: radial-gradient(circle at top left, transparent 15px, rgb(240, 142, 142) 0) top left,
122
-  //           radial-gradient(circle at top right, transparent 15px, #58a 0) top right,
123
-  //           radial-gradient(circle at bottom left, transparent 15px, #58a 0) bottom left,
124
-  //           radial-gradient(circle at bottom right, transparent 15px, #58a 0) bottom right;
125
-
126
   background: radial-gradient(
124
   background: radial-gradient(
127
         circle at 82% top,
125
         circle at 82% top,
128
         transparent 15px,
126
         transparent 15px,
135
         rgb(230, 120, 120) 0
133
         rgb(230, 120, 120) 0
136
       )
134
       )
137
       bottom;
135
       bottom;
138
-
139
   background-repeat: no-repeat;
136
   background-repeat: no-repeat;
140
   background-size: auto 50%;
137
   background-size: auto 50%;
141
 }
138
 }
142
-
143
 .showMore {
139
 .showMore {
144
   width: 100%;
140
   width: 100%;
145
   background: linear-gradient(
141
   background: linear-gradient(
171
   width: 100%;
167
   width: 100%;
172
   margin-bottom: 40px;
168
   margin-bottom: 40px;
173
 }
169
 }
174
-
175
 .botton {
170
 .botton {
176
   font-size: 28px;
171
   font-size: 28px;
177
   color: #c0c8d3;
172
   color: #c0c8d3;

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

14
 import TabIcon from '@/components/HorTabbar/TabIcon'
14
 import TabIcon from '@/components/HorTabbar/TabIcon'
15
 import { useState, useEffect } from 'react'
15
 import { useState, useEffect } from 'react'
16
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
16
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
17
-import { Swiper, SwiperItem, Button } from '@tarojs/components';
17
+import { Swiper, SwiperItem, Button,View } from '@tarojs/components';
18
 import useSave from "@/utils/hooks/useSave"
18
 import useSave from "@/utils/hooks/useSave"
19
 import useLike from "@/utils/hooks/useLike"
19
 import useLike from "@/utils/hooks/useLike"
20
 import Cards from '@/components/foodCards/foodCards.jsx'
20
 import Cards from '@/components/foodCards/foodCards.jsx'
113
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
113
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
114
         <scroll-view scrollY style={{ height: '100%' }}>
114
         <scroll-view scrollY style={{ height: '100%' }}>
115
           <view className='storeDetails'>
115
           <view className='storeDetails'>
116
+          <View className='huadong'>
116
             <Swiper
117
             <Swiper
117
               className='swiper'
118
               className='swiper'
118
               circular
119
               circular
119
-              current={index}
120
               onChange={handchange}
120
               onChange={handchange}
121
             >
121
             >
122
               {
122
               {
123
-                imglist.map((item) =>
123
+                imglist.map((item) =>(
124
                   <SwiperItem>
124
                   <SwiperItem>
125
-                    <image src={item.url} mode='aspectFit' className='storeImage' >
126
-                      <view className='tpPage'>
127
-                        <text>{index + 1}/{imglist.length}</text>
128
-                      </view>
129
-                    </image>
130
-                  </SwiperItem>
131
-                )
132
-              }
133
-            </Swiper>
125
+                    <image src={item.url} mode='aspectFit' className='storeImage' />
126
+                    </SwiperItem>
127
+                ))}
128
+              </Swiper>
129
+              <view className='tpPage'>
130
+                <text>
131
+                  {index + 1}/{imglist.length}
132
+                </text>
133
+              </view>
134
+            </View>
134
 
135
 
135
             <view className='storeJs'>
136
             <view className='storeJs'>
136
               <view className='introduce'>
137
               <view className='introduce'>

+ 10
- 8
src/pages/details/mjDetails/sceneryDetails.less View File

2
   background-color: #fff;
2
   background-color: #fff;
3
   border-radius: 12px;
3
   border-radius: 12px;
4
   margin-bottom: 20px;
4
   margin-bottom: 20px;
5
-  .swiper {
6
-    height: calc((100vw - 60px) * 0.6);
7
-  }
8
-  .storeImage {
5
+  .huadong{    
9
     position: relative;
6
     position: relative;
10
-    border-radius: 22px;
11
-    width: 100%;
12
-    height: 100%;
7
+    .swiper {
8
+      height: calc((100vw - 60px) * 0.6);
9
+      .storeImage {
10
+        border-radius: 22px;
11
+        width: 100%;
12
+        height: 100%;
13
+      }
14
+    }
13
     .tpPage {
15
     .tpPage {
14
       position: absolute;
16
       position: absolute;
15
       right: 20px;
17
       right: 20px;
25
       text {
27
       text {
26
         opacity: 0.64;
28
         opacity: 0.64;
27
       }
29
       }
28
-    }
30
+    }  
29
   }
31
   }
30
   .storeJs {
32
   .storeJs {
31
     padding: 22px;
33
     padding: 22px;