fix: offline

master
howell 4 years ago
parent 3e7e3d5102
commit 38fb3060f0

@ -42,6 +42,7 @@ type MyInfoResp struct {
Identifier string `json:"identifier"` //编号
Secret uint `json:"secret"`
Level int `json:"level"`
IsOffline bool `json:"is_offline"`
}
type Notify struct {
@ -206,6 +207,7 @@ func MyInfo(c *gin.Context) {
Identifier: userInfo.Identifier,
Secret: userInfo.Secret,
Level: userInfo.Level,
IsOffline: userInfo.IsOffline,
}
back.Suc(c, "操作成功", &res)
return

@ -48,6 +48,7 @@ type Information struct {
UpgradeTime2 formatime.Second `json:"upgrade_time2"`
RootID uint `json:"root_id"`
LoginApp bool `json:"login_app"`
IsOffline bool `json:"is_offline"`
}
const (

@ -64,7 +64,7 @@ func (o logic) Create(args ApplyCreate) error {
return errors.New("无法发起云体店申请")
}
if args.Kind == 2 && (u1.Level != 10 || u1.IsOffline) {
if args.Kind == 2 && (u1.Level != 10 && !u1.IsOffline) {
return errors.New("无法发起实体店申请")
}

Loading…
Cancel
Save