mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
feat(hk):更新港股数据支持并添加新功能
- 更新 README.md,添加 ETF 和美股支持计划 - 修改 stock.vue,增加弹幕相关图标和功能 - 更新 stock_data_api.go,添加股票价格时间信息 - 修改 stock_data_api_test.go,更新测试用例
This commit is contained in:
parent
fbb8b00315
commit
7952c1fceb
16
README.md
16
README.md
@ -27,17 +27,19 @@
|
|||||||
- 欢迎大家提出宝贵的建议,欢迎提issue,PR。当然更欢迎[赞助我](#都划到这了如果我的项目对您有帮助请赞助我吧)。💕
|
- 欢迎大家提出宝贵的建议,欢迎提issue,PR。当然更欢迎[赞助我](#都划到这了如果我的项目对您有帮助请赞助我吧)。💕
|
||||||
|
|
||||||
|
|
||||||
## 🧩 功能开发计划
|
## 🧩 重大功能开发计划
|
||||||
| 功能说明 | 状态 | 备注 |
|
| 功能说明 | 状态 | 备注 |
|
||||||
|-----------------|----|---------------------------------------------------------------------------------------------------------|
|
|-----------------|----|--------------------------------------------------------------------------------------------------------|
|
||||||
| 港股支持 | ✅ | 港股数据支持 |
|
| ETF支持 | 🚧 | ETF数据支持 |
|
||||||
| 多轮对话 | ✅ | AI分析后可继续对话提问 |
|
| 美股支持 | 🚧 | 美股数据支持 |
|
||||||
|
| 港股支持 | ✅ | 港股数据支持 |
|
||||||
|
| 多轮对话 | ✅ | AI分析后可继续对话提问 |
|
||||||
| 自定义AI分析提问模板 | ✅ | 可配置的提问模板 [v2025.2.12.7-alpha](https://github.com/ArvinLovegood/go-stock/releases/tag/v2025.2.12.7-alpha) |
|
| 自定义AI分析提问模板 | ✅ | 可配置的提问模板 [v2025.2.12.7-alpha](https://github.com/ArvinLovegood/go-stock/releases/tag/v2025.2.12.7-alpha) |
|
||||||
| 不再强制依赖Chrome浏览器 | ✅ | 默认使用edge浏览器抓取新闻资讯 |
|
| 不再强制依赖Chrome浏览器 | ✅ | 默认使用edge浏览器抓取新闻资讯 |
|
||||||
|
|
||||||
## 👀 更新日志
|
## 👀 更新日志
|
||||||
### 2025.02.23 弹幕功能,盯盘不再孤单,无聊划个水!😎
|
### 2025.02.23 弹幕功能,盯盘不再孤单,无聊划个水!😎
|
||||||
### 2025.02.22 港股数据支持
|
### 2025.02.22 港股数据支持(目前有延迟)
|
||||||
|
|
||||||
### 2025.02.16 AI分析后可继续对话提问
|
### 2025.02.16 AI分析后可继续对话提问
|
||||||
- [v2025.2.16.1-alpha](https://github.com/ArvinLovegood/go-stock/releases/tag/v2025.2.16.1-alpha)
|
- [v2025.2.16.1-alpha](https://github.com/ArvinLovegood/go-stock/releases/tag/v2025.2.16.1-alpha)
|
||||||
|
@ -620,6 +620,7 @@ func getHKStockPriceInfo(stockCode string, crawlTimeOut int64) *[]string {
|
|||||||
}
|
}
|
||||||
stockName := ""
|
stockName := ""
|
||||||
stockPrice := ""
|
stockPrice := ""
|
||||||
|
stockPriceTime := ""
|
||||||
document.Find("#stock_cname").Each(func(i int, selection *goquery.Selection) {
|
document.Find("#stock_cname").Each(func(i int, selection *goquery.Selection) {
|
||||||
stockName = strutil.RemoveNonPrintable(selection.Text())
|
stockName = strutil.RemoveNonPrintable(selection.Text())
|
||||||
logger.SugaredLogger.Infof("股票名称-:%s", stockName)
|
logger.SugaredLogger.Infof("股票名称-:%s", stockName)
|
||||||
@ -627,10 +628,16 @@ func getHKStockPriceInfo(stockCode string, crawlTimeOut int64) *[]string {
|
|||||||
|
|
||||||
document.Find("#mts_stock_hk_price").Each(func(i int, selection *goquery.Selection) {
|
document.Find("#mts_stock_hk_price").Each(func(i int, selection *goquery.Selection) {
|
||||||
stockPrice = strutil.RemoveNonPrintable(selection.Text())
|
stockPrice = strutil.RemoveNonPrintable(selection.Text())
|
||||||
logger.SugaredLogger.Infof("股票名称-现价: %s", stockPrice)
|
logger.SugaredLogger.Infof("现价: %s", stockPrice)
|
||||||
})
|
})
|
||||||
|
|
||||||
messages = append(messages, fmt.Sprintf("%s现价%s", stockName, stockPrice))
|
document.Find("#mts_stock_hk_time").Each(func(i int, selection *goquery.Selection) {
|
||||||
|
stockPriceTime = strutil.RemoveNonPrintable(selection.Text())
|
||||||
|
logger.SugaredLogger.Infof("时间: %s", stockPriceTime)
|
||||||
|
})
|
||||||
|
|
||||||
|
messages = append(messages, fmt.Sprintf("%s:%s现价%s", stockPriceTime, stockName, stockPrice))
|
||||||
|
logger.SugaredLogger.Infof("股票: %s", messages)
|
||||||
|
|
||||||
document.Find(".deta_hqContainer >.deta03 li").Each(func(i int, selection *goquery.Selection) {
|
document.Find(".deta_hqContainer >.deta03 li").Each(func(i int, selection *goquery.Selection) {
|
||||||
text := strutil.RemoveNonPrintable(selection.Text())
|
text := strutil.RemoveNonPrintable(selection.Text())
|
||||||
|
@ -43,7 +43,7 @@ func TestSearchStockInfoByCode(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSearchStockPriceInfo(t *testing.T) {
|
func TestSearchStockPriceInfo(t *testing.T) {
|
||||||
SearchStockPriceInfo("hk00927", 30)
|
SearchStockPriceInfo("hk06030", 30)
|
||||||
//SearchStockPriceInfo("sh600859", 30)
|
//SearchStockPriceInfo("sh600859", 30)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,15 @@ import {
|
|||||||
useNotification
|
useNotification
|
||||||
} from 'naive-ui'
|
} from 'naive-ui'
|
||||||
import {EventsEmit, EventsOn, WindowFullscreen, WindowReload, WindowUnfullscreen} from '../../wailsjs/runtime'
|
import {EventsEmit, EventsOn, WindowFullscreen, WindowReload, WindowUnfullscreen} from '../../wailsjs/runtime'
|
||||||
import {Add, BalloonOutline} from '@vicons/ionicons5'
|
import {
|
||||||
|
Add,
|
||||||
|
Balloon,
|
||||||
|
BalloonOutline, ChatboxOutline, ChatbubbleEllipses,
|
||||||
|
ChatbubbleEllipsesOutline,
|
||||||
|
ChatbubbleOutline,
|
||||||
|
Chatbubbles,
|
||||||
|
ChatbubblesSharp
|
||||||
|
} from '@vicons/ionicons5'
|
||||||
import {MdPreview,MdEditor } from 'md-editor-v3';
|
import {MdPreview,MdEditor } from 'md-editor-v3';
|
||||||
// preview.css相比style.css少了编辑器那部分样式
|
// preview.css相比style.css少了编辑器那部分样式
|
||||||
//import 'md-editor-v3/lib/preview.css';
|
//import 'md-editor-v3/lib/preview.css';
|
||||||
@ -148,6 +156,7 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
// 创建 WebSocket 连接
|
// 创建 WebSocket 连接
|
||||||
ws.value = new WebSocket('ws://8.134.249.145:16688/ws'); // 替换为你的 WebSocket 服务器地址
|
ws.value = new WebSocket('ws://8.134.249.145:16688/ws'); // 替换为你的 WebSocket 服务器地址
|
||||||
|
//ws.value = new WebSocket('ws://localhost:16688/ws'); // 替换为你的 WebSocket 服务器地址
|
||||||
|
|
||||||
ws.value.onopen = () => {
|
ws.value.onopen = () => {
|
||||||
console.log('WebSocket 连接已打开');
|
console.log('WebSocket 连接已打开');
|
||||||
@ -797,8 +806,8 @@ AI赋能股票分析:自选股行情获取,成本盈亏展示,涨跌报警
|
|||||||
<n-button type="primary" @click="AddStock" v-if="addBTN">
|
<n-button type="primary" @click="AddStock" v-if="addBTN">
|
||||||
<n-icon :component="Add"/> 关注该股票
|
<n-icon :component="Add"/> 关注该股票
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button type="info" @click="SendDanmu">
|
<n-button type="error" @click="SendDanmu">
|
||||||
<n-icon :component="BalloonOutline"/> 发送弹幕
|
<n-icon :component="ChatboxOutline"/> 发送弹幕
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
<!-- </n-card>-->
|
<!-- </n-card>-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user