Commit 778b03d2a39f40e3b3205b89bc387eb76dde968b
1 parent
cb6a2522
秒杀多规格的优化
Showing
2 changed files
with
21 additions
and
13 deletions
pages/goods/goodsInfo/goodsInfo.js
| @@ -154,6 +154,7 @@ Page({ | @@ -154,6 +154,7 @@ Page({ | ||
| 154 | prom_buy_limit: 0, | 154 | prom_buy_limit: 0, |
| 155 | djs: null, | 155 | djs: null, |
| 156 | prom_st: 0, | 156 | prom_st: 0, |
| 157 | + f_prom_st: 0, | ||
| 157 | prom_r_null: 0, | 158 | prom_r_null: 0, |
| 158 | prom_end_time: null, | 159 | prom_end_time: null, |
| 159 | prom_start_time: null, | 160 | prom_start_time: null, |
| @@ -2276,6 +2277,7 @@ Page({ | @@ -2276,6 +2277,7 @@ Page({ | ||
| 2276 | openSpecModal_inte: 0, | 2277 | openSpecModal_inte: 0, |
| 2277 | openSpecModal_inte_normal: 0, | 2278 | openSpecModal_inte_normal: 0, |
| 2278 | openSpecModal_pt: 0, | 2279 | openSpecModal_pt: 0, |
| 2280 | + openSpecModal_flash_normal:0 | ||
| 2279 | }) | 2281 | }) |
| 2280 | 2282 | ||
| 2281 | if (e.prom_type == 4) { | 2283 | if (e.prom_type == 4) { |
| @@ -3473,7 +3475,7 @@ Page({ | @@ -3473,7 +3475,7 @@ Page({ | ||
| 3473 | if (item) this.setData({ | 3475 | if (item) this.setData({ |
| 3474 | sele_g: item, | 3476 | sele_g: item, |
| 3475 | data: item, | 3477 | data: item, |
| 3476 | - //gid: gid, | 3478 | + //gid: gid, //只去掉gid的更新 |
| 3477 | 3479 | ||
| 3478 | }); | 3480 | }); |
| 3479 | 3481 | ||
| @@ -4061,6 +4063,7 @@ Page({ | @@ -4061,6 +4063,7 @@ Page({ | ||
| 4061 | front_def_pickpu_list:th.data.def_pickpu_list, | 4063 | front_def_pickpu_list:th.data.def_pickpu_list, |
| 4062 | front_pickpu_listt:th.data.pickpu_list, | 4064 | front_pickpu_listt:th.data.pickpu_list, |
| 4063 | front_all_sto:th.data.all_sto, | 4065 | front_all_sto:th.data.all_sto, |
| 4066 | + front_is_show_sto_cat:th.data.is_show_sto_cat, | ||
| 4064 | }) | 4067 | }) |
| 4065 | } | 4068 | } |
| 4066 | }, | 4069 | }, |
| @@ -4833,6 +4836,7 @@ Page({ | @@ -4833,6 +4836,7 @@ Page({ | ||
| 4833 | prom_id: prom_id, | 4836 | prom_id: prom_id, |
| 4834 | prom_buy_limit: t.data.data.buy_limit, | 4837 | prom_buy_limit: t.data.data.buy_limit, |
| 4835 | prom_act: t.data.data, | 4838 | prom_act: t.data.data, |
| 4839 | + f_prom_act: t.data.data, | ||
| 4836 | prom_end_time: prom_end_time, | 4840 | prom_end_time: prom_end_time, |
| 4837 | prom_start_time: prom_start_time, | 4841 | prom_start_time: prom_start_time, |
| 4838 | isshow: 1, | 4842 | isshow: 1, |
| @@ -4851,7 +4855,8 @@ Page({ | @@ -4851,7 +4855,8 @@ Page({ | ||
| 4851 | if (endTime2 > newTime) { | 4855 | if (endTime2 > newTime) { |
| 4852 | ee.setData({ | 4856 | ee.setData({ |
| 4853 | prom_time_text: '距秒杀结束还有', | 4857 | prom_time_text: '距秒杀结束还有', |
| 4854 | - prom_st: 1 | 4858 | + prom_st: 1, |
| 4859 | + f_prom_st: 1 | ||
| 4855 | }) | 4860 | }) |
| 4856 | ee.countDown(endTime2); | 4861 | ee.countDown(endTime2); |
| 4857 | } | 4862 | } |
| @@ -7403,7 +7408,8 @@ Page({ | @@ -7403,7 +7408,8 @@ Page({ | ||
| 7403 | only_pk:ut.deep_cp(th.data.front_only_pk), | 7408 | only_pk:ut.deep_cp(th.data.front_only_pk), |
| 7404 | def_pickpu_list:ut.deep_cp(th.data.front_def_pickpu_list), | 7409 | def_pickpu_list:ut.deep_cp(th.data.front_def_pickpu_list), |
| 7405 | pickpu_list:ut.deep_cp(th.data.front_pickpu_listt), | 7410 | pickpu_list:ut.deep_cp(th.data.front_pickpu_listt), |
| 7406 | - all_sto:ut.deep_cp(th.data.front_all_sto) | 7411 | + all_sto:ut.deep_cp(th.data.front_all_sto), |
| 7412 | + is_show_sto_cat:th.data.front_is_show_sto_cat | ||
| 7407 | }) | 7413 | }) |
| 7408 | 7414 | ||
| 7409 | 7415 |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -465,26 +465,26 @@ | @@ -465,26 +465,26 @@ | ||
| 465 | </view> | 465 | </view> |
| 466 | </view> | 466 | </view> |
| 467 | 467 | ||
| 468 | - <!-- 许程 7.24 暂时注释 --> | 468 | + <!-- 许程 7.24 暂时注释,秒杀才有多规格--> |
| 469 | <view wx:if="{{prom_type==1}}"> | 469 | <view wx:if="{{prom_type==1}}"> |
| 470 | <view class="goods-num"> | 470 | <view class="goods-num"> |
| 471 | - <block wx:if="prom_st>0"> | ||
| 472 | - <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | ||
| 473 | - <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | 471 | + <block wx:if="f_prom_st>0"> |
| 472 | + <view class="stock">总数量:{{f_prom_act.is_virtual_count ? f_prom_act.goods_num : (f_prom_act.goods_num+f_prom_act.virtual)}}件</view> | ||
| 473 | + <view class="stock" wx:if="{{f_prom_act.buy_limit>0}}">限购:{{f_prom_act.buy_limit}}件</view> | ||
| 474 | <view class="stock" wx:else>限购:不限</view> | 474 | <view class="stock" wx:else>限购:不限</view> |
| 475 | 475 | ||
| 476 | - <block wx:if="{{prom_st==0}}"> | 476 | + <block wx:if="{{f_prom_st==0}}"> |
| 477 | <view class="sales">已购:0件</view> | 477 | <view class="sales">已购:0件</view> |
| 478 | </block> | 478 | </block> |
| 479 | <block wx:else> | 479 | <block wx:else> |
| 480 | - <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | 480 | + <view class="sales">已购:{{f_prom_act.buy_num+f_prom_act.virtual}}件</view> |
| 481 | </block> | 481 | </block> |
| 482 | </block> | 482 | </block> |
| 483 | <block wx:else> | 483 | <block wx:else> |
| 484 | - <view class="stock">总数量:{{prom_act.goods_num}}件</view> | ||
| 485 | - <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | 484 | + <view class="stock">总数量:{{f_prom_act.goods_num}}件</view> |
| 485 | + <view class="stock" wx:if="{{f_prom_act.buy_limit>0}}">限购:{{f_prom_act.buy_limit}}件</view> | ||
| 486 | <view class="stock" wx:else>限购:不限</view> | 486 | <view class="stock" wx:else>限购:不限</view> |
| 487 | - <view class="sales">已购:{{prom_act.buy_num}}件</view> | 487 | + <view class="sales">已购:{{f_prom_act.buy_num}}件</view> |
| 488 | </block> | 488 | </block> |
| 489 | </view> | 489 | </view> |
| 490 | </view> | 490 | </view> |
| @@ -1683,7 +1683,7 @@ | @@ -1683,7 +1683,7 @@ | ||
| 1683 | <view class="store-list"> | 1683 | <view class="store-list"> |
| 1684 | <!-- 如果还没有点击更多门店的时候 --> | 1684 | <!-- 如果还没有点击更多门店的时候 --> |
| 1685 | <block wx:if="{{choice_sort_store==0}}"> | 1685 | <block wx:if="{{choice_sort_store==0}}"> |
| 1686 | - <!-- 需要for循环 --> | 1686 | + <!-- 需要for循环is_show_sto_cat表示门店的数量已经超10个 --> |
| 1687 | <block wx:if="{{is_show_sto_cat==1}}"> | 1687 | <block wx:if="{{is_show_sto_cat==1}}"> |
| 1688 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 1688 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 1689 | <view class="store flex-vertical"> | 1689 | <view class="store flex-vertical"> |
| @@ -1717,6 +1717,7 @@ | @@ -1717,6 +1717,7 @@ | ||
| 1717 | </view> | 1717 | </view> |
| 1718 | </block> | 1718 | </block> |
| 1719 | <block wx:else> | 1719 | <block wx:else> |
| 1720 | + <!-- 此时的情况就是门店的数量少于10个 --> | ||
| 1720 | <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 1721 | <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
| 1721 | <view class="store flex-vertical"> | 1722 | <view class="store flex-vertical"> |
| 1722 | <!-- 需要点击事件 --> | 1723 | <!-- 需要点击事件 --> |
| @@ -1816,6 +1817,7 @@ | @@ -1816,6 +1817,7 @@ | ||
| 1816 | </block> | 1817 | </block> |
| 1817 | </view> | 1818 | </view> |
| 1818 | </block> | 1819 | </block> |
| 1820 | + | ||
| 1819 | <!-- ---------------分享弹窗--------------- --> | 1821 | <!-- ---------------分享弹窗--------------- --> |
| 1820 | <!-- 二维码显示页面 --> | 1822 | <!-- 二维码显示页面 --> |
| 1821 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> | 1823 | <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if="{{!canvasHidden}}"></canvas> |