联动组件优化

This commit is contained in:
2022-07-13 20:15:35 +08:00
parent 33016fca85
commit b8f78eea71
22 changed files with 117 additions and 48 deletions
+2 -11
View File
@@ -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) {