From 86c301d84bf5b038900ab37b7bf302ddb7d4d839 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Mon, 10 Apr 2023 18:51:38 +0800 Subject: [PATCH] oa优化 --- pages/cart/cart/cart.js | 8 ++++++-- pages/goods/goodsList/goodsList.wxml | 14 +++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 728432e..38659de 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -3854,6 +3854,7 @@ Page({ //主要判断有没有促销活动 var is_sele_prom = 0; var is_gift_del = 0; + for (var i = 0; i < list.goods.length; i++) { var item = list.goods[i]; if (item.prom_type == 3 && item.selected && !item.is_gift) { @@ -3927,6 +3928,7 @@ Page({ limit_num=prom.limit_num; user_pre_buynum = await this.getUserBuyPromNum_pre(prom.id) } + //如果活动已经结束 if (!prom || prom.is_end || prom.end_time < ut.gettimestamp()) { for (var ii in list.goods) { @@ -3992,6 +3994,8 @@ Page({ } } } + }else{ + continue; } @@ -4147,7 +4151,7 @@ Page({ //优惠促销用户参与次数 async getUserBuyPromNum_pre(prom_id){ var userInfo = getApp().globalData.userInfo; - var url = `/api/weshop/ordergoods/getUserBuyPromNum?store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=3&prom_id=${prom_id}`; + var url = `/api/weshop/ordergoods/getUserBuyPromNum?is_all=1&store_id=${os.stoid}&user_id=${userInfo.user_id}&prom_type=3&prom_id=${prom_id}`; let res = await getApp().request.promiseGet(url, { data:{} }); @@ -4529,7 +4533,7 @@ Page({ store_id: os.stoid, goodsidlist: gd, is_detail: 1, user_id: user_id }; - //获取秒杀的多规格 + //获取秒杀的多规格 getApp().request.promiseGet(url, { data: req_data }).then(res => { if (res.data.code == 0 && res.data.data) { if (res.data.data.length == 1) { diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml index a43abc3..eeb501b 100644 --- a/pages/goods/goodsList/goodsList.wxml +++ b/pages/goods/goodsList/goodsList.wxml @@ -119,7 +119,7 @@ - {{item.market_price}} + {{item.market_price}} 评论{{item.comment_count}} 已售{{item.sales_sum}} @@ -160,7 +160,7 @@ {{item.shop_price}} - {{item.market_price}} + {{item.market_price}} @@ -175,7 +175,7 @@ {{item.shop_price}} - {{item.market_price}} + {{item.market_price}} @@ -234,7 +234,7 @@ - {{item.market_price}} + {{item.market_price}} 评论{{item.comment_count}} 已售{{item.sales_sum}} @@ -275,7 +275,7 @@ {{item.shop_price}} - {{item.market_price}} + {{item.market_price}} @@ -290,8 +290,8 @@ {{item.shop_price}} - {{item.market_price}} - + {{item.market_price}} + -- libgit2 0.21.4