Commit eed7f855 by zhujian

'fixed'

parent efcc15cf
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
console.log(appTermEnum, code, ticket); console.log(appTermEnum, code, ticket);
if (!code) { if (!code) {
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(location.href)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(location.href)}&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
location.href = url location.href = url
return return
} }
......
...@@ -40,7 +40,7 @@ export default function WechatLogin(props: any) { ...@@ -40,7 +40,7 @@ export default function WechatLogin(props: any) {
QRCode.current.prepend(qrnode); QRCode.current.prepend(qrnode);
setLeftTime(freshTime); setLeftTime(freshTime);
timer.current = setInterval(() => { timer.current = setInterval(() => {
if (leftTime == 0) { if (leftTimeRef.current == 0) {
clearInterval(timer.current); clearInterval(timer.current);
setStatus(1); setStatus(1);
return return
......
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