Commit a0d489d728bff36c15a49d278b843875ffeb41e7

Authored by WXD-SEASON\season
1 parent 646d23e5

预售商品详情显示空白修改

packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -431,7 +431,7 @@ Page({ @@ -431,7 +431,7 @@ Page({
431 431
432 //更新点击量 432 //更新点击量
433 getApp().request.put("/api/weshop/goods/updateClick", { 433 getApp().request.put("/api/weshop/goods/updateClick", {
434 - data: { store_id: os.stoid, goods_id: gid,user_id:getApp().globalData.user_id?getApp().globalData.user_id:0 } 434 + data: { store_id: os.stoid, goods_id: gid }
435 }) 435 })
436 }, 436 },
437 437
@@ -580,6 +580,8 @@ Page({ @@ -580,6 +580,8 @@ Page({
580 } 580 }
581 }) 581 })
582 582
  583 + this.getHistoryBuy(); //获取历史购买
  584 +
583 ee.setData({ 585 ee.setData({
584 gallery: gallery, 586 gallery: gallery,
585 is_collect: is_collect, 587 is_collect: is_collect,
@@ -3183,6 +3185,27 @@ Page({ @@ -3183,6 +3185,27 @@ Page({
3183 this.setData(ob); 3185 this.setData(ob);
3184 }, 3186 },
3185 3187
  3188 + //历史购买
  3189 + getHistoryBuy() {
  3190 + let _this = this;
  3191 + let req_data = {
  3192 + store_id: os.stoid,
  3193 + goods_id: this.data.gid,
  3194 + pay_status: 1,
  3195 + rndid: 1
  3196 + };
  3197 + getApp().request.promiseGet('/api/weshop/ordergoods/list', {
  3198 + data: req_data,
  3199 + })
  3200 + .then(res => {
  3201 + if (t.ajax_ok(res)) {
  3202 + _this.setData({
  3203 + historyBuyInfo: res.data.data.pageData,
  3204 + })
  3205 + }
  3206 + })
  3207 +},
  3208 +
3186 //--调用更新阶梯团的接口-- 3209 //--调用更新阶梯团的接口--
3187 update_jiti: function (id) { 3210 update_jiti: function (id) {
3188 var th = this; 3211 var th = this;
@@ -3832,33 +3855,17 @@ Page({ @@ -3832,33 +3855,17 @@ Page({
3832 getApp().pre_img(this.data.shareImgPath); 3855 getApp().pre_img(this.data.shareImgPath);
3833 }, 3856 },
3834 3857
3835 - onShareTimeline() {  
3836 - getApp().globalData.no_clear=1;  
3837 -  
3838 - var th=this;  
3839 - var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : '';  
3840 - if (!store_name)  
3841 - store_name = getApp().globalData.setting.appName;  
3842 -  
3843 - var url = "goods_id=" + th.data.gid+"&pre_id="+th.data.pre_arr.id;  
3844 - if (getApp().globalData.user_id) {  
3845 - url += "&first_leader=" + getApp().globalData.user_id;  
3846 - }  
3847 -  
3848 - //-- 如果房间分享,且不是会员分享的 --  
3849 - if (getApp().globalData.room_id &&  
3850 - th.data.data.goods_id == getApp().globalData.room_goods_id &&  
3851 - !getApp().globalData.room_user_share  
3852 - ) {  
3853 - url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";  
3854 - }  
3855 3858
3856 - return {  
3857 - title: this.data.data.goods_name + '-' + store_name,  
3858 - imageUrl: this.data.gallery[0].image_url,  
3859 - query: url  
3860 - }  
3861 - }, 3859 + onShareTimeline() {
  3860 + getApp().globalData.no_clear=1;
  3861 + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : '';
  3862 + if (!store_name)
  3863 + store_name = getApp().globalData.setting.appName;
  3864 + return {
  3865 + title: this.data.data.goods_name + '-' + store_name,
  3866 + imageUrl: this.data.gallery[0].image_url,
  3867 + }
  3868 + },
3862 3869
3863 clickCollapse() { 3870 clickCollapse() {
3864 this.setData({ flag: !this.data.flag, }) 3871 this.setData({ flag: !this.data.flag, })
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -17,21 +17,22 @@ @@ -17,21 +17,22 @@
17 <view class="goods-detail"> 17 <view class="goods-detail">
18 <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> 18 <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}">
19 19
20 - <!-- 历史购买记录 -->  
21 - <view class="swiper-container"> 20 + <!-- 左上角轮播 历史购买记录 -->
  21 + <view class="swiper-container" wx:if="{{historyBuyInfo.length}}">
22 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> 22 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000">
23 - <swiper-item class="swiper-item" wx:for=""> 23 + <swiper-item class="swiper-item" wx:for="{{historyBuyInfo}}" wx:key="order_id">
24 <view class="item"> 24 <view class="item">
25 <view class="avatar-container"> 25 <view class="avatar-container">
26 - <image src=""></image> 26 + <image src="{{item.head_pic}}"></image>
27 </view> 27 </view>
28 <view class="flex ai_c pd10"> 28 <view class="flex ai_c pd10">
29 - <view class="nickname ellipsis-1x">abson下单成功</view> 29 + <view class="nickname ellipsis-1x">{{item.nickname}}下单成功</view>
30 </view> 30 </view>
31 </view> 31 </view>
32 </swiper-item> 32 </swiper-item>
33 </swiper> 33 </swiper>
34 </view> 34 </view>
  35 +
35 <!-- 视频 --> 36 <!-- 视频 -->
36 <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}" 37 <!-- <swiper bindchange="swiperChange"class="xc-pictures swiperContainer rel" current="{{swiperCurrent}}"
37 indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> --> 38 indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> -->