hotime/example/tpt/code.html

33 lines
865 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>微信登录</title>
<script type="text/javascript" src="js/hotime.js"></script>
</head>
<body>
<script>
function run() {
var data={"code":H.getParam("code")}
if(data.code==null){
location.href='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdcc8d6360661a179&redirect_uri='+location.href+'&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
return
}
H.post("app/wechat/codeh5", 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=MzkwNTI4NTcyNA==#wechat_redirect");
})
}
run()
</script>
</body>
</html>