diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index d548fe6..8c3c9b5 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -492,23 +492,34 @@ Page({ } } - - var g_url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+order_goods.goods_id+"&pre_id="+pre_arr.id; - if(act.is_end || th.data.act.end_time { goods = res.data.data; order.market_price = goods.market_price; order.show_img = oo.imghost + goods.original_img; }); + + + var g_url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+order_goods.goods_id+"&pre_id="+pre_arr.id; + if(act.is_end || th.data.act.end_time0) { - if (quan_price < allpice) th.setData({quan_price: quan_price}) + if (quan_price 0 && this.data.pre_arr.is_useorderyh) { - th.check_is_order_prom(o_condition, function () { + th.check_is_order_prom(o_condition, function (ord_price) { var bn_pick=th.data.pickup.pickup_id var order_prom_amount = 0; var order_prom_id = 0; @@ -1967,15 +1985,15 @@ Page({ order_prom_id = ord_prom['id']; switch (ord_prom['type']) { case 0: - order_m = Math.round(o_condition * ord_prom['expression']) / 100;//满额打折 - order_prom_amount = (o_condition - order_m).toFixed(2); + order_m = Math.round(ord_price * ord_prom['expression']) / 100;//满额打折 + order_prom_amount = (ord_price - order_m).toFixed(2); break; case 1: - order_m = o_condition - ord_prom['expression'];//满额优惠金额 + order_m = ord_price - ord_prom['expression'];//满额优惠金额 order_prom_amount = ord_prom['expression']; break; } - o_condition=order_m; + ord_price=order_m; } //--订单优惠的显示-- @@ -1983,13 +2001,21 @@ Page({ var order_prom_txt1 = "order_prom_id"; var order_prom_txt2 = "order_prom_amount"; th.setData({[order_prom_txt1]: order_prom_id, [order_prom_txt2]: order_prom_amount}) - } - - th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition) +parseFloat(exp_price) }) + }else{ + var order_prom_txt1 = "order_prom_id"; + var order_prom_txt2 = "order_prom_amount"; + th.setData({[order_prom_txt1]: 0, [order_prom_txt2]: 0}) + } + + + ord_price=parseFloat(ord_price)-parseFloat(th.data.presell.presell_deposit); + th.setData({ exp_price: exp_price, order_m: ord_price +parseFloat(exp_price) }) }) }else{ - th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition)+parseFloat(exp_price) }) + + var o_condition1=parseFloat(o_condition)-parseFloat(th.data.presell.presell_deposit); + th.setData({ exp_price: exp_price, order_m: parseFloat(o_condition1)+parseFloat(exp_price) }) } }, @@ -2110,7 +2136,7 @@ Page({ if(th.data.user_note){ dd.user_note=th.data.user_note; } - dd.order_amount= parseFloat(th.data.order_m-th.data.presell.presell_deposit).toFixed(2); + dd.order_amount= parseFloat(th.data.order_m).toFixed(2); console.log(JSON.stringify(dd)); wx.request({ diff --git a/packageC/pages/presell/cart/cart.wxml b/packageC/pages/presell/cart/cart.wxml index 589089b..9753dbd 100644 --- a/packageC/pages/presell/cart/cart.wxml +++ b/packageC/pages/presell/cart/cart.wxml @@ -337,7 +337,7 @@ 应付金额: - {{filters.toFix(order_m-presell.presell_deposit,2)}} + {{filters.toFix(order_m,2)}} diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.js b/packageC/pages/presell/goodsInfo/goodsInfo.js index 2edb972..9893bf2 100644 --- a/packageC/pages/presell/goodsInfo/goodsInfo.js +++ b/packageC/pages/presell/goodsInfo/goodsInfo.js @@ -2706,7 +2706,8 @@ Page({ ///二微码 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/presell/goodsInfo/goodsInfo"; + //os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/presell/goodsInfo/goodsInfo"; + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; console.log(path3); @@ -2801,14 +2802,20 @@ Page({ context.setFontSize(22 * unit) pri0 = "¥" + th.data.data.market_price.toFixed(2); var wd2 = th.data.screenWidth - ut.measureText(pri0, 22 * unit) - 25; - context.fillText('定金', wd2, 213 * unit); - - // context.setStrokeStyle('gray'); - // context.setLineWidth(1 * unit); - // context.moveTo(wd2 - 5, 206 * unit); - // context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); - // context.stroke(); - + + if(th.data.presellForm.presell_type==1){ + context.setStrokeStyle('gray'); + context.fillText(pri0, wd2, 213 * unit); + context.setLineWidth(1 * unit); + context.moveTo(wd2 - 5, 206 * unit); + context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit); + context.stroke(); + }else{ + context.fillText('定金', wd2, 213 * unit); + } + + + } else { context.setFillStyle("black"); context.setFontSize(21.3 * unit) @@ -2834,43 +2841,7 @@ Page({ //---中间大图--- context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit); - //预售 - /* if (th.data.poster && parseInt(th.data.poster.style) == 2) { - if (parseInt(th.data.poster.show_quality)) { - var g_path = "../../../../images/share/s_gou.png"; - context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("正品保证", 84 * unit, 690 * unit); - - context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("纯实体店", 246 * unit, 690 * unit); - - context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("官方验证", 420 * unit, 690 * unit); - } - } else { - var g_path = "../../../../images/share/s_gou.png"; - context.drawImage(g_path, 56 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("正品保证", 84 * unit, 690 * unit); - - context.drawImage(g_path, 218 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("纯实体店", 246 * unit, 690 * unit); - - context.drawImage(g_path, 388 * unit, 670 * unit, 22 * unit, 22 * unit); - context.setFillStyle("red") - context.setFontSize(18 * unit) - context.fillText("官方验证", 420 * unit, 690 * unit); - } */ - + //---画线--- context.setLineWidth(1 * unit) context.moveTo(32 * unit, 665 * unit) @@ -2881,14 +2852,14 @@ Page({ context.setFillStyle("black") // context.setFontSize(22 * unit) context.setFontSize(24 * unit) - context.fillText(th.data.sto_sele_name_1, 40 * unit, 766 * unit); + context.fillText(th.data.sto_sele_name_1, 40 * unit, 730 * unit); context.setFillStyle("red") context.setFontSize(20 * unit) var presell_price = `预售价:${th.data.presellList.presell_price}` - context.fillText(presell_price, 40 * unit, 801 * unit); + context.fillText(presell_price, 40 * unit, 780 * unit); context.setFillStyle("black") context.setFontSize(22 * unit) - context.fillText("特惠好物,限时预售", 40 * unit, 836 * unit); + context.fillText("特惠好物,限时预售", 40 * unit, 826 * unit); context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 866 * unit); //---二维吗图--- @@ -2899,7 +2870,7 @@ Page({ context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); } else { //---二维吗图--- - context.drawImage(vpath, 390 * unit, 756 * unit, 130 * unit, 116 * unit); + context.drawImage(vpath, 390 * unit, 746 * unit, 130 * unit, 116 * unit); }