|
|
|
@ -9,10 +9,6 @@ import {loginApi, LoginParams} from "@/api/login"; |
|
|
|
|
import MyButton from "@/components/button/MyButton"; |
|
|
|
|
|
|
|
|
|
const Login: FC = () => { |
|
|
|
|
// const {statusBarHeight = 0} = Taro.getSystemInfoSync()
|
|
|
|
|
// const bbc = getMenuButtonBoundingClientRect();
|
|
|
|
|
// const navHeight = bbc.bottom + (bbc.top - statusBarHeight) - statusBarHeight
|
|
|
|
|
|
|
|
|
|
const [isLoading, setLoading] = useState(false) |
|
|
|
|
const [error, setError] = useState<string | null>(null) |
|
|
|
|
const {setUser, setToken, setCompany} = Profile.useContainer() |
|
|
|
@ -78,11 +74,11 @@ const Login: FC = () => { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function TESTLOGIN() { |
|
|
|
|
const res = await loginApi.testLogin() |
|
|
|
|
Taro.setStorageSync('profile', JSON.stringify(res)) |
|
|
|
|
Taro.reLaunch({url: '/pages/home/home'}) |
|
|
|
|
} |
|
|
|
|
// async function TESTLOGIN() {
|
|
|
|
|
// const res = await loginApi.testLogin()
|
|
|
|
|
// Taro.setStorageSync('profile', JSON.stringify(res))
|
|
|
|
|
// Taro.reLaunch({url: '/pages/home/home'})
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className={styles.container}> |
|
|
|
|