Commit 38a7deba86150b1bbf11a6203263d5863bfc8a3e
1 parent
5e701d6a
普通商品详情页面,点击秒杀的跳转的优化
Showing
2 changed files
with
9 additions
and
3 deletions
pages/goods/goodsInfo/goodsInfo.js
@@ -2775,6 +2775,7 @@ Page({ | @@ -2775,6 +2775,7 @@ Page({ | ||
2775 | } | 2775 | } |
2776 | 2776 | ||
2777 | var check_up = 0; | 2777 | var check_up = 0; |
2778 | + //-- 如果是当前商品的时候 -- | ||
2778 | if (th.data.more_flash) { | 2779 | if (th.data.more_flash) { |
2779 | for (var i in th.data.more_flash) { | 2780 | for (var i in th.data.more_flash) { |
2780 | var item = th.data.more_flash[i]; | 2781 | var item = th.data.more_flash[i]; |
@@ -3404,7 +3405,7 @@ Page({ | @@ -3404,7 +3405,7 @@ Page({ | ||
3404 | return false; | 3405 | return false; |
3405 | } | 3406 | } |
3406 | 3407 | ||
3407 | - this.setData({sp_seleing:1}) | 3408 | + this.setData({sp_seleing:1,more_flash:null}) |
3408 | 3409 | ||
3409 | var that = this; | 3410 | var that = this; |
3410 | var th = this; | 3411 | var th = this; |
@@ -8910,7 +8911,12 @@ Page({ | @@ -8910,7 +8911,12 @@ Page({ | ||
8910 | go_more_flash: function (e) { | 8911 | go_more_flash: function (e) { |
8911 | var prom_id = e.currentTarget.dataset.id; | 8912 | var prom_id = e.currentTarget.dataset.id; |
8912 | var prom_type = e.currentTarget.dataset.prom_type; | 8913 | var prom_type = e.currentTarget.dataset.prom_type; |
8913 | - var goods_id = this.data.data.goods_id; | 8914 | + var is_sele = e.currentTarget.dataset.is_sele; |
8915 | + var goods_id=this.data.front_g.goods_id; | ||
8916 | + if(is_sele){ | ||
8917 | + goods_id=this.data.sele_g.goods_id; | ||
8918 | + } | ||
8919 | + | ||
8914 | var url = ""; | 8920 | var url = ""; |
8915 | 8921 | ||
8916 | switch (parseInt(prom_type)) { | 8922 | switch (parseInt(prom_type)) { |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -1912,7 +1912,7 @@ | @@ -1912,7 +1912,7 @@ | ||
1912 | <view class="t-c fs36" style="color: #c3172d">提示</view> | 1912 | <view class="t-c fs36" style="color: #c3172d">提示</view> |
1913 | 1913 | ||
1914 | <block wx:for="{{more_flash}}"> | 1914 | <block wx:for="{{more_flash}}"> |
1915 | - <view bindtap="go_more_flash" data-prom_type="{{item.prom_type}}" data-id="{{item.act_id}}" class="flex jc_sb fs28 mt20" > | 1915 | + <view bindtap="go_more_flash" data-is_sele="1" data-prom_type="{{item.prom_type}}" data-id="{{item.act_id}}" class="flex jc_sb fs28 mt20" > |
1916 | <view class="ellipsis-2" style="max-width: 80%">该商品有参与{{item.act_name}} {{tool.act_type(item.prom_type)}} 活动</view> | 1916 | <view class="ellipsis-2" style="max-width: 80%">该商品有参与{{item.act_name}} {{tool.act_type(item.prom_type)}} 活动</view> |
1917 | <view class="fs26 c-7b">去参与 | 1917 | <view class="fs26 c-7b">去参与 |
1918 | <text class="bg_jj is_more_cx"></text> | 1918 | <text class="bg_jj is_more_cx"></text> |