验证数据
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user