Commit ed67d458741345eaf7f03844b17c6521bc729097
1 parent
09149c2e
购物车提示修改
Showing
2 changed files
with
16 additions
and
10 deletions
packageA/pages/goodsInfo/goodsInfo.wxml
... | ... | @@ -118,7 +118,7 @@ |
118 | 118 | |
119 | 119 | <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> |
120 | 120 | <view class="stock" wx:else>限购:不限</view> |
121 | - <view class="sales">已购:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
121 | + <view class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
122 | 122 | |
123 | 123 | <!-- <block wx:if="{{prom_st==0}}"> |
124 | 124 | <view class="sales">已购:0件</view> | ... | ... |
pages/cart/cart/cart.js
... | ... | @@ -2036,8 +2036,9 @@ Page({ |
2036 | 2036 | |
2037 | 2037 | // 检测库存 |
2038 | 2038 | if(redis_num == 0) { |
2039 | - wx.showModal({ | |
2039 | + wx.showToast({ | |
2040 | 2040 | title: '超出活动库存', |
2041 | + icon: 'none', | |
2041 | 2042 | }); |
2042 | 2043 | th.setData({[txt]: redis_num}); |
2043 | 2044 | return false; |
... | ... | @@ -2074,8 +2075,9 @@ Page({ |
2074 | 2075 | // 如果限购数量<=活动库存数量,增加数量时会先超过限购数量,此时应提示“超出活动限购数量” |
2075 | 2076 | if(t.goods_num + gd_buy_num > buylimit) { |
2076 | 2077 | // 计算还可以购买的数量:库存量 - 已购数 |
2077 | - wx.showModal({ | |
2078 | - title: '超出活动限购', | |
2078 | + wx.showToast({ | |
2079 | + title: '超出活动限购', | |
2080 | + icon: 'none', | |
2079 | 2081 | }); |
2080 | 2082 | let num = buylimit - gd_buy_num; |
2081 | 2083 | if (num <= 0) num = 1; |
... | ... | @@ -2086,8 +2088,9 @@ Page({ |
2086 | 2088 | } |
2087 | 2089 | |
2088 | 2090 | if(t.goods_num > redis_num) { |
2089 | - wx.showModal({ | |
2090 | - title: '超出活动库存', | |
2091 | + wx.showToast({ | |
2092 | + title: '超出活动库存', | |
2093 | + icon: 'none', | |
2091 | 2094 | }); |
2092 | 2095 | th.setData({[txt]: redis_num}); |
2093 | 2096 | return false; |
... | ... | @@ -2121,16 +2124,18 @@ Page({ |
2121 | 2124 | |
2122 | 2125 | // 检测库存 |
2123 | 2126 | if(redis_num == 0) { |
2124 | - wx.showModal({ | |
2127 | + wx.showToast({ | |
2125 | 2128 | title: '超出活动库存', |
2129 | + icon: 'none', | |
2126 | 2130 | }); |
2127 | 2131 | th.setData({[txt]: redis_num}); |
2128 | 2132 | return false; |
2129 | 2133 | }; |
2130 | 2134 | |
2131 | 2135 | if(t.goods_num > redis_num) { |
2132 | - wx.showModal({ | |
2136 | + wx.showToast({ | |
2133 | 2137 | title: '超出活动库存', |
2138 | + icon: 'none', | |
2134 | 2139 | }); |
2135 | 2140 | th.setData({[txt]: redis_num}); |
2136 | 2141 | return false; |
... | ... | @@ -2171,8 +2176,9 @@ Page({ |
2171 | 2176 | // 如果限购数量<=活动库存数量,增加数量时会先超过限购数量,此时应提示“超出活动限购数量” |
2172 | 2177 | if(t.goods_num + gd_buy_num > buylimit) { |
2173 | 2178 | // 计算还可以购买的数量:库存量 - 已购数 |
2174 | - wx.showModal({ | |
2175 | - title: '超出活动限购', | |
2179 | + wx.showToast({ | |
2180 | + title: '超出活动限购', | |
2181 | + icon: 'none', | |
2176 | 2182 | }); |
2177 | 2183 | th.setData({[txt]: buylimit}); |
2178 | 2184 | ... | ... |