Commit 73dd8c112511e972ddca72c17ae3d5e548397510

Authored by yvan.ni
1 parent d1c17416

去掉没有用的函数

Showing 1 changed file with 1 additions and 50 deletions
pages/cart/cart/cart.js
@@ -66,56 +66,7 @@ Page({ @@ -66,56 +66,7 @@ Page({
66 66
67 }, 67 },
68 68
69 - //-- 立即购买的时候,获取商品优惠活动,is_state判断是不是单个商品购买,  
70 - // 很多活动需要判断会员的plus等级, 权益登陆,user_id调用接口是必须的 --  
71 - //先用着,后面会用接口来代替  
72 - async buy_pro_group(item1, is_state) {  
73 - //-- 代发商品不参与任何活动 --  
74 - if (item1.whsle_id) return false;  
75 - if (item1.is_gift) return false;  
76 -  
77 - var th = this;  
78 - var req_d = {  
79 - store_id: os.stoid,  
80 - user_id: getApp().globalData.user_id,  
81 - goods_id: item1.goods_id,  
82 - goods_num: item1.goods_num,  
83 - goods_price: item1.goods_price,  
84 - }  
85 - //--- 调用接口获取活动 ---  
86 - await getApp().promiseGet('/api/weshop/goods/getGoodsPromInfo', {  
87 - data: req_d  
88 - }).then(res => {  
89 - if (res.data.code == 0) {  
90 -  
91 - var more_cx = res.data.data.more_cx;  
92 - for (var i = 0; i < more_cx.length; i++) {  
93 - if (more_cx[i].prom_type == 5) {  
94 - more_cx[i].main_gid = more_cx[i].collocation.main_goods_id;  
95 - var min = more_cx[i].collocation_main_price + more_cx[i].collocation_min_price;  
96 - var max = more_cx[i].collocation_main_price + more_cx[i].collocation_max_price;  
97 - more_cx[i].show_price = "¥" + min + "-" + max;  
98 - }  
99 - }  
100 - item1.more_cx = more_cx  
101 - if (res.data.data.zh_pro) {  
102 - th.data.zuhe_map[res.data.data.zh_pro.id] = res.data.data.zh_pro;  
103 - }  
104 - if (res.data.data.ladder_pro) {  
105 - var ladder_pro = res.data.data.ladder_pro;  
106 - th.data.ladder_map[ladder_pro.id] = ladder_pro;  
107 - var fd = res.data.data.more_cx.find(function (e) {  
108 - return e.prom_type == 10;  
109 - })  
110 - if (fd) {  
111 - th.data.ladder_map[ladder_pro.id].ladder_list = fd.ladder_list;  
112 - }  
113 - }  
114 - }  
115 - })  
116 -  
117 - },  
118 - 69 +
119 onLoad: function () { 70 onLoad: function () {
120 var a = this, 71 var a = this,
121 ee = a; 72 ee = a;