Commit e5519737c8e983adecf32eafab21efa3f6f337f9

Authored by yvan.ni
1 parent bb56af19

判断秒杀的指定参与的优化

Showing 1 changed file with 2 additions and 2 deletions
pages/cart/cart/cart.js
... ... @@ -1037,7 +1037,7 @@ Page({
1037 1037 //获取秒杀
1038 1038 if(item.prom_type==1) {
1039 1039 await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + os.stoid + '/' + user_id + '/' + item.prom_id, {}).then(res => {
1040   - if (res.data.code == 0) {
  1040 + if (res.data.code == 0 && res.data.data) {
1041 1041 prom = res.data.data;
1042 1042 prom.price = prom.user_price;
1043 1043 }
... ... @@ -3173,7 +3173,7 @@ Page({
3173 3173 var buylimit = 0
3174 3174 if(t.prom_type==1) {
3175 3175 await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, {}).then(res => {
3176   - if (res.data.code == 0) {
  3176 + if (res.data.code == 0 && res.data.data) {
3177 3177 th.data.sele_g = res.data.data;
3178 3178 th.data.sele_g.viplimited = res.data.data.buy_limit;
3179 3179 buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit;
... ...