fix(shipping): 反转运费规则为不满5件收运费,满5件包邮
将 onShip() 中运费判断从 > 5 件收运费改为 < 5 件收运费
This commit is contained in:
parent
27a05210ee
commit
d7cd33bcca
@ -823,12 +823,12 @@ async function onShip() {
|
|||||||
const FREIGHT_THRESHOLD = 5
|
const FREIGHT_THRESHOLD = 5
|
||||||
const FREIGHT_FEE = 10
|
const FREIGHT_FEE = 10
|
||||||
|
|
||||||
if (allIds.length > FREIGHT_THRESHOLD) {
|
if (allIds.length < FREIGHT_THRESHOLD) {
|
||||||
// 超过 5 件,需支付 10 元运费
|
// 不满 5 件,需支付 10 元运费
|
||||||
const confirmed = await new Promise((resolve) => {
|
const confirmed = await new Promise((resolve) => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '需支付运费',
|
title: '需支付运费',
|
||||||
content: `共 ${allIds.length} 件商品,超过 ${FREIGHT_THRESHOLD} 件需支付 ¥${FREIGHT_FEE}.00 运费,确认继续?`,
|
content: `共 ${allIds.length} 件商品,不满 ${FREIGHT_THRESHOLD} 件需支付 ¥${FREIGHT_FEE}.00 运费,确认继续?`,
|
||||||
confirmText: '去支付',
|
confirmText: '去支付',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
success: (res) => resolve(res.confirm)
|
success: (res) => resolve(res.confirm)
|
||||||
@ -867,7 +867,7 @@ async function onShip() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 不超过 5 件,原有确认发货流程
|
// 满 5 件,包邮直接发货
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '确认发货',
|
title: '确认发货',
|
||||||
content: `共 ${allIds.length} 件物品,确认申请发货?`,
|
content: `共 ${allIds.length} 件物品,确认申请发货?`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user