iedc-go/example/tpt/wx/code.html

28 lines
581 B
HTML
Raw Normal View History

2022-02-23 22:26:36 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>微信登录</title>
2022-02-28 00:53:38 +00:00
<script type="text/javascript" src="js/hotime.js"></script>
2022-02-23 22:26:36 +00:00
</head>
<body>
<script>
2022-02-28 00:53:38 +00:00
H.post("app/wechat/code", {"code": H.getParam("code")}, function (res) {
if (res.status != 0) {
alert(res.result.msg)
return
2022-02-23 22:26:36 +00:00
}
2022-02-28 00:53:38 +00:00
localStorage.setItem("token", res.result.token)
if (res.result.type == 0) {
H.upUrl("wx/");
} else {
H.upUrl("wx/#/companyone");
}
2022-02-23 22:26:36 +00:00
2022-02-28 00:53:38 +00:00
})
2022-02-23 22:26:36 +00:00
</script>
</body>
</html>