fix: user
This commit is contained in:
parent
fe0c4ae276
commit
2a39aec3df
|
|
@ -4,13 +4,10 @@ import (
|
|||
"net/http"
|
||||
"twin-api/app/api/service"
|
||||
|
||||
"git.u8t.cn/open/go-server/session"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
sess *session.ApiSession
|
||||
}
|
||||
type User struct{}
|
||||
|
||||
func (u *User) Verify(ctx *gin.Context) {
|
||||
res := service.NewUser(ctx).Verify()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ type Button struct {
|
|||
param Params
|
||||
}
|
||||
|
||||
func New(param Params) *Button {
|
||||
func NewButton(param Params) *Button {
|
||||
return &Button{param: param}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@ func (u *User) VipCheck() *response.Response {
|
|||
|
||||
if u.params[payWayKey] == config.FirstRechargeByCoupon {
|
||||
resp.Message(u.params.Str(config.ServerCouponNotice)).
|
||||
Button(New(u.params).CouponButton()...)
|
||||
Button(NewButton(u.params).CouponButton()...)
|
||||
} else {
|
||||
resp.Button(New(u.params).PayButton()...)
|
||||
resp.Button(NewButton(u.params).PayButton()...)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ func (u *User) PkgCheck() *response.Response {
|
|||
}
|
||||
return u.resp(config.UerNoPkg, config.ServiceUserPackageLack).
|
||||
Closable(false).
|
||||
Button(New(u.params).LackButton()...)
|
||||
Button(NewButton(u.params).LackButton()...)
|
||||
}
|
||||
|
||||
// 先判断是否强制更新:expireCheck 已设置强制更新文案且不可关闭,直接返回
|
||||
|
|
@ -186,7 +186,7 @@ func (u *User) expireCheck(userPkg *model.UserPkgInfo, day int) *response.Respon
|
|||
|
||||
resp = u.resp(config.NeedUpgrade, msgKey).
|
||||
Closable(false).
|
||||
Button(New(u.params).UpgradeButton(pkg.Link)...)
|
||||
Button(NewButton(u.params).UpgradeButton(pkg.Link)...)
|
||||
}
|
||||
|
||||
return resp
|
||||
|
|
|
|||
Loading…
Reference in New Issue