fix(shipping): 反转运费规则为不满5件收运费,满5件包邮

将 onShip() 中运费判断从 > 5 件收运费改为 < 5 件收运费
This commit is contained in:
Zuncle 2026-03-31 21:13:57 +08:00
parent 27a05210ee
commit d7cd33bcca

View File

@ -823,12 +823,12 @@ async function onShip() {
const FREIGHT_THRESHOLD = 5
const FREIGHT_FEE = 10
if (allIds.length > FREIGHT_THRESHOLD) {
// 5 10
if (allIds.length < FREIGHT_THRESHOLD) {
// 5 10
const confirmed = await new Promise((resolve) => {
uni.showModal({
title: '需支付运费',
content: `${allIds.length} 件商品,超过 ${FREIGHT_THRESHOLD} 件需支付 ¥${FREIGHT_FEE}.00 运费,确认继续?`,
content: `${allIds.length} 件商品,不满 ${FREIGHT_THRESHOLD} 件需支付 ¥${FREIGHT_FEE}.00 运费,确认继续?`,
confirmText: '去支付',
cancelText: '取消',
success: (res) => resolve(res.confirm)
@ -867,7 +867,7 @@ async function onShip() {
return
}
// 5
// 5
uni.showModal({
title: '确认发货',
content: `${allIds.length} 件物品,确认申请发货?`,