Commit 62b27aa3 by zhujian

'fixed'

parent ae719532
...@@ -20,10 +20,37 @@ ...@@ -20,10 +20,37 @@
<title>小麦企培</title> <title>小麦企培</title>
<script type="text/javascript" charset="utf-8" src="./jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="./jquery.min.js"></script>
<style type="text/css">
.box {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
p {
font-size: 17px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 24px;
margin-top: 12px;
}
</style>
</head> </head>
<body> <body>
<div class="box">
<div>
<img src="https://image.xiaomaiketang.com/xm/iRkcMHPHba.png" style='width:60px' alt="">
<p>
扫码成功
</p>
</div>
</div>
</body> </body>
......
...@@ -3,6 +3,7 @@ import qrcode from '@/core/qrcode/qrcode.js' ...@@ -3,6 +3,7 @@ import qrcode from '@/core/qrcode/qrcode.js'
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import './WechatLogin.less' import './WechatLogin.less'
const Logo = require("@/common/images/logo.png") const Logo = require("@/common/images/logo.png")
declare var location: any;
export default function WechatLogin(props: any) { export default function WechatLogin(props: any) {
const freshTime = 60; const freshTime = 60;
...@@ -23,7 +24,10 @@ export default function WechatLogin(props: any) { ...@@ -23,7 +24,10 @@ export default function WechatLogin(props: any) {
clearInterval(timer.current as any); clearInterval(timer.current as any);
if (status === 0) { if (status === 0) {
Service.Hades("anon/hades/getTicket", {}).then((res: any) => { Service.Hades("anon/hades/getTicket", {}).then((res: any) => {
setTicket(res.result) const redirect = `${location.origin + location.pathname.replace('index.html', 'h5.html')}?ticket=${res.result}&appTermEnum=XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN&env=${process.env.DEPLOY_ENV || 'dev'}`
console.log(redirect)
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
console.log(url)
let qrnode = new qrcode({ let qrnode = new qrcode({
text: res.result, text: res.result,
correctLevel: 2, correctLevel: 2,
...@@ -56,7 +60,6 @@ export default function WechatLogin(props: any) { ...@@ -56,7 +60,6 @@ export default function WechatLogin(props: any) {
if (leftTime == 60) { if (leftTime == 60) {
return return
} }
return
Service.Hades('anon/hades/wXWorkUserLogin', { Service.Hades('anon/hades/wXWorkUserLogin', {
appTermEnum: 'XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN', appTermEnum: 'XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN',
code: ticket code: ticket
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment