Commit c7673a382d508855a62e28c8d11d6610084a183f

Authored by yvan.ni
1 parent 0c40d7c3

限购的优化

pages/goods/goodsInfo/goodsInfo.js
@@ -2478,10 +2478,10 @@ Page({ @@ -2478,10 +2478,10 @@ Page({
2478 // s.my_warnning('超出商品限购', 0, th); 2478 // s.my_warnning('超出商品限购', 0, th);
2479 l_num = th.data.sele_g.viplimited - gd_buy_num; 2479 l_num = th.data.sele_g.viplimited - gd_buy_num;
2480 if (l_num < 0) l_num = 0; 2480 if (l_num < 0) l_num = 0;
2481 - // th.setData({  
2482 - // goodsInputNum: num  
2483 - // })  
2484 - // return false; 2481 + th.setData({
  2482 + goodsInputNum: l_num
  2483 + })
  2484 + return false;
2485 } 2485 }
2486 } 2486 }
2487 2487
@@ -5433,7 +5433,8 @@ Page({ @@ -5433,7 +5433,8 @@ Page({
5433 data: { 5433 data: {
5434 store_id: os.stoid, 5434 store_id: os.stoid,
5435 user_id: user_id, 5435 user_id: user_id,
5436 - goods_id: gd.goods_id, isnew:1 5436 + goods_id: gd.goods_id, isnew:1,
  5437 + timetype:gd.viplimited_timetype
5437 }, 5438 },
5438 success: function (t) { 5439 success: function (t) {
5439 if (t.data.code == 0) { 5440 if (t.data.code == 0) {
@@ -5461,7 +5462,7 @@ Page({ @@ -5461,7 +5462,7 @@ Page({
5461 user_id: user_id, 5462 user_id: user_id,
5462 goods_id: gd.goods_id, 5463 goods_id: gd.goods_id,
5463 prom_type: gd.prom_type, 5464 prom_type: gd.prom_type,
5464 - prom_id: gd.prom_id, isnew:1 5465 + prom_id: gd.prom_id, isnew:1,
5465 }, 5466 },
5466 //-----获取----- 5467 //-----获取-----
5467 success: function (tt) { 5468 success: function (tt) {