Commit 40a10548760c2f8a4295d9a8a072245e592fb546
1 parent
1d10de0e
线下取价的功能bug优化
Showing
2 changed files
with
7 additions
and
2 deletions
pages/cart/cart/cart.js
@@ -83,7 +83,7 @@ Page({ | @@ -83,7 +83,7 @@ Page({ | ||
83 | if(item.end_time<ut.gettimestamp()){ | 83 | if(item.end_time<ut.gettimestamp()){ |
84 | is_open_offline=0; | 84 | is_open_offline=0; |
85 | } | 85 | } |
86 | - th.data.is_open_offline=0; | 86 | + th.data.is_open_offline=is_open_offline; |
87 | th.getCardList(); | 87 | th.getCardList(); |
88 | }); | 88 | }); |
89 | 89 |
pages/goods/goodsInfo/goodsInfo.js
@@ -1689,6 +1689,11 @@ Page({ | @@ -1689,6 +1689,11 @@ Page({ | ||
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | var cur_goods=this.data.sele_g; | 1691 | var cur_goods=this.data.sele_g; |
1692 | + var cur_price=cur_goods.shop_price; | ||
1693 | + if(th.data.card_field && cur_goods[th.data.card_field]>0){ | ||
1694 | + cur_price=cur_goods[th.data.card_field]; | ||
1695 | + } | ||
1696 | + | ||
1692 | var user_info = getApp().globalData.userInfo; | 1697 | var user_info = getApp().globalData.userInfo; |
1693 | //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行 | 1698 | //获取一下接口,判断是不是有线下接口,必须是普通商品,全局优惠活动也是不行 |
1694 | if(cur_goods.prom_type==0 && !this.data.prom_goods){ | 1699 | if(cur_goods.prom_type==0 && !this.data.prom_goods){ |
@@ -1704,7 +1709,7 @@ Page({ | @@ -1704,7 +1709,7 @@ Page({ | ||
1704 | success:function(res){ | 1709 | success:function(res){ |
1705 | if(res.data.code==0 && res.data.data && res.data.data.length>0){ | 1710 | if(res.data.code==0 && res.data.data && res.data.data.length>0){ |
1706 | var datalist=res.data.data; | 1711 | var datalist=res.data.data; |
1707 | - if(datalist[0].WarePrice<cur_goods.shop_price){ | 1712 | + if(datalist[0].WarePrice<cur_price){ |
1708 | cur_goods.offline_price=datalist[0].WarePrice; //存储线下活动的价格 | 1713 | cur_goods.offline_price=datalist[0].WarePrice; //存储线下活动的价格 |
1709 | cur_goods.pricing_type=datalist[0].PriceType; //存储线下活动的类型 | 1714 | cur_goods.pricing_type=datalist[0].PriceType; //存储线下活动的类型 |
1710 | } | 1715 | } |