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