修复登录bug

This commit is contained in:
hoteas 2022-08-11 10:41:35 +08:00
parent 8992fd6d3a
commit 8afd00ff86

View File

@ -675,11 +675,15 @@ var TptProject = Proj{
where := Map{"name": name} where := Map{"name": name}
if that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")]["phone"] != nil { if that.MakeCodeRouter[hotimeName].TableColumns[fileConfig.GetString("table")]["phone"] != nil {
where["phone"] = name where["phone"] = name
where = Map{"AND": Map{"OR": where, "password": Md5(password)}} where = Map{"OR": where, "password": Md5(password)}
} else { } else {
where["password"] = Md5(password) where["password"] = Md5(password)
} }
if len(where) > 1 {
where = Map{"AND": where}
}
user := that.Db.Get(fileConfig.GetString("table"), "*", where) user := that.Db.Get(fileConfig.GetString("table"), "*", where)
if user == nil { if user == nil {