diff --git a/pages/index/index.vue b/pages/index/index.vue index 4a459a9..f6951ee 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -229,6 +229,7 @@ const show = ref(0); const topActive = ref(0); const changeOne = async (item, index) => { + console.log(item) topActive.value = item.id; show.value = 0; goodClassTow.value = item?.children || []; @@ -236,7 +237,7 @@ leftActive.value = goodClassTow.value[0]?.id || ''; rightActive.value = goodClassThree.value[0]?.id || ''; getGoodList(); - if (!item.isLoading && item.id) getgoodClassList(topActive.value); // 判断是否加载过数据, 加载过则不进行加载,节约资源 + if (!item.isLoading && item.id) getgoodClassList(topActive.value, 2); // 判断是否加载过数据, 加载过则不进行加载,节约资源 } const leftActive = ref(0); @@ -246,7 +247,7 @@ goodClassThree.value = item?.children || []; rightActive.value = goodClassThree.value[0]?.id || ''; getGoodList(); - if (!item.isLoading && item.id) getgoodClassList(leftActive.value, 2); // 判断是否加载过数据, 加载过则不进行加载,节约资源 + if (!item.isLoading && item.id) getgoodClassList(leftActive.value, 3); // 判断是否加载过数据, 加载过则不进行加载,节约资源 } const rightActive = ref(0);