Commit 6b3a4638c606d9eb0f9519d3f12493b96110646f

Authored by 泉州测试
1 parent 0d798320

增加文件注释

packageA/pages/goodsInfo/goodsInfo.js
@@ -889,7 +889,7 @@ Page({ @@ -889,7 +889,7 @@ Page({
889 return false; 889 return false;
890 } 890 }
891 891
892 - // 获取购物车同数量 判断是否超库存 892 + // 获取购物车同数量 判断是否超库存
893 var cartGoodsNum = 0; 893 var cartGoodsNum = 0;
894 await getApp().request.promiseGet("/api/weshop/cartService/page?store_id="+os.stoid+"&user_id="+oo.user_id+"&service_id="+th.data.data.id+"&pick_id="+th.data.sto_sele_id, 894 await getApp().request.promiseGet("/api/weshop/cartService/page?store_id="+os.stoid+"&user_id="+oo.user_id+"&service_id="+th.data.data.id+"&pick_id="+th.data.sto_sele_id,
895 { }).then(res => { 895 { }).then(res => {
@@ -900,9 +900,10 @@ Page({ @@ -900,9 +900,10 @@ Page({
900 900
901 }); 901 });
902 902
903 - // 跳过<立即购买> 903 + // 跳过<立即购买> 购物车
904 if(action !="buy"){ 904 if(action !="buy"){
905 905
  906 + // 输入的数量 + 购物车同款商品的数量
906 var maxNum = parseInt(t) + parseInt(cartGoodsNum); 907 var maxNum = parseInt(t) + parseInt(cartGoodsNum);
907 908
908 if (maxNum > redisNum) { 909 if (maxNum > redisNum) {
@@ -912,7 +913,7 @@ Page({ @@ -912,7 +913,7 @@ Page({
912 return false; 913 return false;
913 } 914 }
914 915
915 - // 是否开启限购 916 + // 是否开启个人限购
916 if (th.data.sele_g.viplimited > 0) { 917 if (th.data.sele_g.viplimited > 0) {
917 918
918 if (maxNum + th.data.sele_g.buy_num > th.data.sele_g.buy_limit) { 919 if (maxNum + th.data.sele_g.buy_num > th.data.sele_g.buy_limit) {
@@ -928,6 +929,7 @@ Page({ @@ -928,6 +929,7 @@ Page({
928 929
929 } 930 }
930 931
  932 + // 以下为立即购买
931 // 每人限购数 933 // 每人限购数
932 th.data.sele_g.viplimited = th.data.sele_g.buy_limit; 934 th.data.sele_g.viplimited = th.data.sele_g.buy_limit;
933 935
@@ -960,7 +962,7 @@ Page({ @@ -960,7 +962,7 @@ Page({
960 962
961 963
962 964
963 - if(action=="buy"){ // 直接购买 965 + if(action=="buy"){ // 立即购买
964 //--------------此时操作的数据------------ 966 //--------------此时操作的数据------------
965 var newd = { 967 var newd = {
966 id: th.data.data.id, 968 id: th.data.data.id,