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,8 +62,21 @@ var g_filters = { | ||
62 | if(min_name.length>4 ) min_name=min_name.substring(0, 8); | 62 | if(min_name.length>4 ) min_name=min_name.substring(0, 8); |
63 | return min_name; | 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 | module.exports = { | 78 | module.exports = { |
67 | is_has_rank:g_filters.is_has_rank, | 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 | \ No newline at end of file | 83 | \ No newline at end of file |
packageA/pages/distribution/goods/goods.js
@@ -510,6 +510,11 @@ Page({ | @@ -510,6 +510,11 @@ Page({ | ||
510 | * promiseGet请求数据 | 510 | * promiseGet请求数据 |
511 | */ | 511 | */ |
512 | getData: function(isInit, url, data, isShowLoading) { | 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 | return new Promise(function(resolve, reject) { | 518 | return new Promise(function(resolve, reject) { |
514 | 519 | ||
515 | app.request.promiseGet(url, { | 520 | app.request.promiseGet(url, { |
packageA/pages/distribution/goods/goods.wxml
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | 75 | ||
76 | </label> --> | 76 | </label> --> |
77 | <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/> | 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 | <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view> | 79 | <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view> |
80 | <view class="flex fdc jc_sb"> | 80 | <view class="flex fdc jc_sb"> |
81 | <view class="ellipsis-2">{{item.goods_name}}</view> | 81 | <view class="ellipsis-2">{{item.goods_name}}</view> |
@@ -214,7 +214,7 @@ | @@ -214,7 +214,7 @@ | ||
214 | </checkbox-group> | 214 | </checkbox-group> |
215 | 215 | ||
216 | <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else> | 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 | <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/> | 218 | <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/> |
219 | <view class="pd20 fs26 flex jc_sb fdc f1"> | 219 | <view class="pd20 fs26 flex jc_sb fdc f1"> |
220 | <view class="ellipsis-2">{{item.goods_name}}</view> | 220 | <view class="ellipsis-2">{{item.goods_name}}</view> |
pages/goods/goodsInfo/goodsInfo.js
@@ -805,8 +805,9 @@ Page({ | @@ -805,8 +805,9 @@ Page({ | ||
805 | ee.data.prom_id=t.data.data.prom_id; | 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 | t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss'); | 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,6 +3125,7 @@ Page({ | ||
3124 | this.get_sto(); | 3125 | this.get_sto(); |
3125 | this.get_sku(o.stoid, this.data.data, gid); | 3126 | this.get_sku(o.stoid, this.data.data, gid); |
3126 | this.check_has_flash(); | 3127 | this.check_has_flash(); |
3128 | + this.check_is_youhui(gid,1); | ||
3127 | return false; | 3129 | return false; |
3128 | } | 3130 | } |
3129 | 3131 |