+8
-0
@@ -460,2 +460,7 @@ "use strict"; | ||
| } | ||
| //临时菜 | ||
| if (goods.is_temporary || goods.isTemporary) { | ||
| return new bignumber_js_1.BigNumber(goods.discountSaleAmount || 0) | ||
| .toNumber(); | ||
| } | ||
| // 1. 优先级1:商家改价(改价后单价>0才生效) | ||
@@ -562,2 +567,3 @@ if (goods.discountSaleAmount && goods.discountSaleAmount > 0) { | ||
| const realPrice = new bignumber_js_1.BigNumber(calcSingleGoodsRealPrice(goods, config)); | ||
| console.log("realPrice", realPrice.toNumber()); | ||
| total = total.plus(realPrice.multipliedBy(availableNum)); | ||
@@ -790,2 +796,4 @@ } | ||
| const goodsDiscountAmount = calcGoodsDiscountAmount(goodsOriginalAmount, goodsRealAmount); // 商品折扣金额 | ||
| console.log("goodsOriginalAmount", goodsOriginalAmount); | ||
| console.log("goodsRealAmount", goodsRealAmount); | ||
| const newUserDiscount = config.newUserDiscount || 0; // 新客立减 | ||
@@ -792,0 +800,0 @@ // 其他费用计算(原有逻辑不变) ------------------------------ |
+1
-1
| { | ||
| "name": "ysk-utils", | ||
| "version": "1.0.89", | ||
| "version": "1.0.91", | ||
| "main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
+1
-1
@@ -14,5 +14,5 @@ ### 银收客价格计算工具 | ||
| 发布 | ||
| npm publish --//registry.npmjs.org/:_authToken=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 | ||
| npm publish --//registry.npmjs.org/:_authToken=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 | ||
| ## 小版本升级 | ||
| npm version patch |
273468
0.13%6515
0.12%