diff --git a/app.go b/app.go index 61323e5..9e43b4e 100644 --- a/app.go +++ b/app.go @@ -1074,6 +1074,13 @@ func (a *App) GetTelegraphList(source string) *[]*models.Telegraph { return telegraphs } +func (a *App) ReFleshTelegraphList(source string) *[]*models.Telegraph { + data.NewMarketNewsApi().GetNewTelegraph(30) + data.NewMarketNewsApi().GetSinaNews(30) + telegraphs := data.NewMarketNewsApi().GetTelegraphList(source) + return telegraphs +} + func (a *App) GlobalStockIndexes() map[string]any { return data.NewMarketNewsApi().GlobalStockIndexes(30) } diff --git a/frontend/src/components/market.vue b/frontend/src/components/market.vue index 4f1b256..5139af2 100644 --- a/frontend/src/components/market.vue +++ b/frontend/src/components/market.vue @@ -4,7 +4,7 @@ import { GetAIResponseResult, GetConfig, GetPromptTemplates, GetTelegraphList, - GlobalStockIndexes, + GlobalStockIndexes, ReFleshTelegraphList, SaveAIResponseResult, SaveAsMarkdown, ShareAnalysis, SummaryStockNews } from "../../wailsjs/go/main/App"; @@ -219,6 +219,18 @@ function share(){ }) }) } + +function ReFlesh(source){ + console.log("ReFlesh:",source) + ReFleshTelegraphList(source).then(res => { + if(source==="财联社电报"){ + telegraphList.value = res + } + if(source==="新浪财经"){ + sinaNewsList.value = res + } + }) +}