v4.0.10版本更新
要求门店支持多个分类; 小程序C端“瓶”位置调整; 商品单元“立即购买”直接跳转到“确认订单”页;
This commit is contained in:
@@ -53,10 +53,10 @@ export default function OrderQtyControls({ value, unitLabel, onChange }: OrderQt
|
|||||||
onBlur={commit}
|
onBlur={commit}
|
||||||
onConfirm={commit}
|
onConfirm={commit}
|
||||||
/>
|
/>
|
||||||
<Text className="order-qty-unit">{unitLabel}</Text>
|
|
||||||
<View className="order-qty-btn" onClick={() => onChange(Math.min(MAX_QTY, current() + 1))}>
|
<View className="order-qty-btn" onClick={() => onChange(Math.min(MAX_QTY, current() + 1))}>
|
||||||
<Text>+</Text>
|
<Text>+</Text>
|
||||||
</View>
|
</View>
|
||||||
|
<Text className="order-qty-unit">{unitLabel}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -196,6 +196,17 @@ export default function HomePage() {
|
|||||||
Taro.navigateTo({ url: `/pages/product-detail/index?id=${id}` });
|
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) {
|
async function goOnSitePickup(productId: string) {
|
||||||
const returnPath = `/pages/order-confirm-pickup/index?productId=${productId}&qty=2`;
|
const returnPath = `/pages/order-confirm-pickup/index?productId=${productId}&qty=2`;
|
||||||
if (!isLoggedIn()) {
|
if (!isLoggedIn()) {
|
||||||
@@ -348,7 +359,7 @@ export default function HomePage() {
|
|||||||
className="home-buy-btn"
|
className="home-buy-btn"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation?.();
|
e.stopPropagation?.();
|
||||||
openProductDetail(p.id);
|
void goBuyOnline(p.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
立即购买
|
立即购买
|
||||||
|
|||||||
@@ -191,7 +191,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.order-qty-unit {
|
.order-qty-unit {
|
||||||
margin-right: 8px;
|
margin-left: 8px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-on-surface);
|
color: var(--color-on-surface);
|
||||||
|
|||||||
Reference in New Issue
Block a user