feat: 个人中心发布

This commit is contained in:
Blizzard
2026-02-14 11:38:59 +08:00
parent f1d9f63296
commit 4820323381
35 changed files with 691 additions and 148 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import (
// GetMiniAccessToken 获取小程序的access_token
func GetMiniAccessToken() string {
ak, err := global.Redis.Get(context.Background(), "mini_access_token").Result()
ak, err := global.Redis.Get(context.Background(), "zeeq_mini_access_token").Result()
if errors.Is(err, redis.Nil) {
// 从微信服务器获取
//重新从微信服务器获取
@@ -44,7 +44,7 @@ func GetMiniAccessToken() string {
}
ak = data["access_token"].(string)
ex := data["expires_in"].(float64)
global.Redis.Set(context.Background(), "mini_access_token", ak, time.Duration(ex)*time.Second) //秒
global.Redis.Set(context.Background(), "zeeq_mini_access_token", ak, time.Duration(ex)*time.Second) //秒
} else if err != nil {
log.Fatalf("Error getting access token from Redis: %s", err)
}