@yeeyoon/library 3.5.2 → 3.5.3
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.
@@ -12,7 +12,13 @@ import {
|
|
12
12
|
import ProductListMenu from './components/ProductListMenu/';
|
13
13
|
import PlatformModal from './components/PlatformModal/';
|
14
14
|
|
15
|
-
import {
|
15
|
+
import {
|
16
|
+
IconTodo,
|
17
|
+
IconConsole,
|
18
|
+
IconMore,
|
19
|
+
IconQunZuGuanLi,
|
20
|
+
IconVersion,
|
21
|
+
} from '../Icons/';
|
16
22
|
|
17
23
|
import {
|
18
24
|
fetchSystemToken,
|
@@ -28,6 +34,8 @@ import {
|
|
28
34
|
HOST_PROFILE_USER,
|
29
35
|
HOST_PROFILE_PASSWORD,
|
30
36
|
HOST_PROFILE_GROUP,
|
37
|
+
HOST_HUASHAN_LOGIN,
|
38
|
+
HOST_HUASHAN_BPM,
|
31
39
|
} from '../../config/env';
|
32
40
|
|
33
41
|
import LogoProfile from './assets/profile.svg';
|
@@ -134,8 +142,8 @@ const Header = (props) => {
|
|
134
142
|
|
135
143
|
const backToIam = () => {
|
136
144
|
const { origin, pathname } = window.location;
|
137
|
-
if (origin.indexOf(
|
138
|
-
window.location.href =
|
145
|
+
if (origin.indexOf(HOST_HUASHAN_BPM) > -1) {
|
146
|
+
window.location.href = HOST_HUASHAN_LOGIN;
|
139
147
|
} else {
|
140
148
|
window.location.href = `${HOST_IAM}?redirect=${origin}${pathname}`;
|
141
149
|
}
|
@@ -223,7 +231,7 @@ const Header = (props) => {
|
|
223
231
|
case 'bpm-share':
|
224
232
|
return {
|
225
233
|
logo: LogoBpm,
|
226
|
-
name: '
|
234
|
+
name: '周转物资协同管理平台',
|
227
235
|
};
|
228
236
|
case 'mms':
|
229
237
|
return {
|
@@ -296,6 +304,26 @@ const Header = (props) => {
|
|
296
304
|
<IconTodo style={IconStyle} />
|
297
305
|
任务中心
|
298
306
|
</span>
|
307
|
+
{(productName === 'bpm' || productName === 'mms') && (
|
308
|
+
<span
|
309
|
+
className={styles['comp-header__icon']}
|
310
|
+
onClick={() => {
|
311
|
+
let system = '';
|
312
|
+
switch (productName) {
|
313
|
+
case 'bpm':
|
314
|
+
system = 'bpm';
|
315
|
+
break;
|
316
|
+
case 'mms':
|
317
|
+
system = 'wms';
|
318
|
+
break;
|
319
|
+
}
|
320
|
+
window.location.href = `${HOST_OFFICIAL}/version?system=${system}&token=${token}`;
|
321
|
+
}}
|
322
|
+
>
|
323
|
+
<IconVersion style={IconStyle} />
|
324
|
+
版本中心
|
325
|
+
</span>
|
326
|
+
)}
|
299
327
|
{/* {systemUserInfo && (
|
300
328
|
<Notification
|
301
329
|
customStyles={{
|
@@ -7,6 +7,7 @@ const Icons = createFromIconfontCN({
|
|
7
7
|
'//at.alicdn.com/t/font_2832661_kmrn4o901g.js', //宜云协同iconfont
|
8
8
|
'//at.alicdn.com/t/font_2832313_vjeg45f5qof.js',
|
9
9
|
'//at.alicdn.com/t/font_2965204_9g0wekoduag.js', //租户管理
|
10
|
+
'//at.alicdn.com/t/font_3133477_q292mp6e2u.js',
|
10
11
|
],
|
11
12
|
});
|
12
13
|
|
@@ -34,6 +35,9 @@ const IconTuijianchanpin = (args) => {
|
|
34
35
|
const IconQunZuGuanLi = (args) => {
|
35
36
|
return <Icons type="icon-qunzuguanli" {...args} />;
|
36
37
|
};
|
38
|
+
const IconVersion = (args) => {
|
39
|
+
return <Icons type="icon-tag" {...args} />;
|
40
|
+
};
|
37
41
|
|
38
42
|
export {
|
39
43
|
IconBell,
|
@@ -44,4 +48,5 @@ export {
|
|
44
48
|
IconWodechanpin,
|
45
49
|
IconTuijianchanpin,
|
46
50
|
IconQunZuGuanLi,
|
51
|
+
IconVersion,
|
47
52
|
};
|
package/lib/config/env.js
CHANGED
@@ -91,6 +91,16 @@ function getEnvHost(product, path = '') {
|
|
91
91
|
}
|
92
92
|
}
|
93
93
|
|
94
|
+
function getHuashanEnvHost(isLogin = false) {
|
95
|
+
if (REACT_APP_ENV === 'prod') {
|
96
|
+
if (isLogin) return 'https://huashan-login.yeeyoon.com/login';
|
97
|
+
else return 'https://huashan.yeeyoon.com';
|
98
|
+
} else {
|
99
|
+
if (isLogin) return 'https://testing-huashan-login.yeeyoon.com/login';
|
100
|
+
else return 'https://testing-huashan.yeeyoon.com';
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
94
104
|
function getEnvApi(product, path = '') {
|
95
105
|
const env = REACT_APP_ENV === 'dev' ? 'testing' : REACT_APP_ENV;
|
96
106
|
const api = envApi[product][env];
|
@@ -128,6 +138,9 @@ export const HOST_PROFILE_GROUP = getEnvHost('profile', '/user-profile/group');
|
|
128
138
|
export const HOST_ZHONGTAI_XLT = getEnvHost('zhongtai_cy');
|
129
139
|
export const HOST_ZHONGTAI_CY = getEnvHost('zhongtai_xlt');
|
130
140
|
|
141
|
+
export const HOST_HUASHAN_LOGIN = getHuashanEnvHost(true);
|
142
|
+
export const HOST_HUASHAN_BPM = getHuashanEnvHost();
|
143
|
+
|
131
144
|
// API
|
132
145
|
export const API_IAM = getEnvApi('iam');
|
133
146
|
export const API_ZHONGTAI_CY = getEnvApi('zhongtai_cy');
|
@@ -149,6 +162,8 @@ console.log(
|
|
149
162
|
`HOST_PROFILE_MESSAGE: ${HOST_PROFILE_MESSAGE}\n`,
|
150
163
|
`HOST_ZHONGTAI_XLT: ${HOST_ZHONGTAI_XLT}\n`,
|
151
164
|
`HOST_ZHONGTAI_CY: ${HOST_ZHONGTAI_CY}\n`,
|
165
|
+
`HOST_HUASHAN_LOGIN: ${HOST_HUASHAN_LOGIN}\n`,
|
166
|
+
`HOST_HUASHAN_BPM: ${HOST_HUASHAN_BPM}\n`,
|
152
167
|
`------------------------------------\n`,
|
153
168
|
`API_IAM: ${API_IAM}\n`,
|
154
169
|
`API_ZHONGTAI_CY: ${API_ZHONGTAI_CY}\n`,
|