forked from gxwebsoft/mp-10550
优化下单流程
This commit is contained in:
@@ -115,10 +115,17 @@ function Cart() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 这里可以跳转到结算页面
|
||||
Taro.showToast({
|
||||
title: '跳转到结算页面',
|
||||
icon: 'success'
|
||||
// 获取选中的商品
|
||||
const selectedCartItems = cartItems.filter((item: CartItem) =>
|
||||
selectedItems.includes(item.goodsId)
|
||||
);
|
||||
|
||||
// 将选中的商品信息存储到本地,供结算页面使用
|
||||
Taro.setStorageSync('checkout_items', JSON.stringify(selectedCartItems));
|
||||
|
||||
// 跳转到购物车结算页面
|
||||
Taro.navigateTo({
|
||||
url: '/shop/orderConfirmCart/index'
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user