diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 12e7e13..376dbf0 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -66,56 +66,7 @@ Page({ }, - //-- 立即购买的时候,获取商品优惠活动,is_state判断是不是单个商品购买, - // 很多活动需要判断会员的plus等级, 权益登陆,user_id调用接口是必须的 -- - //先用着,后面会用接口来代替 - async buy_pro_group(item1, is_state) { - //-- 代发商品不参与任何活动 -- - if (item1.whsle_id) return false; - if (item1.is_gift) return false; - - var th = this; - var req_d = { - store_id: os.stoid, - user_id: getApp().globalData.user_id, - goods_id: item1.goods_id, - goods_num: item1.goods_num, - goods_price: item1.goods_price, - } - //--- 调用接口获取活动 --- - await getApp().promiseGet('/api/weshop/goods/getGoodsPromInfo', { - data: req_d - }).then(res => { - if (res.data.code == 0) { - - var more_cx = res.data.data.more_cx; - for (var i = 0; i < more_cx.length; i++) { - if (more_cx[i].prom_type == 5) { - more_cx[i].main_gid = more_cx[i].collocation.main_goods_id; - var min = more_cx[i].collocation_main_price + more_cx[i].collocation_min_price; - var max = more_cx[i].collocation_main_price + more_cx[i].collocation_max_price; - more_cx[i].show_price = "¥" + min + "-" + max; - } - } - item1.more_cx = more_cx - if (res.data.data.zh_pro) { - th.data.zuhe_map[res.data.data.zh_pro.id] = res.data.data.zh_pro; - } - if (res.data.data.ladder_pro) { - var ladder_pro = res.data.data.ladder_pro; - th.data.ladder_map[ladder_pro.id] = ladder_pro; - var fd = res.data.data.more_cx.find(function (e) { - return e.prom_type == 10; - }) - if (fd) { - th.data.ladder_map[ladder_pro.id].ladder_list = fd.ladder_list; - } - } - } - }) - - }, - + onLoad: function () { var a = this, ee = a;