Browse Source

fix:bug

token_replace
黄梓健 4 years ago
parent
commit
63127b2b40
  1. 3
      controllers/client/login.go

3
controllers/client/login.go

@ -161,7 +161,6 @@ func (t *UserCtl) WxLogin() {
}
func (t *UserCtl) Login() {
activityId := t.MustGetInt("activity_id")
wxcode := t.MustGet("code")
user := new(models.User)
@ -177,6 +176,7 @@ func (t *UserCtl) Login() {
area := &models.AreaStore{}
admin := 0
if activityId, ok := t.GetInt("activity_id"); ok && activityId != 0 {
if username, ok := t.Get("username"); ok && username != "" {
username := t.MustGet("username")
password := t.MustGet("password")
@ -196,6 +196,7 @@ func (t *UserCtl) Login() {
admin = 1
}
}
}
jwtToken, err := jwt.GenJwtToken(define.TYPE_H5USER, user.Id, 0, 0, 0, 0)
t.CheckErr(err)

Loading…
Cancel
Save