diff --git a/example/app/init.go b/example/app/init.go index 628f570..8a929a4 100644 --- a/example/app/init.go +++ b/example/app/init.go @@ -15,6 +15,7 @@ import ( // Project 管理端项目 var Project = Proj{ + "lxcx": Lxcx, "wechat": Wechat, "websocket": WebsocketCtr, } diff --git a/example/app/lxcx.go b/example/app/lxcx.go new file mode 100644 index 0000000..ca10987 --- /dev/null +++ b/example/app/lxcx.go @@ -0,0 +1,30 @@ +package app + +import ( + . "code.hoteas.com/golang/hotime" + "code.hoteas.com/golang/hotime/common" + "io/ioutil" + "log" + "net/http" + "net/url" +) + +var Lxcx = Ctr{ + "lists": func(that *Context) { + urlStr := "https://www.ruichuangshe.com/Resources/Services/sAppInterface.ashx?type=policyprojectbycompanyname&page=1&pagesize=10&code=8eb68adf79d660e57ccd69ea4bf340162e29e43ec344df62b364bd65b886da7fca9fb995ad93a5b485d66fd268f946f34cf0&CompanyName=" + companyName := that.Req.FormValue("company") + companyName = url.QueryEscape(url.QueryEscape(companyName)) + + resp, err := http.Get(urlStr + companyName) + if err != nil { + log.Println("err") + } + defer resp.Body.Close() + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + log.Println("err") + } + that.Display(0, common.ObjToMap(string(b))) + + }, +} diff --git a/example/zct_manage.exe b/example/zct_manage.exe deleted file mode 100644 index 5836163..0000000 Binary files a/example/zct_manage.exe and /dev/null differ diff --git a/example/zct_wechat.exe b/example/zct_wechat.exe deleted file mode 100644 index ae1ac68..0000000 Binary files a/example/zct_wechat.exe and /dev/null differ