v4.0.10版本更新

要求门店支持多个分类;
小程序C端“瓶”位置调整;
商品单元“立即购买”直接跳转到“确认订单”页;
This commit is contained in:
2026-09-02 16:25:59 +08:00
parent 101b27c92c
commit 63fcf33416
3 changed files with 14 additions and 3 deletions
@@ -53,10 +53,10 @@ export default function OrderQtyControls({ value, unitLabel, onChange }: OrderQt
onBlur={commit}
onConfirm={commit}
/>
<Text className="order-qty-unit">{unitLabel}</Text>
<View className="order-qty-btn" onClick={() => onChange(Math.min(MAX_QTY, current() + 1))}>
<Text></Text>
</View>
<Text className="order-qty-unit">{unitLabel}</Text>
</View>
</View>
);
+12 -1
View File
@@ -196,6 +196,17 @@ export default function HomePage() {
Taro.navigateTo({ url: `/pages/product-detail/index?id=${id}` });
}
async function goBuyOnline(productId: string) {
const returnPath = `/pages/order-confirm/index?productId=${productId}&qty=2`;
if (!isLoggedIn()) {
goLogin(returnPath);
return;
}
const ready = await ensurePayReady(returnPath);
if (!ready) return;
Taro.navigateTo({ url: returnPath });
}
async function goOnSitePickup(productId: string) {
const returnPath = `/pages/order-confirm-pickup/index?productId=${productId}&qty=2`;
if (!isLoggedIn()) {
@@ -348,7 +359,7 @@ export default function HomePage() {
className="home-buy-btn"
onClick={(e) => {
e.stopPropagation?.();
openProductDetail(p.id);
void goBuyOnline(p.id);
}}
>
+1 -1
View File
@@ -191,7 +191,7 @@
}
.order-qty-unit {
margin-right: 8px;
margin-left: 8px;
font-size: 13px;
font-weight: 600;
color: var(--color-on-surface);