@@ -5,7 +5,9 @@ import ( | |||
"applet/app/e" | |||
"applet/app/md" | |||
"applet/app/utils" | |||
"applet/app/utils/cache" | |||
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" | |||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/svc" | |||
"github.com/gin-gonic/gin" | |||
) | |||
@@ -44,6 +46,9 @@ func GetModuleSetting(c *gin.Context) { | |||
return | |||
} | |||
var dataMap map[string]interface{} | |||
redisConn := cache.GetPool().Get() | |||
scheme, domain := svc.ImageBucket(db.Db, redisConn) | |||
moduleStyle.Data = svc.ImageFormatWithBucketNew(scheme, domain, moduleStyle.Data) | |||
utils.Unserialize([]byte(moduleStyle.Data), &dataMap) | |||
resp := md.GetModuleSettingResp{ | |||
ModName: moduleStyle.ModName, | |||
@@ -5,10 +5,12 @@ import ( | |||
"applet/app/e" | |||
"applet/app/md" | |||
"applet/app/utils" | |||
"applet/app/utils/cache" | |||
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" | |||
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" | |||
enum "code.fnuoos.com/EggPlanet/egg_system_rules.git/enum" | |||
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" | |||
"code.fnuoos.com/EggPlanet/egg_system_rules.git/svc" | |||
"encoding/json" | |||
"fmt" | |||
"github.com/gin-gonic/gin" | |||
@@ -659,15 +661,18 @@ func MyFansUserList(c *gin.Context) { | |||
} | |||
} | |||
redisConn := cache.GetPool().Get() | |||
scheme, domain := svc.ImageBucket(db.Db, redisConn) | |||
var data []md.OneLineUserNode | |||
for _, v := range results { | |||
isOnline := false | |||
if userSignInMap[utils.AnyToInt64(v["uid"])] != nil { | |||
isOnline = true | |||
} | |||
tempUrl := svc.ImageFormatWithBucket(scheme, domain, v["avatar_url"]) | |||
data = append(data, md.OneLineUserNode{ | |||
IsOnline: isOnline, | |||
AvatarURL: v["avatar_url"], | |||
AvatarURL: tempUrl, | |||
Nickname: v["nickname"], | |||
InviteTime: v["invite_time"], | |||
}) | |||
@@ -23,16 +23,16 @@ type HomePageWatchAdRuleResp struct { | |||
} | |||
type RealTimePriceResp struct { | |||
UserCount string `json:"user_count"` | |||
NowPrice string `json:"now_price"` | |||
IsRises bool `json:"is_rises"` | |||
Rises string `json:"rises"` | |||
UserCount string `json:"user_count"` // 用户数 | |||
NowPrice string `json:"now_price"` // 当前价格 | |||
IsRises bool `json:"is_rises"` // 是否涨/跌价 | |||
Rises string `json:"rises"` // 涨价幅度 | |||
} | |||
type IsCanSignInResp struct { | |||
IsCan bool `json:"is_can_sign_in"` | |||
IsCan bool `json:"is_can_sign_in"` // 能否签到 | |||
} | |||
type IsCanGetRedPackageResp struct { | |||
IsCan bool `json:"is_can_get_red_package"` | |||
IsCan bool `json:"is_can_get_red_package"` // 能否获取红包 | |||
} |
@@ -65,7 +65,7 @@ func route(r *gin.RouterGroup) { | |||
r.POST("/register", hdl.Register) //注册 | |||
r.POST("/login", hdl.Login) //登录 | |||
r.POST("/findPassword", hdl.FindPassword) //找回密码 | |||
r.GET("/getModuleSetting", hdl.GetModuleSetting) // 获取 | |||
r.GET("/getModuleSetting", hdl.GetModuleSetting) // 获取页面样式 | |||
r.Use(mw.Auth) // 以下接口需要JWT验证 | |||
rComm(r.Group("/comm")) | |||
r.GET("/userInfo", hdl.UserInfo) //用户基础信息 | |||
@@ -1,5 +1,4 @@ | |||
// Code generated by swaggo/swag. DO NOT EDIT. | |||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | |||
package docs | |||
import "github.com/swaggo/swag" | |||
@@ -1890,9 +1889,7 @@ const docTemplate = `{ | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"type": "object" | |||
} | |||
"schema": {} | |||
} | |||
], | |||
"responses": { | |||
@@ -3241,6 +3238,7 @@ const docTemplate = `{ | |||
"type": "object", | |||
"properties": { | |||
"is_can_get_red_package": { | |||
"description": "能否获取红包", | |||
"type": "boolean" | |||
} | |||
} | |||
@@ -3249,6 +3247,7 @@ const docTemplate = `{ | |||
"type": "object", | |||
"properties": { | |||
"is_can_sign_in": { | |||
"description": "能否签到", | |||
"type": "boolean" | |||
} | |||
} | |||
@@ -3450,15 +3449,19 @@ const docTemplate = `{ | |||
"type": "object", | |||
"properties": { | |||
"is_rises": { | |||
"description": "是否涨/跌价", | |||
"type": "boolean" | |||
}, | |||
"now_price": { | |||
"description": "当前价格", | |||
"type": "string" | |||
}, | |||
"rises": { | |||
"description": "涨价幅度", | |||
"type": "string" | |||
}, | |||
"user_count": { | |||
"description": "用户数", | |||
"type": "string" | |||
} | |||
} | |||
@@ -4022,6 +4025,8 @@ var SwaggerInfo = &swag.Spec{ | |||
Description: "APP客户端-Api接口", | |||
InfoInstanceName: "swagger", | |||
SwaggerTemplate: docTemplate, | |||
LeftDelim: "{{", | |||
RightDelim: "}}", | |||
} | |||
func init() { | |||
@@ -1883,9 +1883,7 @@ | |||
"name": "req", | |||
"in": "body", | |||
"required": true, | |||
"schema": { | |||
"type": "object" | |||
} | |||
"schema": {} | |||
} | |||
], | |||
"responses": { | |||
@@ -3234,6 +3232,7 @@ | |||
"type": "object", | |||
"properties": { | |||
"is_can_get_red_package": { | |||
"description": "能否获取红包", | |||
"type": "boolean" | |||
} | |||
} | |||
@@ -3242,6 +3241,7 @@ | |||
"type": "object", | |||
"properties": { | |||
"is_can_sign_in": { | |||
"description": "能否签到", | |||
"type": "boolean" | |||
} | |||
} | |||
@@ -3443,15 +3443,19 @@ | |||
"type": "object", | |||
"properties": { | |||
"is_rises": { | |||
"description": "是否涨/跌价", | |||
"type": "boolean" | |||
}, | |||
"now_price": { | |||
"description": "当前价格", | |||
"type": "string" | |||
}, | |||
"rises": { | |||
"description": "涨价幅度", | |||
"type": "string" | |||
}, | |||
"user_count": { | |||
"description": "用户数", | |||
"type": "string" | |||
} | |||
} | |||
@@ -638,11 +638,13 @@ definitions: | |||
md.IsCanGetRedPackageResp: | |||
properties: | |||
is_can_get_red_package: | |||
description: 能否获取红包 | |||
type: boolean | |||
type: object | |||
md.IsCanSignInResp: | |||
properties: | |||
is_can_sign_in: | |||
description: 能否签到 | |||
type: boolean | |||
type: object | |||
md.LoginReq: | |||
@@ -784,12 +786,16 @@ definitions: | |||
md.RealTimePriceResp: | |||
properties: | |||
is_rises: | |||
description: 是否涨/跌价 | |||
type: boolean | |||
now_price: | |||
description: 当前价格 | |||
type: string | |||
rises: | |||
description: 涨价幅度 | |||
type: string | |||
user_count: | |||
description: 用户数 | |||
type: string | |||
type: object | |||
md.RedPackageDetailResp: | |||
@@ -2407,8 +2413,7 @@ paths: | |||
in: body | |||
name: req | |||
required: true | |||
schema: | |||
type: object | |||
schema: {} | |||
produces: | |||
- application/json | |||
responses: | |||
@@ -33,7 +33,7 @@ require ( | |||
require ( | |||
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241126080048-3c72cf5fa2e9 | |||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241125081706-0915be3f4144 | |||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241126083327-1b1d0a2602a0 | |||
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be | |||
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | |||
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible | |||