Commit f98055eebdad1ea573fd6146ece296c46c6fb862

Authored by 泉州测试
1 parent ee813841

fix优化购物车

packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -897,7 +897,7 @@ Page({
897 897 canBuyNum = 0;
898 898 };
899 899  
900   - if(limited > res) {
  900 + if(canBuyNum > res) {
901 901 if(curNum > res) { // t当前增减的数量
902 902 wx.showModal({
903 903 title: '超出活动库存',
... ... @@ -909,8 +909,8 @@ Page({
909 909 };
910 910 };
911 911  
912   - if(limited <= res) {
913   - if(curNum > limited) {
  912 + if(canBuyNum <= res) {
  913 + if(curNum > canBuyNum) {
914 914 wx.showModal({
915 915 title: '超出限购数量',
916 916 });
... ...