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 @@
@@ -198,7 +200,7 @@ onLoad()
养宠贴士
-
+
Date: Wed, 11 Dec 2024 17:54:18 +0800
Subject: [PATCH 4/6] =?UTF-8?q?add=EF=BC=9A=E5=AF=B9=E6=8E=A5=E5=8D=A1?=
=?UTF-8?q?=E7=89=87=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/carousal.ts | 9 +-
src/model/base.ts | 32 ++++++
src/model/carousals.ts | 13 ---
src/model/pet-manual.ts | 29 +++++
src/model/user.ts | 11 ++
src/pages/pet-manual/components/CardList.vue | 44 ++++++--
src/pages/pet-manual/index.vue | 108 ++++++++-----------
7 files changed, 156 insertions(+), 90 deletions(-)
create mode 100644 src/model/base.ts
delete mode 100644 src/model/carousals.ts
create mode 100644 src/model/pet-manual.ts
create mode 100644 src/model/user.ts
diff --git a/src/api/carousal.ts b/src/api/carousal.ts
index bdc591a..c2e71ca 100644
--- a/src/api/carousal.ts
+++ b/src/api/carousal.ts
@@ -1,13 +1,18 @@
-import type { CreateCarousalsRequest, TypeList } from '@/model/carousals'
+import type { PageResult } from '@/model/base'
+import type { Article, ArticleParams, Category, CreateCarousalsRequest } from '@/model/pet-manual'
import httpClient from '@/api/httpClient'
function getCarousalList() {
return httpClient.get('/carousals/active-list')
}
function getTypeList() {
- return httpClient.get('/categories/list')
+ return httpClient.get('/categories/list')
+}
+function getArticleList(data: ArticleParams) {
+ return httpClient.get>('/articles', data)
}
export default {
getCarousalList,
getTypeList,
+ getArticleList,
}
diff --git a/src/model/base.ts b/src/model/base.ts
new file mode 100644
index 0000000..6c5d918
--- /dev/null
+++ b/src/model/base.ts
@@ -0,0 +1,32 @@
+import type { User } from './user'
+
+export interface ErrorResponse {
+ code: number
+ message: string
+}
+export interface BaseModel {
+ id: string
+ createdTime: string
+ updateTime: string
+}
+
+export interface AuditBaseModel extends BaseModel {
+ createBy: User
+ updateBy: User
+}
+
+export interface Paging {
+ page: number
+ size: number
+ total?: number
+}
+
+export interface BaseFilterRequest extends Partial {
+}
+
+export interface PageResult {
+ pagination: Paging
+ data: T[]
+}
+
+export interface ErrorResponseList extends Array {}
diff --git a/src/model/carousals.ts b/src/model/carousals.ts
deleted file mode 100644
index 0fd964f..0000000
--- a/src/model/carousals.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export interface CreateCarousalsRequest {
- imageUrl: string
- targetType: string
- targetUrl: string
- targetId?: string
-}
-
-export interface TypeList {
- id: string
- code: string
- name: string
- isClick?: boolean
-}
diff --git a/src/model/pet-manual.ts b/src/model/pet-manual.ts
new file mode 100644
index 0000000..27c9528
--- /dev/null
+++ b/src/model/pet-manual.ts
@@ -0,0 +1,29 @@
+import type { Paging } from '@/model/base'
+
+export interface CreateCarousalsRequest {
+ imageUrl: string
+ targetType: string
+ targetUrl: string
+ targetId?: string
+}
+
+export interface Category {
+ id: string
+ code: string
+ name: string
+ isClick?: boolean
+}
+
+export interface ArticleParams extends Paging {
+ title: string
+ categoryId: string
+}
+
+export interface Article {
+ id: string
+ content: string
+ status: string
+ title: string
+ updatedTime?: string
+ imageUrl?: string
+}
diff --git a/src/model/user.ts b/src/model/user.ts
new file mode 100644
index 0000000..c9cd9c0
--- /dev/null
+++ b/src/model/user.ts
@@ -0,0 +1,11 @@
+import type { AuditBaseModel, BaseFilterRequest } from '@/model/base'
+
+export interface User extends AuditBaseModel {
+ username: string
+ locked: boolean
+ enabled: boolean
+}
+
+export interface UserSearchFilter extends BaseFilterRequest {
+ username?: string
+}
diff --git a/src/pages/pet-manual/components/CardList.vue b/src/pages/pet-manual/components/CardList.vue
index bc7973a..b848608 100644
--- a/src/pages/pet-manual/components/CardList.vue
+++ b/src/pages/pet-manual/components/CardList.vue
@@ -1,13 +1,34 @@
@@ -15,20 +36,21 @@ const props = defineProps<{
v-for="(item, index) in props.cardList" :key="index" class="bg-[white] rounded-md shadow-lg mx-4 mb-4 w-[calc(100% - 32px)] mt-3"
>
-
+
{{ item.title }}
- {{ item.desc }}
+ {{ item.content }}
- {{ item.time }}
+ {{ item.updatedTime }}
+