联动组件优化
This commit is contained in:
@@ -13,19 +13,10 @@ import { useDidShow, } from '@tarojs/taro'
|
||||
import { GetAdminUserInfoApi } from "@/api/user";
|
||||
|
||||
|
||||
|
||||
export default () => {
|
||||
//重新获取用户信息
|
||||
// const {fetchData: useFetchData} = GetAdminUserInfoApi()
|
||||
// const [userDataAgain, setUserDataAgain] = useState<any>({})
|
||||
// const getUserData = async () => {
|
||||
// let res = await useFetchData()
|
||||
// setUserDataAgain(res.data)
|
||||
// }
|
||||
|
||||
|
||||
// 用户信息
|
||||
const { getSelfUserInfo } = useLogin();
|
||||
const { getSelfUserInfo, getAdminUserInfo } = useLogin();
|
||||
const { adminUserInfo } = useSelector(state => state.userInfo);
|
||||
useEffect(() => {
|
||||
// getSelfUserInfo().then().catch(() => {
|
||||
@@ -45,7 +36,7 @@ export default () => {
|
||||
}, [])
|
||||
useDidShow(() => {
|
||||
ApigetTotal()
|
||||
// getUserData()
|
||||
getAdminUserInfo()
|
||||
})
|
||||
const checkGo = () => {
|
||||
if (adminUserInfo?.authentication_status === 0 || adminUserInfo?.authentication_status === 1 || adminUserInfo?.authentication_status === 2 || adminUserInfo?.authentication_status === 3) {
|
||||
|
||||
Reference in New Issue
Block a user