@yeeyoon/library 3.1.3 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,9 +67,8 @@ const Header = (props) => {
|
|
67
67
|
const [systemUserInfo, setSystemUserInfo] = useState(null);
|
68
68
|
const [tenants, setTenants] = useState([]);
|
69
69
|
const [userId, setUserId] = useState([]);
|
70
|
-
const [productListMenuDrawerShow, setProductListMenuDrawerShow] =
|
71
|
-
false
|
72
|
-
);
|
70
|
+
const [productListMenuDrawerShow, setProductListMenuDrawerShow] =
|
71
|
+
useState(false);
|
73
72
|
const [platformsModalShow, setPlatformsModalShow] = useState(false);
|
74
73
|
const [avatarProps, setAvatarProps] = useState({});
|
75
74
|
const [redirectUrl, setRedirectUrl] = useState('');
|
@@ -152,10 +151,14 @@ const Header = (props) => {
|
|
152
151
|
const { success, data } = resp;
|
153
152
|
if (success) {
|
154
153
|
const { platforms, tenants, id, name } = data;
|
155
|
-
if (
|
154
|
+
if (
|
155
|
+
(!platforms.length || !tenants.length) &&
|
156
|
+
window.location.hostname.indexOf('profile') < 0
|
157
|
+
) {
|
156
158
|
handleException && handleException();
|
157
159
|
return;
|
158
160
|
}
|
161
|
+
console.log(window.location.hostname.indexOf('profile'), 666);
|
159
162
|
|
160
163
|
ls.set('X-Auth-Username', name);
|
161
164
|
ls.set('X-Auth-Userid', id);
|