李志伟 3 lat temu
rodzic
commit
b92e53b404

+ 20
- 19
src/pages/details/foodDetails/foodDetails.jsx Wyświetl plik

@@ -8,7 +8,7 @@ import {
8 8
 } from "@/services/home";
9 9
 import { getVerifyTargetList } from "@/services/payOrder";
10 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 12
 import Star from "@/components/Star/Star.jsx";
13 13
 import NoData from '@/components/NoData'
14 14
 import Cards from "@/components/foodCards/foodCards.jsx";
@@ -164,24 +164,25 @@ export default withLayout((props) => {
164 164
           style={{ height: '100%' }}
165 165
         >
166 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 186
             <view className='storeJs'>
186 187
               <view style={{ overflow: "hidden" }}>
187 188
                 <view className='storeName'>{detail.shopName}</view>

+ 12
- 17
src/pages/details/foodDetails/foodDetails.less Wyświetl plik

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

+ 13
- 12
src/pages/details/mjDetails/sceneryDetails.jsx Wyświetl plik

@@ -14,7 +14,7 @@ import SpinBox from "@/components/Spin/SpinBox";
14 14
 import TabIcon from '@/components/HorTabbar/TabIcon'
15 15
 import { useState, useEffect } from 'react'
16 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 18
 import useSave from "@/utils/hooks/useSave"
19 19
 import useLike from "@/utils/hooks/useLike"
20 20
 import Cards from '@/components/foodCards/foodCards.jsx'
@@ -113,24 +113,25 @@ export default withLayout((props) => {
113 113
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
114 114
         <scroll-view scrollY style={{ height: '100%' }}>
115 115
           <view className='storeDetails'>
116
+          <View className='huadong'>
116 117
             <Swiper
117 118
               className='swiper'
118 119
               circular
119
-              current={index}
120 120
               onChange={handchange}
121 121
             >
122 122
               {
123
-                imglist.map((item) =>
123
+                imglist.map((item) =>(
124 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 136
             <view className='storeJs'>
136 137
               <view className='introduce'>

+ 10
- 8
src/pages/details/mjDetails/sceneryDetails.less Wyświetl plik

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