module-menu 0.2.10 → 0.2.12
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.
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ const ModuleMenu = ({ sysName, stash }) => {
|
|
|
72
72
|
Axios('get', '/admin/social/logoutUri', '', {})
|
|
73
73
|
.then((res) => {
|
|
74
74
|
if (res.data.code === 0) {
|
|
75
|
-
if (res.data.data !==
|
|
75
|
+
if (res.data.data.search('http') !== -1) {
|
|
76
76
|
window.location.href = res.data.data;
|
|
77
77
|
}
|
|
78
78
|
} else {
|
|
@@ -24,7 +24,21 @@ const ModuleUser = ({ stash }) => {
|
|
|
24
24
|
const handleClickmenu = (url) => {
|
|
25
25
|
window.location.href = url;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
const handleClickSysManage = () => {
|
|
28
|
+
if (!stash) {
|
|
29
|
+
window.location.href = '/#/admin/user/index';
|
|
30
|
+
} else {
|
|
31
|
+
Axios('get', '/admin-api/system/auth/homePage', '', {})
|
|
32
|
+
.then((res) => {
|
|
33
|
+
if (res.data.code === 0) {
|
|
34
|
+
window.location.href = `/admin-ui${res.data.data.path}`;
|
|
35
|
+
} else {
|
|
36
|
+
message.warning(res.data.msg || '获取系统管理页面路由信息失败');
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.catch((e) => console.log('e', e));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
28
42
|
const {
|
|
29
43
|
PersonalCenterSrc,
|
|
30
44
|
MessageCenterSrc,
|
|
@@ -139,7 +153,11 @@ const ModuleUser = ({ stash }) => {
|
|
|
139
153
|
<Menu.Item
|
|
140
154
|
key="personalCenter"
|
|
141
155
|
onClick={() =>
|
|
142
|
-
handleClickmenu(
|
|
156
|
+
handleClickmenu(
|
|
157
|
+
!stash
|
|
158
|
+
? '/#/info/index'
|
|
159
|
+
: '/admin-ui/data-share-portal/personal/info',
|
|
160
|
+
)
|
|
143
161
|
}
|
|
144
162
|
>
|
|
145
163
|
<img
|
|
@@ -147,19 +165,10 @@ const ModuleUser = ({ stash }) => {
|
|
|
147
165
|
alt=""
|
|
148
166
|
style={{ marginRight: '10px', marginTop: '-3px' }}
|
|
149
167
|
/>
|
|
150
|
-
<span
|
|
168
|
+
<span>{!stash ? '个人中心' : '用户中心'}</span>
|
|
151
169
|
</Menu.Item>
|
|
152
170
|
{isHaveSystemManagementPermission && (
|
|
153
|
-
<Menu.Item
|
|
154
|
-
key="systemManage"
|
|
155
|
-
onClick={() =>
|
|
156
|
-
handleClickmenu(
|
|
157
|
-
!stash
|
|
158
|
-
? '/#/admin/user/index'
|
|
159
|
-
: '/admin-ui/bpm/manager/user-group',
|
|
160
|
-
)
|
|
161
|
-
}
|
|
162
|
-
>
|
|
171
|
+
<Menu.Item key="systemManage" onClick={handleClickSysManage}>
|
|
163
172
|
<img
|
|
164
173
|
src={SystemManageSrc}
|
|
165
174
|
alt=""
|
package/src/pages/index.jsx
CHANGED
package/src/pages/util/axios.js
CHANGED
|
@@ -4,7 +4,7 @@ import baseCof from './config';
|
|
|
4
4
|
import getStore from './userInfo';
|
|
5
5
|
import { checkToken} from './permessionUtils';
|
|
6
6
|
|
|
7
|
-
let tokenValue='
|
|
7
|
+
let tokenValue='dfd39d55-4c49-4862-8400-46f2a57f25ac';
|
|
8
8
|
// tokenInSessionStor存在为一体化,不存在为轻量级
|
|
9
9
|
const tokenInSessionStor = window.sessionStorage.getItem('bigdata-access_token');
|
|
10
10
|
const DEFAULT_LOGOUT_URL = tokenInSessionStor? '/#/login':'/admin-ui/login'
|
|
@@ -103,7 +103,7 @@ function Axios(method, api, params, map) {
|
|
|
103
103
|
} else if (api === '/admin/social/logoutUri') {
|
|
104
104
|
httpDefult = {
|
|
105
105
|
method: method,
|
|
106
|
-
url: api
|
|
106
|
+
url: `${baseCof.baseSever}${api}`,
|
|
107
107
|
params: params,
|
|
108
108
|
...map,
|
|
109
109
|
};
|