科创地图打包

This commit is contained in:
hoteas 2022-04-29 03:08:32 +08:00
parent 2aa86361e1
commit 31a6568cbe
4 changed files with 31 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import (
// Project 管理端项目
var Project = Proj{
"lxcx": Lxcx,
"wechat": Wechat,
"websocket": WebsocketCtr,
}

30
example/app/lxcx.go Normal file
View File

@ -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)))
},
}

Binary file not shown.

Binary file not shown.