政企超链接开始集成
This commit is contained in:
parent
e30d40cfbb
commit
7e64131931
3
code.go
3
code.go
@ -181,7 +181,8 @@ var TptProject = Proj{
|
|||||||
}
|
}
|
||||||
this.Session(hotimeName+"_id", user.GetCeilInt("id"))
|
this.Session(hotimeName+"_id", user.GetCeilInt("id"))
|
||||||
this.Session(hotimeName+"_name", name)
|
this.Session(hotimeName+"_name", name)
|
||||||
this.Display(0, this.SessionId)
|
delete(user, "password")
|
||||||
|
this.Display(0, user)
|
||||||
},
|
},
|
||||||
"logout": func(this *Context) {
|
"logout": func(this *Context) {
|
||||||
hotimeName := this.RouterString[0]
|
hotimeName := this.RouterString[0]
|
||||||
|
@ -374,23 +374,23 @@ var analyseCtr = Ctr{
|
|||||||
res["upload_data"] = res.GetMap("upload_data")
|
res["upload_data"] = res.GetMap("upload_data")
|
||||||
res["collect_data"] = res.GetMap("collect_data")
|
res["collect_data"] = res.GetMap("collect_data")
|
||||||
res["collect_data"] = res.GetMap("collect_data")
|
res["collect_data"] = res.GetMap("collect_data")
|
||||||
if res.GetMap("collect_data") == nil && page == 1 {
|
//if res.GetMap("collect_data") == nil && page == 1 {
|
||||||
go func(res Map, this *Context) {
|
// go func(res Map, this *Context) {
|
||||||
path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
// path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
||||||
|
//
|
||||||
data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
// data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
||||||
|
//
|
||||||
if len(data) != 0 {
|
// if len(data) != 0 {
|
||||||
data["path"] = path
|
// data["path"] = path
|
||||||
this.Db.Update("company", Map{"collect_data": data.ToJsonString(),
|
// this.Db.Update("company", Map{"collect_data": data.ToJsonString(),
|
||||||
"address": data.GetString("companyAddress"),
|
// "address": data.GetString("companyAddress"),
|
||||||
"sn": data.GetString("creditNo"),
|
// "sn": data.GetString("creditNo"),
|
||||||
"unit": data.GetString("authority"),
|
// "unit": data.GetString("authority"),
|
||||||
}, Map{"id": res.GetCeilInt("id")})
|
// }, Map{"id": res.GetCeilInt("id")})
|
||||||
res["collect_data"] = data
|
// res["collect_data"] = data
|
||||||
}
|
// }
|
||||||
}(res, this)
|
// }(res, this)
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,6 +432,7 @@ var analyseCtr = Ctr{
|
|||||||
res["upload_data"] = res.GetMap("upload_data")
|
res["upload_data"] = res.GetMap("upload_data")
|
||||||
res["collect_data"] = res.GetMap("collect_data")
|
res["collect_data"] = res.GetMap("collect_data")
|
||||||
if res.GetMap("collect_data") == nil {
|
if res.GetMap("collect_data") == nil {
|
||||||
|
go func(res Map) {
|
||||||
path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
path := "company/" + Md5(res.GetString("name")) + time.Now().Format("/200601021504.json")
|
||||||
|
|
||||||
data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
data := getCompany(res.GetString("name"), this.Config.GetString("tpt")+"/"+path)
|
||||||
@ -441,6 +442,9 @@ var analyseCtr = Ctr{
|
|||||||
this.Db.Update("company", Map{"collect_data": data.ToJsonString()}, Map{"id": res.GetCeilInt("id")})
|
this.Db.Update("company", Map{"collect_data": data.ToJsonString()}, Map{"id": res.GetCeilInt("id")})
|
||||||
res["collect_data"] = data
|
res["collect_data"] = data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}(res)
|
||||||
|
|
||||||
}
|
}
|
||||||
this.Display(0, res)
|
this.Display(0, res)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ var User = Ctr{
|
|||||||
},
|
},
|
||||||
"test": func(this *Context) {
|
"test": func(this *Context) {
|
||||||
fmt.Println(this.SessionId)
|
fmt.Println(this.SessionId)
|
||||||
//this.Session("user_id", 1)
|
this.Session("user_id", 1)
|
||||||
wechat := this.Db.Get("wechat", "*")
|
wechat := this.Db.Get("wechat", "*")
|
||||||
this.Session("wechatInfo", wechat)
|
this.Session("wechatInfo", wechat)
|
||||||
this.Display(0, "开始测试")
|
this.Display(0, "开始测试")
|
||||||
@ -33,9 +33,14 @@ var User = Ctr{
|
|||||||
|
|
||||||
if this.Session("user_id").Data == nil {
|
if this.Session("user_id").Data == nil {
|
||||||
if this.Session("wechatInfo").Data != nil {
|
if this.Session("wechatInfo").Data != nil {
|
||||||
|
|
||||||
|
wechat := this.Db.Get("wechat", "status", Map{"id": this.Session("wechatInfo").ToMap().GetCeilInt("id")})
|
||||||
|
if wechat.GetCeilInt("status") == 0 {
|
||||||
this.Display(6, "需要认证")
|
this.Display(6, "需要认证")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
this.Display(2, "还没有登录")
|
this.Display(2, "还没有登录")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
BIN
example/iedc.exe
BIN
example/iedc.exe
Binary file not shown.
@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>政企超链接</title><script src="js/hotime.js"></script><link href="css/chunk-1bdd5e9e.aa8169ff.css" rel="prefetch"><link href="css/chunk-364739e9.7b828444.css" rel="prefetch"><link href="css/chunk-45920b48.6ffe8c3e.css" rel="prefetch"><link href="css/chunk-5389ba05.a438ec99.css" rel="prefetch"><link href="css/chunk-53f14c44.5f2d3d54.css" rel="prefetch"><link href="css/chunk-7427f764.5785e6ca.css" rel="prefetch"><link href="css/chunk-913cf40c.89912302.css" rel="prefetch"><link href="css/chunk-997b756c.c836e06d.css" rel="prefetch"><link href="css/chunk-b291a028.db8be8b1.css" rel="prefetch"><link href="css/chunk-c278c8ee.3b1c6c9e.css" rel="prefetch"><link href="css/chunk-dc742e0e.32c7ed0d.css" rel="prefetch"><link href="js/chunk-1bdd5e9e.35411267.js" rel="prefetch"><link href="js/chunk-364739e9.b0694fd8.js" rel="prefetch"><link href="js/chunk-45920b48.3cf27432.js" rel="prefetch"><link href="js/chunk-5389ba05.9a35d00e.js" rel="prefetch"><link href="js/chunk-53f14c44.85247487.js" rel="prefetch"><link href="js/chunk-57ef77d8.22591aa2.js" rel="prefetch"><link href="js/chunk-6bf136d8.8083f1a9.js" rel="prefetch"><link href="js/chunk-7427f764.71679cc4.js" rel="prefetch"><link href="js/chunk-913cf40c.a258f39d.js" rel="prefetch"><link href="js/chunk-997b756c.e15a06b7.js" rel="prefetch"><link href="js/chunk-b291a028.641a2a82.js" rel="prefetch"><link href="js/chunk-c278c8ee.d9506722.js" rel="prefetch"><link href="js/chunk-dc742e0e.2f9f461a.js" rel="prefetch"><link href="css/app.213cf3bd.css" rel="preload" as="style"><link href="css/chunk-vendors.f50b6c9f.css" rel="preload" as="style"><link href="js/app.ccae76d8.js" rel="preload" as="script"><link href="js/chunk-vendors.5cecbfc6.js" rel="preload" as="script"><link href="css/chunk-vendors.f50b6c9f.css" rel="stylesheet"><link href="css/app.213cf3bd.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but myhs doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.5cecbfc6.js"></script><script src="js/app.ccae76d8.js"></script></body></html>
|
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>政企超链接</title><script src="js/hotime.js"></script><script src="https://cdn.jsdelivr.net/npm/@vant/touch-emulator"></script><link href="css/chunk-02439de0.a1e52448.css" rel="prefetch"><link href="css/chunk-09fe06e5.c06fe36f.css" rel="prefetch"><link href="css/chunk-1bdd5e9e.aa8169ff.css" rel="prefetch"><link href="css/chunk-20e158ec.c2a92ea6.css" rel="prefetch"><link href="css/chunk-322f48b7.06e84a35.css" rel="prefetch"><link href="css/chunk-3adea09d.3c00ce3b.css" rel="prefetch"><link href="css/chunk-4e5f88ae.c0f62477.css" rel="prefetch"><link href="css/chunk-6398a646.6e2fe438.css" rel="prefetch"><link href="css/chunk-b291a028.db8be8b1.css" rel="prefetch"><link href="css/chunk-d856e504.ec73a236.css" rel="prefetch"><link href="css/chunk-fb8f98f4.47fe59ee.css" rel="prefetch"><link href="js/chunk-02439de0.c7d27472.js" rel="prefetch"><link href="js/chunk-09fe06e5.ff286ae3.js" rel="prefetch"><link href="js/chunk-1bdd5e9e.35411267.js" rel="prefetch"><link href="js/chunk-20e158ec.a8f2a7c9.js" rel="prefetch"><link href="js/chunk-322f48b7.80b37f0d.js" rel="prefetch"><link href="js/chunk-3adea09d.802558bf.js" rel="prefetch"><link href="js/chunk-4e5f88ae.646e8c2f.js" rel="prefetch"><link href="js/chunk-6398a646.ab634173.js" rel="prefetch"><link href="js/chunk-6bf136d8.8083f1a9.js" rel="prefetch"><link href="js/chunk-b291a028.641a2a82.js" rel="prefetch"><link href="js/chunk-d856e504.a9c74dc8.js" rel="prefetch"><link href="js/chunk-fb8f98f4.cea10ffd.js" rel="prefetch"><link href="css/app.213cf3bd.css" rel="preload" as="style"><link href="css/chunk-vendors.f50b6c9f.css" rel="preload" as="style"><link href="js/app.28b452df.js" rel="preload" as="script"><link href="js/chunk-vendors.5cecbfc6.js" rel="preload" as="script"><link href="css/chunk-vendors.f50b6c9f.css" rel="stylesheet"><link href="css/app.213cf3bd.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but myhs doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.5cecbfc6.js"></script><script src="js/app.28b452df.js"></script></body></html>
|
@ -170,7 +170,7 @@ var H={
|
|||||||
}
|
}
|
||||||
// url= url+"."+type;
|
// url= url+"."+type;
|
||||||
}
|
}
|
||||||
if(url.indexOf('http')<0){
|
if(url.indexOf('http')<0&&url.indexOf('/')!=0){
|
||||||
if(url.indexOf('.'+H.ctrType)>0)
|
if(url.indexOf('.'+H.ctrType)>0)
|
||||||
url= H.url+url;
|
url= H.url+url;
|
||||||
else
|
else
|
||||||
|
@ -7,8 +7,19 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
H.get("http://127.0.0.1:8081/app/user/test")
|
function run() {
|
||||||
|
var data={"code":H.getParam("code")}
|
||||||
|
if(data.code==null){
|
||||||
|
location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2edb802f5c3ae1ae&redirect_uri='+location.href+'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
H.post("app/wechat/code", data, function (res) {
|
||||||
|
|
||||||
|
H.upUrl("/wx/");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
run()
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user