This commit is contained in:
weipengfei 2024-05-25 20:19:38 +08:00
parent 1393b1d3a9
commit 31ee110122
2 changed files with 8 additions and 7 deletions

View File

@ -207,7 +207,6 @@
const show = ref(0); const show = ref(0);
const topActive = ref(0); const topActive = ref(0);
const changeOne = async (item, index) => { const changeOne = async (item, index) => {
console.log('选择', item, index);
topActive.value = item.id; topActive.value = item.id;
show.value = 0; show.value = 0;
goodClassTow.value = item?.children || []; goodClassTow.value = item?.children || [];
@ -220,18 +219,16 @@
const leftActive = ref(0); const leftActive = ref(0);
const changeTwo = (item, index) => { const changeTwo = (item, index) => {
console.log('选择', item, index);
leftActive.value = item.id; leftActive.value = item.id;
show.value = 0; show.value = 0;
goodClassThree.value = item?.children || []; goodClassThree.value = item?.children || [];
rightActive.value = goodClassThree.value[0]?.id || ''; rightActive.value = goodClassThree.value[0]?.id || '';
getGoodList(); getGoodList();
if (!item.isLoading && item.id) getgoodClassList(leftActive.value); // , , if (!item.isLoading && item.id) getgoodClassList(leftActive.value, 1); // , ,
} }
const rightActive = ref(0); const rightActive = ref(0);
const changeThree = (item, index) => { const changeThree = (item, index) => {
console.log('选择', item, index);
rightActive.value = item.id; rightActive.value = item.id;
show.value = 0; show.value = 0;
getGoodList(); getGoodList();
@ -302,13 +299,14 @@
const goodClassTow = ref([]); // const goodClassTow = ref([]); //
const goodClassThree = ref([]); // const goodClassThree = ref([]); //
const classMap = new Map(); const classMap = new Map();
const getgoodClassList = (pid = 0) => { const getgoodClassList = (pid = 0, three=0) => {
let page_no = classMap.get(pid) || 1; let page_no = classMap.get(pid) || 1;
console.log(classMap.get(pid)); console.log(classMap.get(pid));
goodClassListApi({ goodClassListApi({
pid: pid, pid: pid,
page_no: page_no, page_no: page_no,
page_size: 30 page_size: 30,
three: three
}).then(res => { }).then(res => {
if (pid == 0) { // if (pid == 0) { //
if(!res.data?.lists?.length) return ; if(!res.data?.lists?.length) return ;

View File

@ -340,7 +340,10 @@
} else uni.$u.toast('支付失败') } else uni.$u.toast('支付失败')
}, },
fail: (e) => { fail: (e) => {
uni.$u.toast('用户取消支付') uni.$u.toast('用户取消支付');
uni.redirectTo({
url: '/pagesOrder/order/order?back=-1&type=1'
})
} }
}) })
}).catch(err => { }).catch(err => {