From 24814b7deec1e1615251b172a1eadfddc6175d1c Mon Sep 17 00:00:00 2001 From: zlong <953829746@qq.com> Date: Fri, 6 Dec 2024 14:40:57 +0800 Subject: [PATCH 1/6] =?UTF-8?q?add:=E6=96=B0=E5=A2=9E=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/carousals.ts | 6 ++++++ src/pages.json | 1 - src/pages/pet-manual/index.vue | 36 ++++++++++++++++++++++------------ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/model/carousals.ts b/src/model/carousals.ts index e69de29..0b45abe 100644 --- a/src/model/carousals.ts +++ b/src/model/carousals.ts @@ -0,0 +1,6 @@ +export interface CreateCarousalsRequest { + imageUrl: string + targetType: string + targetUrl?: string + targetId?: string +} diff --git a/src/pages.json b/src/pages.json index bc5d583..7fd6261 100644 --- a/src/pages.json +++ b/src/pages.json @@ -37,6 +37,5 @@ "navigationBarTitleText": "Vitesse-Uni", "navigationStyle": "custom" }, - "__esModule": true, "subPackages": [] } \ No newline at end of file diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue index 1685926..764f80d 100644 --- a/src/pages/pet-manual/index.vue +++ b/src/pages/pet-manual/index.vue @@ -1,4 +1,5 @@ @@ -176,9 +188,9 @@ onLoad() - - - {{ item.content }} + + + 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 2/6] =?UTF-8?q?refactor:=E4=BF=AE=E5=A4=8D=E5=85=BB?= =?UTF-8?q?=E5=AE=A0=E6=89=8B=E5=86=8C=E9=83=A8=E5=88=86=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E9=97=AE=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') { From c096a2c69b60d7a81a2a8d45e757b3799b51f5d7 Mon Sep 17 00:00:00 2001 From: zlong <953829746@qq.com> Date: Tue, 10 Dec 2024 23:46:02 +0800 Subject: [PATCH 3/6] =?UTF-8?q?add:=20=E6=96=B0=E5=A2=9E=E5=AE=A0=E7=89=A9?= =?UTF-8?q?=E6=89=8B=E5=86=8C=E5=88=86=E7=B1=BB=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/carousal.ts | 7 +++++-- src/model/carousals.ts | 7 +++++++ src/pages/pet-manual/index.vue | 24 +++++++++++++----------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/api/carousal.ts b/src/api/carousal.ts index 7abe47e..bdc591a 100644 --- a/src/api/carousal.ts +++ b/src/api/carousal.ts @@ -1,10 +1,13 @@ -import type { CreateCarousalsRequest } from '@/model/carousals' +import type { CreateCarousalsRequest, TypeList } from '@/model/carousals' import httpClient from '@/api/httpClient' function getCarousalList() { return httpClient.get('/carousals/active-list') } - +function getTypeList() { + return httpClient.get('/categories/list') +} export default { getCarousalList, + getTypeList, } diff --git a/src/model/carousals.ts b/src/model/carousals.ts index c5a8d96..0fd964f 100644 --- a/src/model/carousals.ts +++ b/src/model/carousals.ts @@ -4,3 +4,10 @@ export interface CreateCarousalsRequest { targetUrl: string targetId?: string } + +export interface TypeList { + id: string + code: string + name: string + isClick?: boolean +} diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue index 50429da..c65f987 100644 --- a/src/pages/pet-manual/index.vue +++ b/src/pages/pet-manual/index.vue @@ -1,5 +1,5 @@