验证数据
This commit is contained in:
@@ -8,13 +8,15 @@ import (
|
||||
)
|
||||
|
||||
var CompanyCtr = Ctr{
|
||||
"lists": func(that *Context) {
|
||||
companyName := that.Req.FormValue("company_name")
|
||||
if len(companyName) < 2 {
|
||||
|
||||
"search": func(that *Context) {
|
||||
keywords := that.Req.FormValue("keywords")
|
||||
if len(keywords) < 2 {
|
||||
that.Display(0, Slice{})
|
||||
return
|
||||
}
|
||||
res, err := aliyun.Company.GetCompanyList(companyName)
|
||||
|
||||
res, err := aliyun.Company.GetCompanyList(keywords)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
that.Display(0, Slice{})
|
||||
|
||||
Reference in New Issue
Block a user