|
@@ -24,7 +24,7 @@
|
|
|
<div @click="toTop(item.categoryId, index)">{{ item.categoryName }}</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <ul class="class_detail">
|
|
|
+ <ul class="class_detail" v-loading="loading">
|
|
|
<li :class="['detail_item', cateStyle]">
|
|
|
<div class="detail_title">{{ childCate.categoryName }}</div>
|
|
|
<div class="cat_wrap_dd">
|
|
@@ -90,6 +90,7 @@ const router = useRouter();
|
|
|
const navList = reactive({ data: {} });
|
|
|
const isTop = ref(false);
|
|
|
const isBottom = ref(false);
|
|
|
+const loading = ref(false)
|
|
|
|
|
|
useHead({
|
|
|
title: 'Categories',
|
|
@@ -126,6 +127,7 @@ const childCate = reactive({
|
|
|
});
|
|
|
const cateStyle = ref("item_style1");
|
|
|
const getChild = async (categoryId1, index) => {
|
|
|
+ loading.value = true;
|
|
|
const { data: value } = await useFetchRaw(
|
|
|
apiUrl + "v3/goods/front/goods/category/bottomCategory?categoryId1=" + categoryId1,
|
|
|
{ key: categoryId1.toString() }
|
|
@@ -135,6 +137,7 @@ const getChild = async (categoryId1, index) => {
|
|
|
childCate.data = res.data;
|
|
|
childCate.categoryName = navList.data[index].categoryName;
|
|
|
}
|
|
|
+ loading.value = false;
|
|
|
};
|
|
|
|
|
|
const toTop = (categoryId, index) => {
|