From 0bc5b1a940259fa3a530b4e943a56f24ea4f53b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Sat, 1 Mar 2025 01:53:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9Estock=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Bbs.Vue3/src/router/index.js | 8 + Yi.Bbs.Vue3/src/views/stock/Index.vue | 446 ++++++++++++++++++++++++++ 2 files changed, 454 insertions(+) create mode 100644 Yi.Bbs.Vue3/src/views/stock/Index.vue diff --git a/Yi.Bbs.Vue3/src/router/index.js b/Yi.Bbs.Vue3/src/router/index.js index de961f29..984d389d 100644 --- a/Yi.Bbs.Vue3/src/router/index.js +++ b/Yi.Bbs.Vue3/src/router/index.js @@ -144,6 +144,14 @@ const router = createRouter({ title: "面试宝典", }, }, + { + name: "stock", + path: "/stock", + component: () => import("../views/stock/Index.vue"), + meta: { + title: "股票", + }, + }, ], }, { diff --git a/Yi.Bbs.Vue3/src/views/stock/Index.vue b/Yi.Bbs.Vue3/src/views/stock/Index.vue new file mode 100644 index 00000000..72c42f52 --- /dev/null +++ b/Yi.Bbs.Vue3/src/views/stock/Index.vue @@ -0,0 +1,446 @@ + + + + + + 意社区股市 + + + + + + + + + + + + + + + + + 最新市场动态 + + + + {{ news.date }} + {{ news.title }} + + + + + + + + {{ currentStockInfo.name }} ({{ currentStockInfo.code }}) + + + {{ currentStockInfo.price }} + + + {{ priceChange > 0 ? '+' : '' }}{{ priceChange }} ({{ priceChangePercent }}%) + + + + + + + + + + + + + 买入 + 卖出 + + + + + + + + 交易记录 + + + + {{ record.time }} + + {{ record.type === 'buy' ? '买入' : '卖出' }} + + {{ record.amount }}股 + ¥{{ record.price }} + + + + + + + + + + 我的持仓 + 总资产: ¥{{ totalAssets }} + + + + + + + + + + + {{ scope.row.profit >= 0 ? '+' : '' }}{{ scope.row.profit }} + + + + + + + + + + +