Commit 33bdb9ae62cc314664d23c4a9ea555be8c86813e
Merge branch 'dev' into 'test'
Dev See merge request !466
Showing
5 changed files
with
15 additions
and
38 deletions
app.js
@@ -129,7 +129,7 @@ App({ | @@ -129,7 +129,7 @@ App({ | ||
129 | cartGoodsNum:this.globalData.cartGoodsNum | 129 | cartGoodsNum:this.globalData.cartGoodsNum |
130 | }) | 130 | }) |
131 | }, | 131 | }, |
132 | - | 132 | + |
133 | globalData: { | 133 | globalData: { |
134 | cartGoodsNum:0, //购物车总数量 | 134 | cartGoodsNum:0, //购物车总数量 |
135 | isTabBar :false, | 135 | isTabBar :false, |
@@ -186,7 +186,6 @@ App({ | @@ -186,7 +186,6 @@ App({ | ||
186 | app.globalData.user_id= app.globalData.userInfo.user_id; | 186 | app.globalData.user_id= app.globalData.userInfo.user_id; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | - | ||
190 | wx.getSystemInfo({ | 189 | wx.getSystemInfo({ |
191 | success: (res) => { | 190 | success: (res) => { |
192 | // console.log(res) | 191 | // console.log(res) |
@@ -594,6 +593,8 @@ App({ | @@ -594,6 +593,8 @@ App({ | ||
594 | this.globalData.wuliu=null; //关闭要把物流清空 | 593 | this.globalData.wuliu=null; //关闭要把物流清空 |
595 | this.globalData.room_id=null; //关闭要把房间号关闭 | 594 | this.globalData.room_id=null; //关闭要把房间号关闭 |
596 | this.globalData.room_goods_id=null; //关闭要把物流清空 | 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,7 +152,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un | ||
152 | // console.log('----------------v', headImg); | 152 | // console.log('----------------v', headImg); |
153 | 153 | ||
154 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | 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 | // 以iPhone6为例,375/750 = 0.5 | 157 | // 以iPhone6为例,375/750 = 0.5 |
158 | // let scale = this.data.windowWidth / 375; | 158 | // let scale = this.data.windowWidth / 375; |
packageA/pages/liveStreamDetails/liveStreamDetails.skeleton.wxml deleted
1 | -<!-- | ||
2 | -此文件为开发者工具生成,生成时间: 2020/7/4 下午3:58:01 | ||
3 | -使用方法: | ||
4 | -1. 在"packageA\pages\liveStreamDetails\liveStreamDetails.wxml"中使用`include`指令引入此模板, | ||
5 | -2. 在"packageA\pages\liveStreamDetails\liveStreamDetails.wxss"中使用`import`指令引入"packageA\pages\liveStreamDetails\liveStreamDetails.skeleton.wxss" | ||
6 | -3. 书写对应的逻辑,来控制骨架屏的显示与隐藏 | ||
7 | - | ||
8 | -更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html | ||
9 | ---> | ||
10 | -<view class="sk-container"></view> | ||
11 | \ No newline at end of file | 0 | \ No newline at end of file |
packageA/pages/liveStreamDetails/liveStreamDetails.skeleton.wxss deleted
1 | -/* | ||
2 | -此文件为开发者工具生成,生成时间: 2020/7/4 下午3:58:01 | ||
3 | -使用方法:参考 "packageA\pages\liveStreamDetails\liveStreamDetails.skeleton.wxml" | ||
4 | -*/ | ||
5 | -.sk-transparent { | ||
6 | - color: transparent !important; | ||
7 | - } | ||
8 | -.sk-container { | ||
9 | - position: absolute; | ||
10 | - overflow: hidden; | ||
11 | - top: 0; | ||
12 | - left: 0; | ||
13 | - right: 0; | ||
14 | - bottom: 0; | ||
15 | - z-index: 1000000; | ||
16 | - background-color: transparent; | ||
17 | - } |
pages/cart/cart2/cart2.js
@@ -675,7 +675,7 @@ Page({ | @@ -675,7 +675,7 @@ Page({ | ||
675 | item_map.is_bz = get_data.is_bz; //是不是倍增 | 675 | item_map.is_bz = get_data.is_bz; //是不是倍增 |
676 | item_map.bs = get_data.bs; //是不是倍数 | 676 | item_map.bs = get_data.bs; //是不是倍数 |
677 | item_map.is_past = get_data.is_past; //是不是包邮 | 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 | item_map.s_intValue = get_data.intValue; | 679 | item_map.s_intValue = get_data.intValue; |
680 | item_map.s_coupon_id = get_data.coupon_id; | 680 | item_map.s_coupon_id = get_data.coupon_id; |
681 | item_map.s_coupon_num = get_data.coupon_num; | 681 | item_map.s_coupon_num = get_data.coupon_num; |
@@ -699,7 +699,7 @@ Page({ | @@ -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 | if(cart_item.prom_pt_json){ | 703 | if(cart_item.prom_pt_json){ |
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}) | 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 | }else{ | 705 | }else{ |
@@ -743,7 +743,7 @@ Page({ | @@ -743,7 +743,7 @@ Page({ | ||
743 | var m_item = item_map.goods[i]; | 743 | var m_item = item_map.goods[i]; |
744 | var m_all_amount = m_item.goods_price * m_item.goods_num - m_item.goods_price * m_item.goods_num * per; | 744 | var m_all_amount = m_item.goods_price * m_item.goods_num - m_item.goods_price * m_item.goods_num * per; |
745 | var account = Math.floor(100 * m_all_amount /m_item.goods_num) / 100; | 745 | var account = Math.floor(100 * m_all_amount /m_item.goods_num) / 100; |
746 | - if (account) { | 746 | + if (account>=0) { |
747 | item_map.goods[i].account = account; | 747 | item_map.goods[i].account = account; |
748 | account_all += account * m_item.goods_num; //累加总实收 | 748 | account_all += account * m_item.goods_num; //累加总实收 |
749 | } | 749 | } |
@@ -1540,6 +1540,7 @@ Page({ | @@ -1540,6 +1540,7 @@ Page({ | ||
1540 | //比例太小不平摊 | 1540 | //比例太小不平摊 |
1541 | if(per<0.001){ | 1541 | if(per<0.001){ |
1542 | goods.account_yu=th.data.formData.cut_price; | 1542 | goods.account_yu=th.data.formData.cut_price; |
1543 | + item.is_discount_amount=1; | ||
1543 | }else{ | 1544 | }else{ |
1544 | per=Math.floor(per*1000)/1000; | 1545 | per=Math.floor(per*1000)/1000; |
1545 | var all_amount=goods.goods_price*goods.goods_num-goods.goods_price*goods.goods_num*per; //商品总实收 | 1546 | var all_amount=goods.goods_price*goods.goods_num-goods.goods_price*goods.goods_num*per; //商品总实收 |
@@ -1547,6 +1548,7 @@ Page({ | @@ -1547,6 +1548,7 @@ Page({ | ||
1547 | var account_yu=account*goods.goods_num-(goods.goods_price*goods.goods_num-th.data.formData.cut_price); //算出余数 | 1548 | var account_yu=account*goods.goods_num-(goods.goods_price*goods.goods_num-th.data.formData.cut_price); //算出余数 |
1548 | goods.account=account; | 1549 | goods.account=account; |
1549 | goods.account_yu=parseFloat(account_yu.toFixed(2)); | 1550 | goods.account_yu=parseFloat(account_yu.toFixed(2)); |
1551 | + item.is_discount_amount=1; | ||
1550 | } | 1552 | } |
1551 | } | 1553 | } |
1552 | item.order_goods.push(goods); | 1554 | item.order_goods.push(goods); |
@@ -1672,9 +1674,10 @@ Page({ | @@ -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,7 +1759,7 @@ Page({ | ||
1756 | 1759 | ||
1757 | if (pdata.length==0) return; | 1760 | if (pdata.length==0) return; |
1758 | var str = JSON.stringify(pdata); | 1761 | var str = JSON.stringify(pdata); |
1759 | - | 1762 | + |
1760 | wx.showLoading({title: "加载中"}); | 1763 | wx.showLoading({title: "加载中"}); |
1761 | wx.request({ | 1764 | wx.request({ |
1762 | url: oo.url + '/api/weshop/order/createWxdOrder', | 1765 | url: oo.url + '/api/weshop/order/createWxdOrder', |
@@ -2696,7 +2699,7 @@ Page({ | @@ -2696,7 +2699,7 @@ Page({ | ||
2696 | arr.is_xz_yh=prom.is_xz_yh; //是不是优惠 | 2699 | arr.is_xz_yh=prom.is_xz_yh; //是不是优惠 |
2697 | arr.bs=get_data.bs; //是不是倍数 | 2700 | arr.bs=get_data.bs; //是不是倍数 |
2698 | arr.is_past=get_data.is_past; //是不是包邮 | 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 | arr.s_intValue=get_data.intValue; | 2703 | arr.s_intValue=get_data.intValue; |
2701 | arr.s_coupon_id=get_data.coupon_id; | 2704 | arr.s_coupon_id=get_data.coupon_id; |
2702 | arr.s_coupon_num=get_data.coupon_num; | 2705 | arr.s_coupon_num=get_data.coupon_num; |