Commit 68f6bd5ea674ebf0cc0562644b4fc823f14c2316
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
2 changed files
with
34 additions
and
2 deletions
packageE/pages/cart/cart2/cart2.js
... | ... | @@ -3885,7 +3885,7 @@ Page({ |
3885 | 3885 | var coupon_price = quan_price; //优惠券优惠了多少钱 |
3886 | 3886 | if (order_m < 0) { |
3887 | 3887 | order_m = 0; |
3888 | - coupon_price = parseFloat(order_m).toFixed(2); | |
3888 | + coupon_price = parseFloat(allpice - cut_price).toFixed(2); | |
3889 | 3889 | } |
3890 | 3890 | //--看一下有没有订单优惠-- |
3891 | 3891 | var o_condition = parseFloat(order_m); |
... | ... | @@ -5325,6 +5325,25 @@ Page({ |
5325 | 5325 | th.setData({ |
5326 | 5326 | submit: 0, |
5327 | 5327 | }) |
5328 | + if(data.code==-2){ | |
5329 | + | |
5330 | + | |
5331 | + //-- 如果是购物车结算,还要删除购物车 -- | |
5332 | + if (th.data.is_b_now == 0) { | |
5333 | + console.log(th.data.cartlist_y); | |
5334 | + var list =JSON.parse(JSON.stringify(th.data.cartlist_y)); | |
5335 | + for (var i = 0; i < list.length; i++) { | |
5336 | + //删除购物车 | |
5337 | + a.delete("/api/weshop/cart/del/" + oo.stoid + "/" + list[i].id, {}); | |
5338 | + } | |
5339 | + } | |
5340 | + | |
5341 | + setTimeout(()=>{ | |
5342 | + getApp().re_to('/pages/user/order_list/order_list') | |
5343 | + },1300) | |
5344 | + | |
5345 | + } | |
5346 | + | |
5328 | 5347 | } |
5329 | 5348 | |
5330 | 5349 | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -272,6 +272,7 @@ Page({ |
272 | 272 | sec_i: -1, //选中分类门店 下标 |
273 | 273 | cx_prom_group: [], //促销活动,用于显示和判断默认要用什么促销活动 |
274 | 274 | showFold:true, |
275 | + new_share_imgurl:'', //普通商品分享图片 | |
275 | 276 | }, |
276 | 277 | |
277 | 278 | //------初始化加载---------- |
... | ... | @@ -2926,8 +2927,12 @@ Page({ |
2926 | 2927 | price = th.data.prom_act.price; |
2927 | 2928 | |
2928 | 2929 | } |
2930 | + | |
2929 | 2931 | var title = th.data.sele_g.goods_name; |
2930 | 2932 | var img = th.data.sele_g.original_img; |
2933 | + if(th.data.new_share_imgurl){ | |
2934 | + img = th.data.iurl + th.data.new_share_imgurl | |
2935 | + } | |
2931 | 2936 | if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) { |
2932 | 2937 | title = th.data.prom_act.share_title; |
2933 | 2938 | if (!title) title = th.data.prom_act.title; |
... | ... | @@ -3035,7 +3040,11 @@ Page({ |
3035 | 3040 | if (e.data.code == 0) arrdata = e.data.data.pageData; |
3036 | 3041 | }) |
3037 | 3042 | if (!arrdata) return false; |
3038 | - | |
3043 | + if(arrdata[0]){ | |
3044 | + tt.setData({ | |
3045 | + new_share_imgurl:arrdata[0].share_imgurl | |
3046 | + }) | |
3047 | + } | |
3039 | 3048 | var arrsku = new Array(); |
3040 | 3049 | var gitem = null; |
3041 | 3050 | var gb = 1, |
... | ... | @@ -6650,6 +6659,9 @@ Page({ |
6650 | 6659 | if ((this.data.prom_type == 1 || this.data.prom_type == 6) && this.data.prom_act.share_imgurl) { |
6651 | 6660 | img_url = this.data.iurl + this.data.prom_act.share_imgurl; |
6652 | 6661 | } |
6662 | + if (this.data.new_share_imgurl) { | |
6663 | + img_url=this.data.iurl + this.data.new_share_imgurl | |
6664 | + } | |
6653 | 6665 | |
6654 | 6666 | //获取商品是分享图信息 |
6655 | 6667 | wx.getImageInfo({ |
... | ... | @@ -7894,6 +7906,7 @@ Page({ |
7894 | 7906 | }, |
7895 | 7907 | |
7896 | 7908 | send() { |
7909 | + | |
7897 | 7910 | this.setData({ |
7898 | 7911 | share_hidden: false, |
7899 | 7912 | }); | ... | ... |