From e074ab2c3970bfa03d0af13476c81df44380327d Mon Sep 17 00:00:00 2001
From: spark
Date: Wed, 12 Feb 2025 10:51:24 +0800
Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=B7=BB=E5=8A=A0=E6=94=AF?=
=?UTF-8?q?=E4=BB=98=E5=AE=9D=E5=92=8C=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?=
=?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在 about.vue 中添加了支付宝和微信支付的二维码图片
- 在 VersionInfo 模型中增加了 Alipay 和 Wxpay 字段
- 更新了后端和前端的相关代码,支持支付二维码的获取和显示
- 在 stock.vue 中添加了 AI 分析结果的免责声明
---
app.go | 2 ++
backend/models/models.go | 2 ++
frontend/src/components/about.vue | 9 +++++++++
frontend/src/components/stock.vue | 3 ++-
frontend/wailsjs/go/models.ts | 4 ++++
main.go | 6 ++++++
6 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/app.go b/app.go
index cd69183..0afa94b 100644
--- a/app.go
+++ b/app.go
@@ -456,6 +456,8 @@ func (a *App) GetVersionInfo() *models.VersionInfo {
return &models.VersionInfo{
Version: Version,
Icon: GetImageBase(icon),
+ Alipay: GetImageBase(alipay),
+ Wxpay: GetImageBase(wxpay),
Content: VersionCommit,
}
}
diff --git a/backend/models/models.go b/backend/models/models.go
index d547d63..3c84710 100644
--- a/backend/models/models.go
+++ b/backend/models/models.go
@@ -150,6 +150,8 @@ type VersionInfo struct {
Version string `json:"version"`
Content string `json:"content"`
Icon string `json:"icon"`
+ Alipay string `json:"alipay"`
+ Wxpay string `json:"wxpay"`
BuildTimeStamp int64 `json:"buildTimeStamp"`
IsDel soft_delete.DeletedAt `gorm:"softDelete:flag"`
}
diff --git a/frontend/src/components/about.vue b/frontend/src/components/about.vue
index ea7af5d..9a05bb8 100644
--- a/frontend/src/components/about.vue
+++ b/frontend/src/components/about.vue
@@ -7,12 +7,16 @@ import {GetVersionInfo} from "../../wailsjs/go/main/App";
const updateLog = ref('');
const versionInfo = ref('');
const icon = ref('https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png');
+const alipay =ref('https://github.com/ArvinLovegood/go-stock/raw/master/build/screenshot/alipay.jpg')
+const wxpay =ref('https://github.com/ArvinLovegood/go-stock/raw/master/build/screenshot/wxpay.jpg')
onMounted(() => {
document.title = '关于软件';
GetVersionInfo().then((res) => {
updateLog.value = res.content;
versionInfo.value = res.version;
icon.value = res.icon;
+ alipay.value=res.alipay;
+ wxpay.value=res.wxpay;
});
})
@@ -50,6 +54,11 @@ onMounted(() => {
邮箱:sparkmemory@163.com
QQ: 506808970
微信:ArvinLovegood
+ 开源不易,如果觉得好用,可以请作者喝杯咖啡。
+
+
+
+
鸣谢
diff --git a/frontend/src/components/stock.vue b/frontend/src/components/stock.vue
index 41ca2eb..5dab2f4 100644
--- a/frontend/src/components/stock.vue
+++ b/frontend/src/components/stock.vue
@@ -742,7 +742,8 @@ function saveAsMarkdown() {
- 分析时间:{{data.time}}
+ 分析时间:{{data.time}}
+ *AI分析结果仅供参考,请以实际行情为准。投资需谨慎,风险自担。
diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts
index c0689d6..fdb7d03 100644
--- a/frontend/wailsjs/go/models.ts
+++ b/frontend/wailsjs/go/models.ts
@@ -389,6 +389,8 @@ export namespace models {
version: string;
content: string;
icon: string;
+ alipay: string;
+ wxpay: string;
buildTimeStamp: number;
IsDel: number;
@@ -405,6 +407,8 @@ export namespace models {
this.version = source["version"];
this.content = source["content"];
this.icon = source["icon"];
+ this.alipay = source["alipay"];
+ this.wxpay = source["wxpay"];
this.buildTimeStamp = source["buildTimeStamp"];
this.IsDel = source["IsDel"];
}
diff --git a/main.go b/main.go
index 4740804..10c063e 100644
--- a/main.go
+++ b/main.go
@@ -32,6 +32,12 @@ var icon []byte
//go:embed build/app.ico
var icon2 []byte
+//go:embed build/screenshot/alipay.jpg
+var alipay []byte
+
+//go:embed build/screenshot/wxpay.jpg
+var wxpay []byte
+
//go:embed build/stock_basic.json
var stocksBin []byte