购物车前端库存判断问题优化
parent
1f91165b65
commit
9b5487d2f2
|
@ -1,4 +1,4 @@
|
|||
site-url: 127.0.0.1
|
||||
site-url: 47.115.118.34
|
||||
server:
|
||||
port: 80
|
||||
tomcat:
|
||||
|
|
|
@ -237,7 +237,7 @@
|
|||
var goodsStock = document.getElementById("goodsStock" + i);
|
||||
var goodsState = document.getElementById("goodsState" + i);
|
||||
var checkbox = document.getElementById("checkbox" + i);
|
||||
if (goodsStock.value < 1 || goodsStock.value < goodsNum.value || goodsState.value != 1){
|
||||
if (goodsStock.value < 1 || BigInt.valueOf(goodsStock.value) < BigInt.valueOf(goodsNum.value) || goodsState.value != 1){
|
||||
checkbox.checked = false;
|
||||
alert("您的购物车中存在超出库存,或者已下架的商品!");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue