|
|
|
@ -18,7 +18,22 @@ function Login() {
|
|
|
|
|
|
|
|
|
|
const [errorMsg, setErrorMsg] = useState('')
|
|
|
|
|
|
|
|
|
|
if (dd.env.platform === 'notInDingTalk') {
|
|
|
|
|
const dingTalkPlatForm = dd.env.platform
|
|
|
|
|
|
|
|
|
|
if (import.meta.env.DEV) {
|
|
|
|
|
return (
|
|
|
|
|
<Flex justify='center' align='center' gap='middle' vertical>
|
|
|
|
|
<Result
|
|
|
|
|
status='warning'
|
|
|
|
|
title='你处于开发模式'
|
|
|
|
|
subTitle={'请先设置 Local storage'}
|
|
|
|
|
extra={[<Spin key='dingding-login' size='small' />]}
|
|
|
|
|
/>
|
|
|
|
|
</Flex>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dingTalkPlatForm === 'notInDingTalk') {
|
|
|
|
|
window.location = redirectUrl
|
|
|
|
|
} else {
|
|
|
|
|
dd.requestAuthCode({
|
|
|
|
|