|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
import {FC, useEffect, useState} from "react"; |
|
|
|
|
import {Profile} from "@/store"; |
|
|
|
|
import {Image, PageContainer, Text, View} from "@tarojs/components"; |
|
|
|
|
import {Image, Text, View} from "@tarojs/components"; |
|
|
|
|
import Taro from "@tarojs/taro"; |
|
|
|
|
import styles from './login.module.scss' |
|
|
|
|
import Icon from "@/components/icon"; |
|
|
|
@ -12,13 +12,11 @@ import MyButton from "@/components/button/MyButton"; |
|
|
|
|
const Login: FC = () => { |
|
|
|
|
const [isLoading, setLoading] = useState(false) |
|
|
|
|
const [error, setError] = useState<string | null>(null) |
|
|
|
|
const {setUser, setToken, setCompany} = Profile.useContainer() |
|
|
|
|
const {setUser, setToken, setCompany, empty} = Profile.useContainer() |
|
|
|
|
const [h5params, setH5Params] = useState<LoginParams | null>(null) |
|
|
|
|
const [show,setShow] = useState(true) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
|
|
empty(false) |
|
|
|
|
if (process.env.TARO_ENV === 'h5') { |
|
|
|
|
setLoading(true); |
|
|
|
|
loginApi.getParams().then((res) => { |
|
|
|
|