feat(frontend): 添加支付宝和微信支付二维码

- 在 about.vue 中添加了支付宝和微信支付的二维码图片
- 在 VersionInfo 模型中增加了 Alipay 和 Wxpay 字段
- 更新了后端和前端的相关代码,支持支付二维码的获取和显示
- 在 stock.vue 中添加了 AI 分析结果的免责声明
This commit is contained in:
spark 2025-02-12 10:51:24 +08:00
parent e2e5a063e7
commit e074ab2c39
6 changed files with 25 additions and 1 deletions

2
app.go
View File

@ -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,
}
}

View File

@ -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"`
}

View File

@ -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;
});
})
</script>
@ -50,6 +54,11 @@ onMounted(() => {
邮箱<a href="mailto:sparkmemory@163.com">sparkmemory@163.com</a><n-divider vertical />
QQ 506808970<n-divider vertical />
微信ArvinLovegood</p><n-divider vertical />
<p>开源不易如果觉得好用可以请作者喝杯咖啡</p>
<n-flex justify="center">
<n-image width="200" :src="alipay" />
<n-image width="200" :src="wxpay" />
</n-flex>
</n-space>
<n-divider title-placement="center">鸣谢</n-divider>
<div style="justify-self: center;text-align: left" >

View File

@ -742,7 +742,8 @@ function saveAsMarkdown() {
</template>
<template #footer>
<n-flex justify="space-between">
<n-text type="error" v-if="data.time" >分析时间:{{data.time}}</n-text>
<n-text type="info" v-if="data.time" >分析时间:{{data.time}}</n-text>
<n-text type="error" v-if="data.time" >*AI分析结果仅供参考请以实际行情为准投资需谨慎风险自担</n-text>
</n-flex>
</template>
<template #action>

View File

@ -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"];
}

View File

@ -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