Merged
Merge Request #466 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants


app.js
... ... @@ -129,7 +129,7 @@ App({
129 129 cartGoodsNum:this.globalData.cartGoodsNum
130 130 })
131 131 },
132   -
  132 +
133 133 globalData: {
134 134 cartGoodsNum:0, //购物车总数量
135 135 isTabBar :false,
... ... @@ -186,7 +186,6 @@ App({
186 186 app.globalData.user_id= app.globalData.userInfo.user_id;
187 187 }
188 188 }
189   -
190 189 wx.getSystemInfo({
191 190 success: (res) => {
192 191 // console.log(res)
... ... @@ -594,6 +593,8 @@ App({
594 593 this.globalData.wuliu=null; //关闭要把物流清空
595 594 this.globalData.room_id=null; //关闭要把房间号关闭
596 595 this.globalData.room_goods_id=null; //关闭要把物流清空
  596 + this.globalData.config2=null; //清除config2的缓存
  597 + this.globalData.config=null; //清除config的缓存
597 598 }
598 599  
599 600  
... ...
packageA/pages/liveStreamDetails/liveStreamDetails.js
... ... @@ -152,7 +152,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un
152 152 // console.log('----------------v', headImg);
153 153  
154 154 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
155   - os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo";
  155 + os.stoid + "?sceneValue=1012" + "&pageValue=packageA/pages/liveStreamDetails/liveStreamDetails";
156 156  
157 157 // 以iPhone6为例,375/750 = 0.5
158 158 // let scale = this.data.windowWidth / 375;
... ...
pages/cart/cart2/cart2.js
... ... @@ -675,7 +675,7 @@ Page({
675 675 item_map.is_bz = get_data.is_bz; //是不是倍增
676 676 item_map.bs = get_data.bs; //是不是倍数
677 677 item_map.is_past = get_data.is_past; //是不是包邮
678   - item_map.prom_price = get_data.price?get_data.price:item_map.price;
  678 + item_map.prom_price = get_data.price>=0?get_data.price:item_map.price;
679 679 item_map.s_intValue = get_data.intValue;
680 680 item_map.s_coupon_id = get_data.coupon_id;
681 681 item_map.s_coupon_num = get_data.coupon_num;
... ... @@ -699,7 +699,7 @@ Page({
699 699  
700 700 //有活动,且优惠活动并没有限制使用优惠券,且有减价
701 701 //--看有没有减价--
702   - if(item_map.prom_price && item_map.price-item_map.prom_price){
  702 + if(item_map.prom_price>=0 && item_map.price-item_map.prom_price){
703 703 if(cart_item.prom_pt_json){
704 704 cart_item.prom_pt_json.push({"prom_id":item_map.prom_id,"dis":(item_map.price-item_map.prom_price).toFixed(2),"ispt":0})
705 705 }else{
... ... @@ -743,7 +743,7 @@ Page({
743 743 var m_item = item_map.goods[i];
744 744 var m_all_amount = m_item.goods_price * m_item.goods_num - m_item.goods_price * m_item.goods_num * per;
745 745 var account = Math.floor(100 * m_all_amount /m_item.goods_num) / 100;
746   - if (account) {
  746 + if (account>=0) {
747 747 item_map.goods[i].account = account;
748 748 account_all += account * m_item.goods_num; //累加总实收
749 749 }
... ... @@ -1540,6 +1540,7 @@ Page({
1540 1540 //比例太小不平摊
1541 1541 if(per<0.001){
1542 1542 goods.account_yu=th.data.formData.cut_price;
  1543 + item.is_discount_amount=1;
1543 1544 }else{
1544 1545 per=Math.floor(per*1000)/1000;
1545 1546 var all_amount=goods.goods_price*goods.goods_num-goods.goods_price*goods.goods_num*per; //商品总实收
... ... @@ -1547,6 +1548,7 @@ Page({
1547 1548 var account_yu=account*goods.goods_num-(goods.goods_price*goods.goods_num-th.data.formData.cut_price); //算出余数
1548 1549 goods.account=account;
1549 1550 goods.account_yu=parseFloat(account_yu.toFixed(2));
  1551 + item.is_discount_amount=1;
1550 1552 }
1551 1553 }
1552 1554 item.order_goods.push(goods);
... ... @@ -1672,9 +1674,10 @@ Page({
1672 1674 };
1673 1675  
1674 1676 //把优惠的平摊结果写进去
1675   - if(g_item.account){
1676   - goods.account=g_item.account;
1677   - goods.account_yu=g_item.account_yu;
  1677 + if(g_item.account>=0 || g_item.account_yu>0){
  1678 + if(g_item.account>=0) goods.account=g_item.account;
  1679 + if(g_item.account_yu>=0) goods.account_yu=g_item.account_yu;
  1680 + item.is_discount_amount=1;
1678 1681 }
1679 1682  
1680 1683 //--把券的钱,写入从表---
... ... @@ -1756,7 +1759,7 @@ Page({
1756 1759  
1757 1760 if (pdata.length==0) return;
1758 1761 var str = JSON.stringify(pdata);
1759   -
  1762 +
1760 1763 wx.showLoading({title: "加载中"});
1761 1764 wx.request({
1762 1765 url: oo.url + '/api/weshop/order/createWxdOrder',
... ... @@ -2696,7 +2699,7 @@ Page({
2696 2699 arr.is_xz_yh=prom.is_xz_yh; //是不是优惠
2697 2700 arr.bs=get_data.bs; //是不是倍数
2698 2701 arr.is_past=get_data.is_past; //是不是包邮
2699   - arr.prom_price=get_data.price?get_data.price:price;
  2702 + arr.prom_price=get_data.price>=0?get_data.price:price;
2700 2703 arr.s_intValue=get_data.intValue;
2701 2704 arr.s_coupon_id=get_data.coupon_id;
2702 2705 arr.s_coupon_num=get_data.coupon_num;
... ...