feat: add rand images

This commit is contained in:
Rogee
2025-05-07 17:24:59 +08:00
parent 2b10f0b595
commit e923f8c7c5
81 changed files with 32 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
package http
import (
"fmt"
"math/rand"
"net/url"
"time"
@@ -53,7 +55,7 @@ func (ctl *auth) Login(ctx fiber.Ctx, code, state, redirect string) error {
authUserInfo = &wechat.AuthorizeUserInfo{
City: "",
Country: "",
Headimgurl: "/avatar.jpeg",
Headimgurl: fmt.Sprintf("/avatar/%d.jpeg", 1+rand.Intn(79)),
Nickname: "暂未设置昵称",
Openid: token.Openid,
Privilege: []string{},