Authored by yyq

购物车兼容性

@@ -47,7 +47,7 @@ exports.showStorage = (leftNumber) => { @@ -47,7 +47,7 @@ exports.showStorage = (leftNumber) => {
47 leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10); 47 leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10);
48 48
49 if (leftNumber <= 3 && leftNumber >= 0) { 49 if (leftNumber <= 3 && leftNumber >= 0) {
50 - return '仅剩' + leftNumber + '件'; 50 + return `仅剩${leftNumber}件`;
51 } else if (leftNumber < 0) { 51 } else if (leftNumber < 0) {
52 return '库存不足'; 52 return '库存不足';
53 } 53 }
@@ -7,7 +7,7 @@ module.exports = function(leftNumber) { @@ -7,7 +7,7 @@ module.exports = function(leftNumber) {
7 leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10); 7 leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10);
8 8
9 if (leftNumber <= 3 && leftNumber >= 0) { 9 if (leftNumber <= 3 && leftNumber >= 0) {
10 - return `仅剩${leftNumber}件`; 10 + return '仅剩' + leftNumber + '件';
11 } else if (leftNumber < 0) { 11 } else if (leftNumber < 0) {
12 return '库存不足'; 12 return '库存不足';
13 } 13 }