Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
47c55ff6
Commit
47c55ff6
authored
Apr 27, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理二维码在企微环境下不展示的问题
parent
306123ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/modules/root/WechatLogin.tsx
+5
-5
No files found.
src/modules/root/WechatLogin.tsx
View file @
47c55ff6
...
...
@@ -32,6 +32,7 @@ export default function WechatLogin(props: any) {
// 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)
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
let
qrnode
=
new
qrcode
({
text
:
redirect
,
correctLevel
:
2
,
...
...
@@ -39,8 +40,9 @@ export default function WechatLogin(props: any) {
image
:
Logo
,
imageSize
:
50
});
QRCode
.
current
.
innerHTML
=
''
QRCode
.
current
.
prepend
(
qrnode
);
qrcodeWrapDom
&&
qrcodeWrapDom
.
appendChild
(
qrnode
);
// QRCode.current.innerHTML = ''
// QRCode.current.prepend(qrnode);
setLeftTime
(
freshTime
);
timer
.
current
=
setInterval
(()
=>
{
if
(
leftTimeRef
.
current
==
0
)
{
...
...
@@ -86,9 +88,7 @@ export default function WechatLogin(props: any) {
return
<
div
className=
'wechatLoginBox'
>
<
div
className=
"rwm"
>
<
div
id=
"qrcode"
ref=
{
(
dom
)
=>
{
QRCode
.
current
=
dom
}
}
></
div
>
<
div
id=
"qrcode"
></
div
>
{
status
===
1
&&
<
div
className=
"error"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment