feat(sponsor):添加新的赞助计划并实现赞助码验证功能

- 在 about.vue 和 README.md 中添加新的 VIP2 赞助计划
- 在 App.d.ts 和 App.js 中添加 CheckSponsorCode函数
- 在 app.go 中实现 CheckSponsorCode 方法,用于验证赞助码
- 在 settings.vue 中集成赞助码验证功能,更新配置时进行验证
- 优化赞助码输入界面,添加验证按钮
This commit is contained in:
ArvinLovegood 2025-07-09 18:11:53 +08:00
parent 7887dfed5e
commit 2b28390414

7
app.go
View File

@ -223,9 +223,10 @@ func (a *App) CheckUpdate() {
logger.SugaredLogger.Error(err.Error())
return
}
isVip := false
if time.Now().After(vipStartTime) && time.Now().Before(vipEndTime) {
vipAuthTime, err := time.ParseInLocation("2006-01-02 15:04:05", a.SponsorInfo["vipAuthTime"].(string), time.Local)
if time.Now().After(vipAuthTime) && time.Now().After(vipStartTime) && time.Now().Before(vipEndTime) {
isVip = true
}
@ -275,7 +276,7 @@ func (a *App) CheckUpdate() {
"time": "新版本:" + releaseVersion.TagName,
"isRed": true,
"source": "go-stock",
"content": "新版本下载失败,请前往 https://github.com/ArvinLovegood/go-stock/releases 手动下载替换文件。",
"content": "新版本下载失败,请稍后重试或请前往 https://github.com/ArvinLovegood/go-stock/releases 手动下载替换文件。",
})
return
}