Commit fae4eea4ade9a0d57d2b84af43617fa9a97b8cc4

Authored by 前端开发-罗建龙
1 parent ebb5c622

秒杀组件console去除

components/diy_seckill/diy_seckill.js
@@ -114,9 +114,7 @@ Component({ @@ -114,9 +114,7 @@ Component({
114 // var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1"; 114 // var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1";
115 var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&idlist=" + idlist + "&user_id="+user_id+"&type=1"; 115 var gUrl = "/api/ms/flash_sale/getGoodsList?store_id=" + os.stoid + "&idlist=" + idlist + "&user_id="+user_id+"&type=1";
116 app.request.promiseGet(gUrl, {}).then(res => { 116 app.request.promiseGet(gUrl, {}).then(res => {
117 - console.error('手动选择--秒杀数据-------获取---------------');  
118 - console.error(gUrl);  
119 - console.error(res); 117 +
120 //如果秒杀的数组为空的时候 118 //如果秒杀的数组为空的时候
121 var goodslist = res.data.data; 119 var goodslist = res.data.data;
122 //就算是添加的活动已经过期,就要用最新的进行中活动 120 //就算是添加的活动已经过期,就要用最新的进行中活动
@@ -138,11 +136,7 @@ Component({ @@ -138,11 +136,7 @@ Component({
138 getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9", 136 getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9",
139 { isShowLoading: 1, data:req } 137 { isShowLoading: 1, data:req }
140 ).then(res => { 138 ).then(res => {
141 - console.error('默认选择--秒杀数据-------获取---------------');  
142 - console.error('/api/ms/flash_sale/spikepage?page=1&pageSize=9');  
143 - console.error(req);  
144 - console.error('返回数据------');  
145 - console.error(res); 139 +
146 if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { 140 if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
147 var goodsidlist = res.data.data.pageData; 141 var goodsidlist = res.data.data.pageData;
148 this.set_goods_list(null, goodsidlist); 142 this.set_goods_list(null, goodsidlist);
@@ -215,15 +209,11 @@ Component({ @@ -215,15 +209,11 @@ Component({
215 }; 209 };
216 // let price=all_array[i].price.toFixed(2) 210 // let price=all_array[i].price.toFixed(2)
217 let price=all_array[i].price + '' 211 let price=all_array[i].price + ''
218 - console.error('获取商品数据');  
219 - console.error(price);  
220 if (price && price.indexOf('.') > -1) { 212 if (price && price.indexOf('.') > -1) {
221 - console.error(123);  
222 let priceArr = price.split(".") 213 let priceArr = price.split(".")
223 all_array[i].price_n = priceArr[0] 214 all_array[i].price_n = priceArr[0]
224 all_array[i].price_xs = priceArr[1] 215 all_array[i].price_xs = priceArr[1]
225 }else{ 216 }else{
226 - console.error(456);  
227 all_array[i].price_n = price 217 all_array[i].price_n = price
228 } 218 }
229 219
@@ -252,8 +242,7 @@ Component({ @@ -252,8 +242,7 @@ Component({
252 } 242 }
253 } 243 }
254 244
255 - console.log('渲染数据----------');  
256 - console.error(arr); 245 +
257 /*--熏染到前台--*/ 246 /*--熏染到前台--*/
258 th.setData({ goods_array: arr }); 247 th.setData({ goods_array: arr });
259 if (th.data.object.style==6) { 248 if (th.data.object.style==6) {