|
|
@ -176,9 +176,9 @@ func (t *UserCtl) Login() { |
|
|
|
area := &models.AreaStore{} |
|
|
|
exist, err = models.Get(area, areaId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区被删除,链接失效") |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "此直播间已被删除") |
|
|
|
if activity.MoreAreaMode == define.StatusClose && area.IsMainArea != 1 { |
|
|
|
t.ERROR("多地区功能关闭,链接失效,请打开后再试", code.MSG_AREASTORE_NOT_EXIST) |
|
|
|
t.ERROR("多地区功能关闭,链接失效,请打开后再试", code.MSG_AREASTORE_CLOSED) |
|
|
|
} |
|
|
|
|
|
|
|
token, err := wechat.GetToken(wxcode) |
|
|
@ -215,7 +215,7 @@ func (t *UserCtl) Login() { |
|
|
|
password := t.MustGet("password") |
|
|
|
exist, err := area.Login(activityId, username, password) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_ERR_Authority, "不存在地区管理员") |
|
|
|
t.Assert(exist, code.MSG_ERR_LOGIN_ERR, "不存在地区管理员") |
|
|
|
if area.UserId != user.Id { |
|
|
|
area.UserId = user.Id |
|
|
|
_, err = models.Update(area.Id, area, "user_id") |
|
|
|