zhashaonan преди 6 години
родител
ревизия
9b93ee7fd2
променени са 3 файла, в които са добавени 18 реда и са изтрити 0 реда
  1. 1 0
      pages/details/details.js
  2. 4 0
      pages/details/details.wxml
  3. 13 0
      pages/details/details.wxss

+ 1 - 0
pages/details/details.js

@@ -79,6 +79,7 @@ Page({
     }, function (res) {
     }, function (res) {
       wx.hideLoading()
       wx.hideLoading()
       if (res.code == 200) {
       if (res.code == 200) {
+        console.log('resDatas:', res);
         self.createStars(res.datas.common_info.comments_rate)
         self.createStars(res.datas.common_info.comments_rate)
         if (res.datas.comments) {
         if (res.datas.comments) {
           self.createComments(res.datas.comments)
           self.createComments(res.datas.comments)

+ 4 - 0
pages/details/details.wxml

@@ -37,6 +37,10 @@
       <text class="f24 col999 ml10 line-through">天猫价:¥{{getOneSummary.goods_price}}</text>
       <text class="f24 col999 ml10 line-through">天猫价:¥{{getOneSummary.goods_price}}</text>
     </view>
     </view>
     <view class="f24 col666 l_height34 mt4">库存:{{getOneSummary.goods_storage}}件</view>
     <view class="f24 col666 l_height34 mt4">库存:{{getOneSummary.goods_storage}}件</view>
+    <view class="goods_gap" wx:if="{{getOneSummary['gap_show']}}">
+      {{getOneSummary['gap_desc']}}
+      <block wx:if="{{getOneSummary['discount_gap'] > 0}}">前往熊猫美妆APP,享受更多优惠。</block>
+    </view>
     <view class="n_goods_title">
     <view class="n_goods_title">
       <view class="brand_auth" wx:if="{{getOneSummary.brand_author_desc}}">{{getOneSummary.brand_author_desc}}</view>
       <view class="brand_auth" wx:if="{{getOneSummary.brand_author_desc}}">{{getOneSummary.brand_author_desc}}</view>
       <text decode="{{true}}">{{getOneSummary.goods_mobile_name}}&nbsp;&nbsp;{{getOneSummary.goods_jingle}}</text>
       <text decode="{{true}}">{{getOneSummary.goods_mobile_name}}&nbsp;&nbsp;{{getOneSummary.goods_jingle}}</text>

+ 13 - 0
pages/details/details.wxss

@@ -824,4 +824,17 @@
   display: none;
   display: none;
 }
 }
 
 
+.goods_gap {
+  margin: 20rpx -48rpx 0 -30rpx;
+  padding: 10rpx 0 10rpx 30rpx;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  background: #f7f7f7;
+  line-height: 48rpx;
+  font-size: 24rpx;
+  color: #333;
+
+}
+