feat:优化信息
This commit is contained in:
@ -20,7 +20,7 @@ type (
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
Name string `json:"name"` // 名称
|
||||
Currency float64 `json:"currency"` // 创新币
|
||||
Vip bool `json:"vip"` // Vip状态
|
||||
Vip int `json:"vip"` // Vip
|
||||
VipDays int `json:"vip_days"` // Vip剩余天数
|
||||
Identity int `json:"identity"` // 具体身份
|
||||
SelectIdentity int `json:"select_identity"` // 最后一次选中的身份信息
|
||||
@ -38,11 +38,11 @@ type (
|
||||
func (c *Instance) Info() *InstanceInfo {
|
||||
out := &InstanceInfo{Avatar: c.Avatar, Name: c.Name,
|
||||
Currency: c.Currency,
|
||||
Vip: c.VipStatus(),
|
||||
Identity: c.Identity,
|
||||
SelectIdentity: c.SelectIdentity}
|
||||
|
||||
if out.Vip {
|
||||
if c.IsVip() {
|
||||
out.Vip = c.Vip
|
||||
out.VipDays = utils.DiffTimeDays(time.Now(), c.VipDeadline)
|
||||
}
|
||||
return out
|
||||
|
Reference in New Issue
Block a user