Skip to content

Commit 25594d6

Browse files
v0.5.3:fix some bugs
1 parent d782af3 commit 25594d6

7 files changed

Lines changed: 12 additions & 6 deletions

File tree

UpdateRecord.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### version: 0.5.3 (2025年2月7日22:47:17)
2+
1. 优化了历史k线保存的逻辑。
3+
2. 修复了有夜盘数据的期货的日线图不绘制最新数据的问题。
4+
15
### version: 0.5.2 (2025年2月7日01:20:52)
26
1. 优化了历史k线保存的逻辑。
37
2. 优化了应用的启动过程。

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trade_tip"
3-
version = "0.5.2"
3+
version = "0.5.3"
44
description = "金融助手"
55
authors = ["xbss"]
66
edition = "2021"

src-tauri/src/service/curd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub async fn update_all_day_k(can_handle_futures:bool,second:bool) -> AppResult<
4646
"{}最新的日期是{:?},距今天的天数是{:?}",
4747
code, latest_data.date, num
4848
);
49-
if num > 1 {
49+
if num >= 1 {
5050
//这边的data很有可能多了,因为有很多非交易日,所以需要过滤
5151
//这里要多请求一天。以数据库中最新数据是15号为例,若在17号晚上更新,计算出的num是两天,然后请求出来的是16、17号的数据,
5252
//导致在find(|&(_, x)| x.date == latest_data.date)时找不到匹配的元素,后面都无法更新。

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"productName": "金融助手",
3-
"version": "0.5.2",
3+
"version": "0.5.3",
44
"identifier": "com.xbss.trade-tip",
55
"build": {
66
"beforeDevCommand": "pnpm dev",

src/components/Header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function back(){
132132

133133
<template>
134134
<div data-tauri-drag-region class="titlebar" >
135-
<el-tooltip content="v0.5.2" placement="bottom" effect="light" :show-arrow="false">
135+
<el-tooltip content="v0.5.3" placement="bottom" effect="light" :show-arrow="false">
136136
<img src="../assets/icon.png" width="25" height="25" alt="Logo Image" style="margin-left: 5px;margin-right: 10px;user-select: none">
137137
</el-tooltip>
138138
<!-- <img src="../assets/icon.png" width="25" height="25" alt="Logo Image" style="margin-left: 5px;margin-right: 10px;user-select: none">-->

src/components/NewNewCandleChart.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,9 @@ const tolerance = 1e-6; // 或者更大的容差值
684684
async function query_stocks_day_k_limit(){
685685
const data = await invoke<StockData[]>('query_stocks_day_k_limit', { code: code });
686686
console.log(data);
687-
if (data[0].date !== nowDate) {
687+
// if (data[0].date !== nowDate) {
688+
//todo 这样写太那啥了,后面再改改
689+
if (true) {//v0.5.3由于期货有夜盘,所以不能判断日期是否一致,否则不会绘制最新数据的K线图
688690
try{
689691
const liveData = await invoke<StockLiveData>('query_live_stock_data_by_code', { code: code });
690692
store.stockinfoG.live_data = liveData;

0 commit comments

Comments
 (0)