Przeglądaj źródła

修复小程序和公众号显示销量问题

sugar1569 7 lat temu
rodzic
commit
a6f9c5d6b6

+ 8 - 2
application/wap/view/first/store/detail.html

@@ -16,7 +16,7 @@
             <div class="price">¥{$storeInfo.price|floatval}</div>
             <div class="oldprice">原价:¥{$storeInfo.ot_price|floatval}</div>
             <div class="info-amount flex"><span class="current">商品编号:{$storeInfo.id}</span> <span class="">库存:{$storeInfo.stock}{$storeInfo.unit_name}</span>
-                <span class="fr">销量:{$storeInfo.ficti}{$storeInfo.unit_name}</span></div>
+                <span class="fr">销量:{$storeInfo.ficti+$storeInfo.sales}{$storeInfo.unit_name}</span></div>
             {gt name="storeInfo['give_integral']" value="0"}
             <div class="integral">积分:{$storeInfo.give_integral|floatval} <span>赠送</span></div>
             {/gt}
@@ -115,6 +115,8 @@
                     this.cardShow = true;
                 }, goCart: function (values, cartNum) {
                     var checkedAttr = this.productValue[values.sort().join(',')], that = this;
+//                    console.log(values);
+//                    console.log(checkedAttr);
                     storeApi.setCart({
                         cartNum: cartNum,
                         uniqueId: checkedAttr === undefined ? 0 : checkedAttr.unique,
@@ -135,7 +137,11 @@
                     });
                     this.cardClose();
                 }, changeAttr: function (values) {
+                    console.log(values);
+                    //console.log(values.sort());
+                    //console.log(values.sort().join(','));
                     var checkedAttr = this.productValue[values.sort().join(',')];
+                    //console.log(values);console.log(checkedAttr);
                     if (!checkedAttr) {
                         this.setProductCardInfo({stock: 0});
                     } else {
@@ -225,7 +231,7 @@
                         desc: $product.store_info || $product.store_name,
 //                        imgUrl: location.origin + $product.image,
                         imgUrl: $product.image,
-                        link: $urlShare || "{:url('store/detail',array('id'=>$store['id'],'spuid'=>$userInfo['uid']))}"
+                        link: $urlShare || "{:url('store/detail',array('id'=>$storeInfo['id'],'spuid'=>$userInfo['uid']))}"
                     });
                 });
                 this.$nextTick(function () {

+ 1 - 1
application/wap/view/first/store/index.html

@@ -28,7 +28,7 @@
                         <div class="img"><img :src="item.image" /></div>
                         <div class="info-txt">
                             <p class="name" v-text="item.store_name"></p>
-                            <span class="count">已售{{item.ficti}}</span>
+                            <span class="count">已售{{item.ficti+item.sales}}</span>
                             <p class="price">¥{{item.price}}</p>
                         </div>
                     </a>

+ 1 - 1
view/crmebN/pages/product-con/index.js

@@ -875,7 +875,7 @@ Page({
     onShareAppMessage: function () {
         var that = this;
         return {
-            title: '小程序',
+            title: that.data.productSelect.store_name,
             path: app.globalData.openPages,
             // imageUrl: that.data.url + that.data.product.image,
             success: function () {

+ 2 - 2
view/crmebN/pages/product-con/index.wxml

@@ -43,7 +43,7 @@
     <view class='count-wrapper flex'>
       <view>原价:¥{{storeInfo.ot_price}}</view>
       <view>库存:{{storeInfo.stock}}{{storeInfo.unit_name}}</view>
-      <view>销量:{{storeInfo.ficti}}{{storeInfo.unit_name}}</view>
+      <view>销量:{{storeInfo.ficti+storeInfo.sales}}{{storeInfo.unit_name}}</view>
     </view>
   </view>
   <view class='block-bar' bindtap='goCoupon'>
@@ -78,7 +78,7 @@
       <view class='txt-msg'>{{reply.comment}}</view>
       <view class='time-bar'>{{reply.add_time}}</view>
     </view>
-    <view wx:if="{{reply.merchant_reply_content != null}}">
+    <view wx:if="{{reply.merchant_reply_content != ''}}">
        <view>管理员回复:</view>
       <view class='txt-msg'>{{reply.merchant_reply_content}}</view>
       <view class='time-bar'>{{reply.merchant_reply_time}}</view>

+ 2 - 1
view/crmebN/pages/product-con/index.wxss

@@ -56,6 +56,7 @@ background-color:#fff;padding:8rpx 0;border-radius:0;margin:0;line-height:2;}
 .poster-pop .close{width:46rpx;height:75rpx;position:fixed;right:0;top:-73rpx;}
 .poster-pop .save-poster{background-color:#df2d0a;font-size::22rpx;color:#fff;text-align:center;height:76rpx;line-height:76rpx;width:450rpx;}
 .mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:9;}
+.wxParse-p{margin-bottom: -5rpx;}
 @import "/pages/foo-tan/foo-tan.wxss";
 @import "/wxParse/wxParse.wxss";
-@import "/pages/home/home.wxss";
+@import "/pages/home/home.wxss";

+ 1 - 1
view/crmebN/pages/productSort/productSort.wxml

@@ -32,7 +32,7 @@
                       <view class='list-text {{_num==1?"list-text2":""}}'>{{item.store_name}}</view>
                  <view class='list-money flex'>
                      <view>
-                        <view class='list-num {{_num==1?"list-num2":""}}'>已售{{item.ficti}}</view>
+                        <view class='list-num {{_num==1?"list-num2":""}}'>已售{{item.ficti+item.sales}}</view>
                         <view class='money-red'><text class='list-f'>¥</text><text class='money-num'>{{item.price}}</text><text class='list-oo'></text><text class='list-tip'>精</text></view>
                      </view>
                       <view class='iconfont icon-102 list-gwc {{_num==1?"list-gwc2":""}}' data-id="{{item.id}}" bindtap='cart' ></view>