验证数据

This commit is contained in:
hoteas
2022-05-03 15:17:27 +08:00
parent 58da542533
commit 7d36ad95a7
26 changed files with 106 additions and 1828 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ var Salesman = Ctr{
that.Display(0, 1)
},
"info": func(that *Context) {
if that.Session("salesman_id").Data != nil {
if that.Session("salesman_id").Data == nil {
that.Display(2, "没有登录")
return
}
@@ -35,7 +35,7 @@ var Salesman = Ctr{
},
"search": func(that *Context) {
if that.Session("salesman_id").Data != nil {
if that.Session("salesman_id").Data == nil {
that.Display(2, "没有登录")
return
}
@@ -92,7 +92,7 @@ var Salesman = Ctr{
code := that.Req.FormValue("code")
phone := that.Req.FormValue("phone")
if phone != that.Session("phone").ToStr() && code != that.Session("code").ToStr() {
if phone != that.Session("phone").ToStr() && code == that.Session("code").ToStr() {
that.Display(3, "手机号或者验证码错误")
return
}