政企超链接开始集成
This commit is contained in:
+16
-11
@@ -7,21 +7,26 @@
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
H.post("app/wechat/code", {"code": H.getParam("code")}, function (res) {
|
||||
|
||||
if (res.status != 0) {
|
||||
alert(res.result.msg)
|
||||
function run() {
|
||||
var data={"code":H.getParam("code"),"org_id":H.getParam("org_id")}
|
||||
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
|
||||
}
|
||||
|
||||
localStorage.setItem("token", res.result.token)
|
||||
if (res.result.type == 0) {
|
||||
H.upUrl("wx/");
|
||||
} else {
|
||||
H.upUrl("wx/#/companyone");
|
||||
}
|
||||
H.post("app/wechat/code", data, function (res) {
|
||||
|
||||
if (res.status != 0) {
|
||||
alert(res.result.type)
|
||||
return
|
||||
}
|
||||
|
||||
H.upUrl("https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg5MDczNDcwMw==#wechat_redirect");
|
||||
|
||||
})
|
||||
}
|
||||
run()
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user