Refactor API requests and update component keys
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
status: 0,
|
||||
})
|
||||
|
||||
const { data: bannerList } = useAsyncData('get-setting-Page', async () => {
|
||||
const { data: bannerList } = useAsyncData('get-setting-Page-learning-recommendations', async () => {
|
||||
const res = await getSettingPage(pageReq)
|
||||
return res.data
|
||||
})
|
||||
|
||||
@ -39,27 +39,18 @@ import LoginForm from "./LoginForm.vue";
|
||||
import { Vue3Marquee } from "vue3-marquee";
|
||||
|
||||
import { getSettingPage } from "~/api/home/index";
|
||||
import type { PageResultIndexSettingRespVO } from "~/api/home/type";
|
||||
|
||||
const pageReq = reactive({
|
||||
type: 1,
|
||||
status: 0,
|
||||
});
|
||||
|
||||
const { data: bannerList } = useAsyncData("get-setting-Page", async () => {
|
||||
const { data: bannerList } = useAsyncData("get-setting-Page-main-content", async () => {
|
||||
|
||||
const res = await getSettingPage(pageReq);
|
||||
return res.data;
|
||||
});
|
||||
|
||||
// const bannerList = ref<PageResultIndexSettingRespVO[]>([])
|
||||
// const getBanner = async () => {
|
||||
// const res = await getSettingPage(pageReq)
|
||||
// if (res.code === 0) {
|
||||
// bannerList.value = res.data
|
||||
// }
|
||||
// }
|
||||
// getBanner()
|
||||
|
||||
const handleClick = (url: string) => {
|
||||
if (url) {
|
||||
navigateTo(url);
|
||||
|
||||
Reference in New Issue
Block a user