Commit e8cd4e8c146d8a6d6fd14b0039974f921bbdfab5
1 parent
94a2fb0a
服务卡秒杀修改
Showing
1 changed file
with
34 additions
and
20 deletions
packageA/pages/goodsInfo/goodsInfo.js
... | ... | @@ -856,7 +856,8 @@ Page({ |
856 | 856 | if(!th.data.sto_sele_name) { |
857 | 857 | getApp().my_warnning('请选择门店', 1, th, 450); |
858 | 858 | return false; |
859 | - } | |
859 | + }; | |
860 | + | |
860 | 861 | |
861 | 862 | |
862 | 863 | |
... | ... | @@ -883,25 +884,33 @@ Page({ |
883 | 884 | // } |
884 | 885 | //000000 |
885 | 886 | |
886 | - this.data.sele_g.viplimited = this.data.sele_g.buy_limit; | |
887 | - if(this.data.sele_g.viplimited > 0 && !this.data.is_normal && this.data.prom_type == 1) { | |
888 | - var t = th.data.goodsInputNum; | |
889 | - th.data.sele_g.viplimited = th.data.sele_g.buy_limit; | |
890 | - if (th.data.sele_g.viplimited > 0) { | |
891 | - var gd_buy_num = th.data.sele_g.buy_num; | |
892 | - | |
893 | - if (t + gd_buy_num > th.data.sele_g.viplimited) { | |
894 | - wx.showModal({ | |
895 | - title: '超出活动限购数量', | |
896 | - }); | |
897 | - | |
898 | - let num = th.data.sele_g.viplimited - gd_buy_num; | |
899 | - if (num <= 0) num = 1; | |
900 | - th.setData({goodsInputNum: num}); | |
901 | - return false; | |
902 | - } | |
887 | + // if(!this.data.openSpecModal_ind) { | |
888 | + if(this.data.prom_type == 1) { | |
889 | + this.data.sele_g.viplimited = this.data.sele_g.buy_limit; | |
903 | 890 | }; |
904 | - }; | |
891 | + | |
892 | + if(this.data.sele_g.viplimited > 0 && !this.data.is_normal && this.data.prom_type == 1) { | |
893 | + var t = th.data.goodsInputNum; | |
894 | + th.data.sele_g.viplimited = th.data.sele_g.buy_limit; | |
895 | + if (th.data.sele_g.viplimited > 0) { | |
896 | + var gd_buy_num = th.data.sele_g.buy_num; | |
897 | + | |
898 | + if (t + gd_buy_num > th.data.sele_g.viplimited) { | |
899 | + wx.showModal({ | |
900 | + title: '超出活动限购数量', | |
901 | + }); | |
902 | + | |
903 | + let num = th.data.sele_g.viplimited - gd_buy_num; | |
904 | + if (num <= 0) num = 1; | |
905 | + th.setData({goodsInputNum: num}); | |
906 | + return false; | |
907 | + } | |
908 | + }; | |
909 | + }; | |
910 | + | |
911 | + // }; | |
912 | + | |
913 | + | |
905 | 914 | |
906 | 915 | |
907 | 916 | |
... | ... | @@ -1064,10 +1073,15 @@ Page({ |
1064 | 1073 | //------检查数量是不是超出限购------ |
1065 | 1074 | checkCartNum: function(t) { |
1066 | 1075 | |
1076 | + if(this.data.prom_type != 1) { | |
1077 | + this.setData({goodsInputNum: t}); | |
1078 | + return false; | |
1079 | + }; | |
1080 | + | |
1067 | 1081 | var th = this; |
1068 | 1082 | |
1069 | 1083 | // if(this.data.prom_act.is_shop_buy && this.data.options.prom_type != 1) { |
1070 | - | |
1084 | + | |
1071 | 1085 | if(t == 0) return false; |
1072 | 1086 | // th.setData({goodsInputNum:t}); |
1073 | 1087 | ... | ... |