Переглянути джерело

修改案例详情 轮播图

Jake 1 місяць тому
батько
коміт
08f2149116

+ 13 - 5
packages/app/src/pages/home/spread/product-detail/index.vue

@@ -134,16 +134,24 @@ onShareTimeline(() => ({
   <div class="flex-grow flex flex-col">
     <div class="aspect-[1.34/1] relative">
       <div class="absolute aspect-[1.26/1] top-0 w-full">
-        <wd-img width="100%" height="100%" :src="data?.productDetailsImgUrl" />
+<!--        <wd-img width="100%" height="100%" :src="data?.productDetailsImgUrl" />-->
+        <swiper>
+          <template v-for="(it, index) in data?.productDetailsImgUrl?.split(',')" :key="index">
+            <swiper-item>
+              <wd-img width="100%" height="100%" mode="aspectFill" :src="it" />
+            </swiper-item>
+          </template>
+        </swiper>
       </div>
     </div>
     <div class="relative flex-1 bg-white p-7 flex flex-col gap-6 rounded-tl-2xl rounded-tr-2xl">
-      <div v-if="data.needPoints == 1 " class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px] mr-1">
-        {{ data.points  }}折
+      <div
+        v-if="data.needPoints == 1"
+        class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px] mr-1"
+      >
+        {{ data.points }}折
       </div>
       <div class="flex">
-
-
         <div class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
           {{ data?.prodcutName }}
         </div>