mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
- 在 App.d.ts 和 App.js 中添加了 ClsCalendar 和 InvestCalendarTimeLine 函数 - 在 app_common.go 中实现了对应的后端逻辑 - 新增了 InvestCalendarTimeLine 和 ClsCalendarTimeLine组件用于展示数据 - 更新了 market.vue 中的 tabs,添加了新功能的页面
58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
package main
|
|
|
|
import (
|
|
"go-stock/backend/data"
|
|
"go-stock/backend/models"
|
|
)
|
|
|
|
// @Author spark
|
|
// @Date 2025/6/8 20:45
|
|
// @Desc
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
func (a *App) LongTigerRank(date string) *[]models.LongTigerRankData {
|
|
return data.NewMarketNewsApi().LongTiger(date)
|
|
}
|
|
|
|
func (a *App) StockResearchReport(stockCode string) []any {
|
|
return data.NewMarketNewsApi().StockResearchReport(stockCode, 7)
|
|
}
|
|
func (a *App) StockNotice(stockCode string) []any {
|
|
return data.NewMarketNewsApi().StockNotice(stockCode)
|
|
}
|
|
|
|
func (a *App) IndustryResearchReport(industryCode string) []any {
|
|
return data.NewMarketNewsApi().IndustryResearchReport(industryCode, 7)
|
|
}
|
|
func (a App) EMDictCode(code string) []any {
|
|
return data.NewMarketNewsApi().EMDictCode(code, a.cache)
|
|
}
|
|
|
|
func (a App) AnalyzeSentiment(text string) data.SentimentResult {
|
|
return data.AnalyzeSentiment(text)
|
|
}
|
|
|
|
func (a App) HotStock(marketType string) *[]models.HotItem {
|
|
return data.NewMarketNewsApi().XUEQIUHotStock(100, marketType)
|
|
}
|
|
|
|
func (a App) HotEvent(size int) *[]models.HotEvent {
|
|
if size <= 0 {
|
|
size = 10
|
|
}
|
|
return data.NewMarketNewsApi().HotEvent(size)
|
|
}
|
|
func (a App) HotTopic(size int) []any {
|
|
if size <= 0 {
|
|
size = 10
|
|
}
|
|
return data.NewMarketNewsApi().HotTopic(size)
|
|
}
|
|
|
|
func (a App) InvestCalendarTimeLine(yearMonth string) []any {
|
|
return data.NewMarketNewsApi().InvestCalendar(yearMonth)
|
|
}
|
|
func (a App) ClsCalendar() []any {
|
|
return data.NewMarketNewsApi().ClsCalendar()
|
|
}
|