feat:完善信息,增加socket
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/handle"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/config"
|
||||
"SciencesServer/utils"
|
||||
"errors"
|
||||
"time"
|
||||
@ -36,11 +37,13 @@ type (
|
||||
|
||||
// Info 基本信息
|
||||
func (c *Instance) Info() *InstanceInfo {
|
||||
out := &InstanceInfo{Avatar: c.Avatar, Name: c.Name,
|
||||
out := &InstanceInfo{
|
||||
Name: c.Name,
|
||||
Avatar: (&model2.UserInstance{Avatar: c.Avatar}).GetAvatarAttribute(config.SystemConfig[config.SysImageDomain]),
|
||||
Currency: c.Currency,
|
||||
Identity: c.Identity,
|
||||
SelectIdentity: c.SelectIdentity}
|
||||
|
||||
SelectIdentity: c.SelectIdentity,
|
||||
}
|
||||
if c.IsVip() {
|
||||
out.Vip = c.Vip
|
||||
out.VipDays = utils.DiffTimeDays(time.Now(), c.VipDeadline)
|
||||
|
Reference in New Issue
Block a user