v4.0.10版本更新
要求门店支持多个分类; 小程序C端“瓶”位置调整; 商品单元“立即购买”直接跳转到“确认订单”页;
This commit is contained in:
@@ -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);
|
||||
}}
|
||||
>
|
||||
立即购买
|
||||
|
||||
Reference in New Issue
Block a user