From b5d38bcee529e1c552c2e2484cbd0fe7085d75e0 Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 28 Dec 2025 00:56:19 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=95=B4=E5=90=88=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=96=B0=E9=97=BB=E6=95=B0=E6=8D=AE=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?RWA=E7=BB=84=E4=BB=B6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 10 ++++ src/mocks/data/index.ts | 1 + src/mocks/data/news.ts | 43 +++++++++++++++++ src/views/riwa/components/news.vue | 74 ++++++++++++++++++++++++++++++ src/views/riwa/components/rwa.vue | 50 +++++++++++++++++++- src/views/riwa/index.vue | 4 +- 6 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 src/mocks/data/news.ts create mode 100644 src/views/riwa/components/news.vue diff --git a/components.d.ts b/components.d.ts index 50efa37..b340a96 100644 --- a/components.d.ts +++ b/components.d.ts @@ -25,6 +25,11 @@ declare module 'vue' { IonBadge: typeof import('@ionic/vue')['IonBadge'] IonButton: typeof import('@ionic/vue')['IonButton'] IonButtons: typeof import('@ionic/vue')['IonButtons'] + IonCard: typeof import('@ionic/vue')['IonCard'] + IonCardContent: typeof import('@ionic/vue')['IonCardContent'] + IonCardHeader: typeof import('@ionic/vue')['IonCardHeader'] + IonCardSubtitle: typeof import('@ionic/vue')['IonCardSubtitle'] + IonCardTitle: typeof import('@ionic/vue')['IonCardTitle'] IonChip: typeof import('@ionic/vue')['IonChip'] IonCol: typeof import('@ionic/vue')['IonCol'] IonContent: typeof import('@ionic/vue')['IonContent'] @@ -91,6 +96,11 @@ declare global { const IonBadge: typeof import('@ionic/vue')['IonBadge'] const IonButton: typeof import('@ionic/vue')['IonButton'] const IonButtons: typeof import('@ionic/vue')['IonButtons'] + const IonCard: typeof import('@ionic/vue')['IonCard'] + const IonCardContent: typeof import('@ionic/vue')['IonCardContent'] + const IonCardHeader: typeof import('@ionic/vue')['IonCardHeader'] + const IonCardSubtitle: typeof import('@ionic/vue')['IonCardSubtitle'] + const IonCardTitle: typeof import('@ionic/vue')['IonCardTitle'] const IonChip: typeof import('@ionic/vue')['IonChip'] const IonCol: typeof import('@ionic/vue')['IonCol'] const IonContent: typeof import('@ionic/vue')['IonContent'] diff --git a/src/mocks/data/index.ts b/src/mocks/data/index.ts index ebbe0d7..daa4c19 100644 --- a/src/mocks/data/index.ts +++ b/src/mocks/data/index.ts @@ -1,2 +1,3 @@ import "./notify"; import "./income"; +import "./news"; diff --git a/src/mocks/data/news.ts b/src/mocks/data/news.ts new file mode 100644 index 0000000..3a48179 --- /dev/null +++ b/src/mocks/data/news.ts @@ -0,0 +1,43 @@ +import { useMocks } from "../index"; + +export interface NewsItem { + id: string; + title: string; + description: string; + time: string; + thumbnail: string; +} + +export const mockNews: NewsItem[] = [ + { + id: "1", + title: "比特币突破45000美元大关,创下近期新高", + description: "在市场乐观情绪推动下,比特币价格今日突破45000美元,较上周上涨8.5%,投资者信心持续回升。", + time: "2024-12-28 10:30:00", + thumbnail: "https://images.unsplash.com/photo-1518546305927-5a555bb7020d?w=400", + }, + { + id: "2", + title: "美联储维持利率不变,加密货币市场迎来利好", + description: "美联储宣布维持基准利率在5.25%-5.5%区间,市场普遍认为这将有利于加密货币市场的稳定发展。", + time: "2024-12-28 09:15:00", + thumbnail: "https://images.unsplash.com/photo-1621761191319-c6fb62004040?w=400", + }, + { + id: "3", + title: "以太坊2.0质押量突破3200万ETH", + description: "以太坊网络质押总量持续增长,目前已超过3200万枚ETH,占总供应量的26.7%,显示出投资者对网络的长期信心。", + time: "2024-12-28 08:45:00", + thumbnail: "https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=400", + }, + { + id: "4", + title: "香港推出加密货币交易所监管新规", + description: "香港证监会发布最新监管指引,要求所有在港运营的加密货币交易平台必须在规定期限内申请牌照。", + time: "2024-12-27 18:20:00", + thumbnail: "https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=400", + }, +]; + +// 注册mock数据 +useMocks().register("news", () => mockNews); diff --git a/src/views/riwa/components/news.vue b/src/views/riwa/components/news.vue new file mode 100644 index 0000000..98c8cba --- /dev/null +++ b/src/views/riwa/components/news.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/views/riwa/components/rwa.vue b/src/views/riwa/components/rwa.vue index d340590..d84f038 100644 --- a/src/views/riwa/components/rwa.vue +++ b/src/views/riwa/components/rwa.vue @@ -1,4 +1,6 @@ @@ -16,8 +17,9 @@ import Rwa from "./components/rwa.vue"; 首页 - + +