This commit is contained in:
@@ -188,23 +188,27 @@ const orderData = ref<any>([]);
|
||||
|
||||
const sub = async () => {
|
||||
const arr: any = list.value.filter(
|
||||
(item: any) => item.state.checkboxgroup.length > 0,
|
||||
);
|
||||
if (arr.length === 0) {
|
||||
Taro.showToast({
|
||||
title: '请选择商品',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
(item: any) => item.state.checkboxgroup.length > 0,
|
||||
);
|
||||
console.log(arr);
|
||||
if (arr.length === 0) {
|
||||
Taro.showToast({
|
||||
title: '请选择商品',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const {data: res} = await createActiveOrder({
|
||||
Bid: arr.map((item: any) => item.StoreBid),
|
||||
});
|
||||
if (res.oid) {
|
||||
orderData.value = res?.oid;
|
||||
isShowPay.value = true;
|
||||
// orderData.value = res?.oid;
|
||||
// isShowPay.value = true;
|
||||
// console.log(arr)
|
||||
Taro.navigateTo({
|
||||
url: `/pages/goods/pay/index?oid=${res.oid}&bid=${arr[0].StoreBid}`,
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
Taro.showToast({
|
||||
|
||||
Reference in New Issue
Block a user