From 5ca4ef75229f28640c56d5db4a70f0201e13c339 Mon Sep 17 00:00:00 2001 From: zlong <953829746@qq.com> Date: Sun, 8 Dec 2024 17:50:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BF=AE=E5=A4=8D=E5=85=BB=E5=AE=A0?= =?UTF-8?q?=E6=89=8B=E5=86=8C=E9=83=A8=E5=88=86=E7=B1=BB=E5=9E=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/carousal.ts | 3 ++- src/model/carousals.ts | 2 +- src/pages/pet-manual/index.vue | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/carousal.ts b/src/api/carousal.ts index b633db3..7abe47e 100644 --- a/src/api/carousal.ts +++ b/src/api/carousal.ts @@ -1,7 +1,8 @@ +import type { CreateCarousalsRequest } from '@/model/carousals' import httpClient from '@/api/httpClient' function getCarousalList() { - return httpClient.get('/carousals/active-list') + return httpClient.get('/carousals/active-list') } export default { diff --git a/src/model/carousals.ts b/src/model/carousals.ts index 0b45abe..c5a8d96 100644 --- a/src/model/carousals.ts +++ b/src/model/carousals.ts @@ -1,6 +1,6 @@ export interface CreateCarousalsRequest { imageUrl: string targetType: string - targetUrl?: string + targetUrl: string targetId?: string } diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue index 764f80d..50429da 100644 --- a/src/pages/pet-manual/index.vue +++ b/src/pages/pet-manual/index.vue @@ -75,7 +75,7 @@ const listModel = ref([ const safeHeight = ToolApi.getSafeHeight() const searchValue = ref('') -const info = ref([ +const info = ref([ { imageUrl: '', targetId: '', @@ -126,8 +126,7 @@ const findList = ref<{ name: string }[]>([ { name: '猫咪尿闭怎么办' }, ]) async function onLoad() { - const getCarousalListApi = await carousalApi.getCarousalList() - info.value = getCarousalListApi + info.value = await carousalApi.getCarousalList() } function handleJumpUrl(item: CreateCarousalsRequest) { if (item.targetType === 'url') {