This commit is contained in:
parent
1393b1d3a9
commit
31ee110122
|
@ -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 ;
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in New Issue