增加限制条件

This commit is contained in:
hoteas
2022-05-06 11:35:40 +08:00
parent aea2e0241d
commit 4cbc84063a
7 changed files with 87 additions and 48 deletions
+7
View File
@@ -2,6 +2,7 @@ package provider
import (
. "code.hoteas.com/golang/hotime"
"code.hoteas.com/golang/hotime/common"
"code.hoteas.com/golang/hotime/dri/ddsms"
)
@@ -20,6 +21,12 @@ var Sms = Ctr{
return
}
salesman := that.Db.Get("salesman", "id", common.Map{"phone": phone})
if salesman == nil {
that.Display(3, "你还不是企服人员,请联系管理员")
return
}
code := getCode()
that.Session("phone", phone)
that.Session("code", code)