Kaynağa Gözat

首页分类置灰 广告图替换

wenjie 6 saat önce
ebeveyn
işleme
ab8d7f4ab3

+ 0 - 1
app.json

@@ -18,7 +18,6 @@
     "pages/prod/prod",
     "pages/login/login",
     "pages/news-detail/news-detail",
-    "pages/my-users/my-users",
     "pages/income-details/income-details",
     "pages/take-notes/take-notes",
     "pages/draw-rule/draw-rule",

BIN
images/icon/dotted-line.png


BIN
images/imgs/adv.png


+ 4 - 4
pages/index/index.wxml

@@ -62,11 +62,11 @@
     <!-- <view class="swiper-grid-box" wx:if="{{categoryList1.length>0}}"> -->
     <view class="swiper-grid-box" wx:if="{{categoryList.length>0}}">
     <view class="grid-box">
-            <view class="my-grid-item" use-slot bind:tap="selectMenu" wx:for="{{categoryList}}" wx:key="categoryId" data-pic="{{item.pic}}" data-hassecond="{{item.hasSecond}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}">
+            <view class="my-grid-item" use-slot bind:tap="selectMenu" wx:for="{{categoryList}}" wx:key="categoryId" data-pic="{{item.pic}}" data-hassecond="{{item.children.length}}" data-itemid="{{item.categoryId}}" data-index="{{index}}" data-categories="{{item.categories}}" data-categoryName="{{item.categoryName}}">
               <view class='pic-box  {{selIndex==index?"active":""}}'>
-                <!-- <view wx:if="{{!item.hasSecond}}" class='sell-out-box'>
+                <view wx:if="{{!item.children.length}}" class='sell-out-box'>
                       <view class="sell-out-text">敬请期待</view>
-                  </view> -->
+                  </view>
                 <image class="swiper-grid-image" src="{{item.icon}}" />
               </view>
               <view class="swiper-grid-text">{{item.categoryName}}</view>
@@ -159,7 +159,7 @@
         <view class="text">因订单高峰期,配送可能延迟,请提前下单</view>
       </view>
 
-      <image class="adv" src="../../images/imgs/adv.png" mode=""/>
+      <image class="adv" src="https://zswl-shop.oss-cn-chengdu.aliyuncs.com/2026/03/50f5d204513f40d8b3522bc8ccb56ef3.jpg" mode=""/>
 
       <!-- 分类分页 -->
       <view wx:if="{{hotSalesList.length>0}}" class="tab-box" scroll-x="true" bounces="true" enhanced="true" show-scrollbar="false" style="width: 100%">

+ 1 - 0
pages/index/index.wxss

@@ -476,6 +476,7 @@ swiper.pic-swiper .banner {
   width: 100%;
   height: 236rpx;
   margin-bottom: 20rpx;
+  border-radius: 16rpx;
 }
 
 .bonus-box {

+ 9 - 0
pages/prod/prod.js

@@ -1735,6 +1735,15 @@ Page({
     })
   },
 
+  previewImage(e){
+    let current = e.currentTarget.dataset.current
+    console.log(current);
+    wx.previewImage({
+      current, // 当前显示图片的http链接
+      urls: this.data.imgs // 需要预览的图片http链接列表
+    })
+  },
+
   /**
    * 视频播放/停止按钮
    */

+ 1 - 1
pages/prod/prod.wxml

@@ -18,7 +18,7 @@
     <swiper class="swiper" wx:if="{{!isPlaying}}" circular="{{true}}" indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}}">
       <block wx:for="{{imgs}}" wx:key='index'>
         <swiper-item>
-          <image src='{{item}}'></image>
+          <image src='{{item}}' data-current="{{item}}" bind:tap="previewImage"></image>
         </swiper-item>
       </block>
     </swiper>