Authored by xuqi

reset left num

... ... @@ -44,11 +44,11 @@ exports.lte = (num1, num2, options) => {
* @return {[boolen]}
*/
exports.showStorage = (leftNumber) => {
leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10);
leftNumber = +leftNumber;
if (leftNumber <= 3 && leftNumber >= 0) {
if (leftNumber <= 3 && leftNumber > 0) {
return `仅剩${leftNumber}件`;
} else if (leftNumber < 0) {
} else if (leftNumber <= 0) {
return '库存不足';
}
};
... ...
... ... @@ -4,11 +4,11 @@
* @return {[boolen]}
*/
module.exports = function(leftNumber) {
leftNumber = typeof num1 === 'number' ? leftNumber : parseFloat(leftNumber, 10);
leftNumber = +leftNumber;
if (leftNumber <= 3 && leftNumber >= 0) {
if (leftNumber <= 3 && leftNumber > 0) {
return '仅剩' + leftNumber + '件';
} else if (leftNumber < 0) {
} else if (leftNumber <= 0) {
return '库存不足';
}
};
... ...