Commit 813347b2c08464aec3bbdcb670fbc77637601862
1 parent
13998654
秒杀预热没有开始要参加优惠促销
Showing
4 changed files
with
25 additions
and
5 deletions
packageA/pages/distribution/goods/g_filter.wxs
... | ... | @@ -62,8 +62,21 @@ var g_filters = { |
62 | 62 | if(min_name.length>4 ) min_name=min_name.substring(0, 8); |
63 | 63 | return min_name; |
64 | 64 | }, |
65 | + | |
66 | + //跳转的接口 | |
67 | + get_goods_url:function(item){ | |
68 | + var url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id | |
69 | + if(item.prom_type==8){ | |
70 | + url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id | |
71 | + } | |
72 | + if(item.prom_type==1 && item.prom_id>0 ){ | |
73 | + url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; | |
74 | + } | |
75 | + return url1; | |
76 | + } | |
65 | 77 | } |
66 | 78 | module.exports = { |
67 | 79 | is_has_rank:g_filters.is_has_rank, |
68 | - get_card_price:g_filters.get_card_price, | |
80 | + get_card_price:g_filters.get_card_price, | |
81 | + get_goods_url:g_filters.get_goods_url | |
69 | 82 | } |
70 | 83 | \ No newline at end of file | ... | ... |
packageA/pages/distribution/goods/goods.js
... | ... | @@ -510,6 +510,11 @@ Page({ |
510 | 510 | * promiseGet请求数据 |
511 | 511 | */ |
512 | 512 | getData: function(isInit, url, data, isShowLoading) { |
513 | + | |
514 | + var user_id=getApp().globalData.user_id; | |
515 | + if(!user_id) user_id=0; | |
516 | + data.user_id=user_id; | |
517 | + | |
513 | 518 | return new Promise(function(resolve, reject) { |
514 | 519 | |
515 | 520 | app.request.promiseGet(url, { | ... | ... |
packageA/pages/distribution/goods/goods.wxml
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | |
76 | 76 | </label> --> |
77 | 77 | <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/> |
78 | - <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}"> | |
78 | + <view class="flex pdl10" bindtap="goto" data-url="{{g_filter.get_goods_url(item)}}"> | |
79 | 79 | <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view> |
80 | 80 | <view class="flex fdc jc_sb"> |
81 | 81 | <view class="ellipsis-2">{{item.goods_name}}</view> |
... | ... | @@ -214,7 +214,7 @@ |
214 | 214 | </checkbox-group> |
215 | 215 | |
216 | 216 | <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else> |
217 | - <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}"> | |
217 | + <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="{{g_filter.get_goods_url(item)}}"> | |
218 | 218 | <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/> |
219 | 219 | <view class="pd20 fs26 flex jc_sb fdc f1"> |
220 | 220 | <view class="ellipsis-2">{{item.goods_name}}</view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -805,8 +805,9 @@ Page({ |
805 | 805 | ee.data.prom_id=t.data.data.prom_id; |
806 | 806 | } |
807 | 807 | |
808 | - if(ee.data.prom_type!=1 && ee.data.prom_type!=4 && ee.data.prom_type!=6 && ee.data.prom_type!=2) | |
809 | - ee.check_is_youhui(ee.data.gid); | |
808 | + if(ee.data.prom_type!=1 && ee.data.prom_type!=4 && ee.data.prom_type!=6 && ee.data.prom_type!=2){ | |
809 | + ee.check_is_youhui(ee.data.gid); | |
810 | + } | |
810 | 811 | |
811 | 812 | t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); |
812 | 813 | |
... | ... | @@ -3124,6 +3125,7 @@ Page({ |
3124 | 3125 | this.get_sto(); |
3125 | 3126 | this.get_sku(o.stoid, this.data.data, gid); |
3126 | 3127 | this.check_has_flash(); |
3128 | + this.check_is_youhui(gid,1); | |
3127 | 3129 | return false; |
3128 | 3130 | } |
3129 | 3131 | ... | ... |