From 2f691db07990d4c755bea6142196337891f34cc4 Mon Sep 17 00:00:00 2001 From: luo <17530855@qq.com> Date: Fri, 30 Dec 2022 16:45:37 +0800 Subject: [PATCH] oa单组合购优化 --- pages/user/order_detail/order_detail.js | 2 +- pages/user/order_list/order_list.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index 1df2a5c..57e3877 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -427,7 +427,7 @@ Page({ //增加组合购次数判断 let userbuynum = await th.getUserBuyPromNum(good.prom_id) - if (zh_buy_info && userbuynum >= zh_buy_info.buy_limit) { + if (zh_buy_info.buy_limit !=0 && zh_buy_info && userbuynum >= zh_buy_info.buy_limit) { var content = gg.goods_name + '超出组合购限购次数,请取消订单'; th.toast(content); th.setData({ paying: 0 }); diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index f04ea5e..53a10cd 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -718,8 +718,10 @@ Page({ return false; } //增加组合购次数判断 + let userbuynum = await th.getUserBuyPromNum(good.prom_id) - if (zh_buy_info && userbuynum >= zh_buy_info.buy_limit) { + + if (zh_buy_info.buy_limit !=0 && zh_buy_info && userbuynum >= zh_buy_info.buy_limit) { var content = gg.goods_name + '超出组合购限购次数,请取消订单'; th.toast(content); th.setData({ paying: 0 }); -- libgit2 0.21.4