From db53e536f1d65c1dd360fb69dc96be857f39f67c Mon Sep 17 00:00:00 2001 From: Tooooommy Date: Wed, 30 Sep 2020 14:14:53 +0800 Subject: [PATCH] fix:bug --- controllers/client/login.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/controllers/client/login.go b/controllers/client/login.go index 0c80113..29c91cf 100644 --- a/controllers/client/login.go +++ b/controllers/client/login.go @@ -33,15 +33,19 @@ func (t *UserCtl) EntryLogin() { t.CheckErr(err) t.Assert(exist, code.MSG_ENTRYPEOPLE_NOT_EXIST, "录入人员不存在") + activity := new(models.Activity) + exist, err = activity.Get(activity, activityId) + t.CheckErr(err) + t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") + area := new(models.AreaStore) exist, err = area.Get(area, entry.AreaId) t.CheckErr(err) t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区不存在") - activity := new(models.Activity) - exist, err = activity.Get(activity, activityId) - t.CheckErr(err) - t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") + if activity.MoreAreaMode == define.StatusClose && area.IsMainArea != 1 { + t.ERROR("用户密码不存在", code.MSG_ERR_LOGIN_ERR) + } customer := new(models.Customer) exist, err = customer.Get(customer, entry.Pid)