Commit 1c4719b7 by zhujian

'fixed'

parent 2a993011
...@@ -57,34 +57,28 @@ export default function WechatLogin(props: any) { ...@@ -57,34 +57,28 @@ export default function WechatLogin(props: any) {
} }
}, [status]) }, [status])
useEffect(() => { useEffect(() => {
if (leftTime == 60 || !ticket) { if (leftTime == 60 || !ticket) {
return return
} }
useEffect(() => {
if (leftTime == 60 || !ticket) {
return
}
Service.Hades('anon/hades/getTicketState', { Service.Hades('anon/hades/getTicketState', {
ticket ticket
}).then((res: any) => { }).then((res: any) => {
if (res.result === 'AUTH_SUCCESS') { if (res.result === 'AUTH_SUCCESS') {
Service.Hades('anon/hades/getTicketWXWorkLogin', { Service.Hades('anon/hades/getTicketWXWorkLogin', {
ticket ticket
}).then((_res: any) => { }).then((_res: any) => {
User.setUserId(_res.result.loginInfo.userId); User.setUserId(_res.result.loginInfo.userId);
User.setToken(_res.result.loginInfo.xmToken); User.setToken(_res.result.loginInfo.xmToken);
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route`, pathname: `/switch-route`,
}) })
}) })
} }
}) })
}, [leftTime])
}, [leftTime]) }, [leftTime])
return <div className='wechatLoginBox'> return <div className='wechatLoginBox'>
......
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