From 482472af4e3ef4337049f366f7794740a5c99620 Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Mon, 30 Jun 2025 16:27:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E6=B7=BB=E5=8A=A0=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E9=80=89=E8=82=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 App.vue 中添加指标选股相关路由和菜单项 - 新增 SelectStock 组件实现选股功能 - 在 backend 中调整搜索股票接口的分页参数 --- README.md | 1 + backend/data/search_stock_api.go | 2 +- frontend/src/App.vue | 23 ++++- frontend/src/components/SelectStock.vue | 126 ++++++++++++++++++++++++ frontend/src/components/market.vue | 4 + frontend/wailsjs/go/main/App.d.ts | 2 + frontend/wailsjs/go/main/App.js | 4 + 7 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/SelectStock.vue diff --git a/README.md b/README.md index e6c8e8d..3330353 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ | 不再强制依赖Chrome浏览器 | ✅ | 默认使用edge浏览器抓取新闻资讯 | ## 👀 更新日志 +### 2025.06.30 添加指标选股功能 ### 2025.06.27 添加财经日历和重大事件时间轴功能 ### 2025.06.25 添加热门股票、事件和话题功能 ### 2025.06.18 更新内置股票基础数据,软件内实时市场资讯信息提醒,添加行业研究功能 diff --git a/backend/data/search_stock_api.go b/backend/data/search_stock_api.go index a1c6f02..cea7d58 100644 --- a/backend/data/search_stock_api.go +++ b/backend/data/search_stock_api.go @@ -29,7 +29,7 @@ func (s SearchStockApi) SearchStock() map[string]any { SetHeader("Content-Type", "application/json"). SetBody(fmt.Sprintf(`{ "keyWord": "%s", - "pageSize": 50, + "pageSize": 50000, "pageNo": 1, "fingerprint": "e38b5faabf9378c8238e57219f0ebc9b", "gids": [], diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b371eed..f4a78ab 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -31,7 +31,7 @@ import {AnalyzeSentiment, GetConfig, GetGroupList} from "../wailsjs/go/main/App" import {Dragon, Fire, Gripfire} from "@vicons/fa"; import {ReportSearch} from "@vicons/tabler"; import {LocalFireDepartmentRound} from "@vicons/material"; -import {CommentNote20Filled} from "@vicons/fluent"; +import {BoxSearch20Regular, CommentNote20Filled} from "@vicons/fluent"; import {FireFilled, FireOutlined, NotificationFilled, StockOutlined} from "@vicons/antd"; @@ -332,6 +332,27 @@ const menuOptions = ref([ key: 'market10', icon: renderIcon(Gripfire), }, + { + label: () => + h( + RouterLink, + { + href: '#', + to: { + name: 'market', + query: { + name: "指标选股", + } + }, + onClick: () => { + EventsEmit("changeMarketTab", {ID: 0, name: '指标选股'}) + }, + }, + {default: () => '指标选股',} + ), + key: 'market11', + icon: renderIcon(BoxSearch20Regular), + }, ] }, { diff --git a/frontend/src/components/SelectStock.vue b/frontend/src/components/SelectStock.vue new file mode 100644 index 0000000..af17d2d --- /dev/null +++ b/frontend/src/components/SelectStock.vue @@ -0,0 +1,126 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/components/market.vue b/frontend/src/components/market.vue index 0cc74e0..44eb20c 100644 --- a/frontend/src/components/market.vue +++ b/frontend/src/components/market.vue @@ -31,6 +31,7 @@ import HotEvents from "./HotEvents.vue"; import HotTopics from "./HotTopics.vue"; import InvestCalendarTimeLine from "./InvestCalendarTimeLine.vue"; import ClsCalendarTimeLine from "./ClsCalendarTimeLine.vue"; +import SelectStock from "./SelectStock.vue"; const route = useRoute() const icon = ref('https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png'); @@ -594,6 +595,9 @@ function ReFlesh(source) { + + + ; +export function SearchStock(arg1:string):Promise>; + export function SendDingDingMessage(arg1:string,arg2:string):Promise; export function SendDingDingMessageByType(arg1:string,arg2:string,arg3:number):Promise; diff --git a/frontend/wailsjs/go/main/App.js b/frontend/wailsjs/go/main/App.js index 2259069..da3813b 100644 --- a/frontend/wailsjs/go/main/App.js +++ b/frontend/wailsjs/go/main/App.js @@ -182,6 +182,10 @@ export function SaveAsMarkdown(arg1, arg2) { return window['go']['main']['App']['SaveAsMarkdown'](arg1, arg2); } +export function SearchStock(arg1) { + return window['go']['main']['App']['SearchStock'](arg1); +} + export function SendDingDingMessage(arg1, arg2) { return window['go']['main']['App']['SendDingDingMessage'](arg1, arg2); }