| ()
const {
isAdmin
} = useUser();
useEffect(() => {
+ Taro.getSystemInfo({
+ success: (res) => {
+ setStatusBarHeight(res.statusBarHeight)
+ },
+ })
}, []);
/**
@@ -34,6 +43,28 @@ function User() {
return (
<>
+ {
+ }}
+ left={
+
+ Taro.reLaunch({url: '/pages/index/index'})} style={{color: 'black', marginBottom: '1px'}} />
+
+ }
+ >
+ 我的
+
diff --git a/src/utils/common.ts b/src/utils/common.ts
index ef152e8..4938f63 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -1,7 +1,7 @@
import Taro from '@tarojs/taro'
export default function navTo(url: string, isLogin = false) {
- if (isLogin) {
+ if (isLogin && url != '/pages/user/user') {
if (!Taro.getStorageSync('access_token') || !Taro.getStorageSync('UserId')) {
Taro.showToast({
title: '请先登录',
|