验证数据
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CompanyCtr = Ctr{
|
||||
"info": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -39,7 +39,7 @@ var CompanyCtr = Ctr{
|
||||
that.Display(0, res)
|
||||
},
|
||||
"edit": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -8,7 +8,12 @@ import (
|
||||
|
||||
// Project 管理端项目
|
||||
var Project = Proj{
|
||||
"company": CompanyCtr,
|
||||
"matters": MattersCtr,
|
||||
"order": OrderCtr,
|
||||
"salesman": Salesman,
|
||||
"sms": Sms,
|
||||
"user": UserCtr,
|
||||
"wechat": Wechat,
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var MattersCtr = Ctr{
|
||||
|
||||
"info": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -39,7 +39,7 @@ var MattersCtr = Ctr{
|
||||
|
||||
//用户微信公众号或者小程序登录
|
||||
"search": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var OrderCtr = Ctr{
|
||||
"info": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -39,7 +39,7 @@ var OrderCtr = Ctr{
|
||||
that.Display(0, res)
|
||||
},
|
||||
"create_order_record": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -87,7 +87,7 @@ var OrderCtr = Ctr{
|
||||
},
|
||||
"edit": func(that *Context) {
|
||||
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -160,7 +160,7 @@ var OrderCtr = Ctr{
|
||||
//用户微信公众号或者小程序登录
|
||||
"search": func(that *Context) {
|
||||
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
var UserCtr = Ctr{
|
||||
//用户微信公众号或者小程序登录
|
||||
"info": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -32,7 +32,7 @@ var UserCtr = Ctr{
|
||||
|
||||
"edit": func(that *Context) {
|
||||
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
@@ -85,7 +85,7 @@ var UserCtr = Ctr{
|
||||
},
|
||||
|
||||
"search": func(that *Context) {
|
||||
if that.Session("salesman_id").Data != nil {
|
||||
if that.Session("salesman_id").Data == nil {
|
||||
that.Display(2, "没有登录")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user