|
|
@@ -14,7 +14,7 @@ export default function Login() { |
|
|
|
const [account, setAccount] = useState(''); |
|
|
|
const [password, setPassword] = useState(''); |
|
|
|
const [loading, setLoading] = useState(false); |
|
|
|
|
|
|
|
const { refresh } = useModel('@@initialState'); |
|
|
|
// const { loading, signin } = useModel('useAuthModel'); |
|
|
|
|
|
|
|
const onLogin = useCallback(async () => { |
|
|
@@ -37,14 +37,9 @@ export default function Login() { |
|
|
|
// history.push('/'); |
|
|
|
// window.location.href = '/'; |
|
|
|
history.replace('/'); |
|
|
|
window.location.reload(); |
|
|
|
refresh(); |
|
|
|
// window.location.reload(); |
|
|
|
}); |
|
|
|
// if(!isReqSuccess(res)) { |
|
|
|
// setErrText(res.msg); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// Taro.switchTab({ url: '/pages/project/index' }); |
|
|
|
// Taro.navigateTo({ url: '/pages/project/index' }); |
|
|
|
}, [account, password]); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|