Sfoglia il codice sorgente

商品详情促销活动显示

xiaohaizhao 1 anno fa
parent
commit
3bd5cb282b
2 ha cambiato i file con 24 aggiunte e 1 eliminazioni
  1. 15 0
      packageA/market/detail.scss
  2. 9 1
      packageA/market/detail.wxml

+ 15 - 0
packageA/market/detail.scss

@@ -123,6 +123,19 @@ swiper {
     padding: 0 !important;
   }
 
+
+  .activity {
+    width: 96%;
+    box-sizing: border-box;
+    text-align: center;
+    padding: 14rpx;
+    background-color: #F6E0E2;
+    color: #CB3B3B;
+    border-radius: 8rpx;
+    border: 1px #CB3B3B dashed;
+    margin-bottom: 20rpx;
+  }
+
   .product-box {
     display: flex;
     flex-wrap: wrap;
@@ -142,6 +155,8 @@ swiper {
     .active {
       background: #E7EEFF;
     }
+
+
   }
 
   .product-box:last-child {

+ 9 - 1
packageA/market/detail.wxml

@@ -70,7 +70,15 @@
         </view>
     </block>
 
-
+    <block wx:if="{{detail.canuseactivity.length}}">
+        <view class="label" style="border: none;">
+            此商品正在促销
+        </view>
+        <navigator class="activity" wx:for="{{detail.canuseactivity}}" wx:key="sa_promotionid" wx:for-item='it' url="/packageA/activity/detail?id={{it.sa_promotionid}}">
+            {{it.promname}}
+        </navigator>
+        <view style="height: 1rpx;" />
+    </block>
 
     <!-- 定制项 -->
     <view wx:if="{{detail.iscustomsize==1}}" style="padding-bottom: 20rpx;">