diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index b0f5b6b..be71a7f 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -1037,7 +1037,7 @@ Page({ //获取秒杀 if(item.prom_type==1) { await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + os.stoid + '/' + user_id + '/' + item.prom_id, {}).then(res => { - if (res.data.code == 0) { + if (res.data.code == 0 && res.data.data) { prom = res.data.data; prom.price = prom.user_price; } @@ -3173,7 +3173,7 @@ Page({ var buylimit = 0 if(t.prom_type==1) { await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, {}).then(res => { - if (res.data.code == 0) { + if (res.data.code == 0 && res.data.data) { th.data.sele_g = res.data.data; th.data.sele_g.viplimited = res.data.data.buy_limit; buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit;