@yeeyoon/library 1.8.5 → 1.8.9
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.
|
@@ -6,6 +6,7 @@ import PlatformModal from '../PlatformModal';
|
|
|
6
6
|
import { getCollabRedirectUrl } from '../../env';
|
|
7
7
|
import ls from 'local-storage';
|
|
8
8
|
import styles from './index.less';
|
|
9
|
+
import { fetchSystemToken } from '../../service';
|
|
9
10
|
|
|
10
11
|
const { SubMenu } = Menu;
|
|
11
12
|
|
|
@@ -21,8 +22,7 @@ const ProductListMenu = (props) => {
|
|
|
21
22
|
code: 200000729,
|
|
22
23
|
description: '团队协作,任务分配一站式敏捷开发',
|
|
23
24
|
domainName: null,
|
|
24
|
-
icon:
|
|
25
|
-
'https://demo-yeeyoon-fm.oss-cn-zhangjiakou.aliyuncs.com/userCenter/productLogo/yiyunxietong.png',
|
|
25
|
+
icon: 'https://demo-yeeyoon-fm.oss-cn-zhangjiakou.aliyuncs.com/userCenter/productLogo/yiyunxietong.png',
|
|
26
26
|
id: '9f4f6e1a063711ecb0c00c42a1ff8370',
|
|
27
27
|
isClose: 0,
|
|
28
28
|
level: 1,
|
|
@@ -36,9 +36,19 @@ const ProductListMenu = (props) => {
|
|
|
36
36
|
const enterDetail = (item) => {
|
|
37
37
|
if (item.code == 200000729) {
|
|
38
38
|
window.open(`${getCollabRedirectUrl()}?token=${ls.get('X-Auth-Token')}`);
|
|
39
|
-
} else {
|
|
39
|
+
} else if (item.platforms.length > 1) {
|
|
40
40
|
setPlatModal(true);
|
|
41
41
|
setPlatforms(item.platforms);
|
|
42
|
+
} else if (item.platforms.length == 1) {
|
|
43
|
+
getSystemToken(item.platforms[0]);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const getSystemToken = async (item) => {
|
|
47
|
+
const resp = await fetchSystemToken({ platformId: item.id });
|
|
48
|
+
const { success, data } = resp;
|
|
49
|
+
if (success) {
|
|
50
|
+
const { token, ...rest } = data;
|
|
51
|
+
window.open(`${item.forwardDomainName}?token=${token}&userInfo=${rest}`);
|
|
42
52
|
}
|
|
43
53
|
};
|
|
44
54
|
return (
|
|
@@ -69,21 +69,29 @@ export function getProfileRedirectUrl(path) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function getOfficialSiteRedirectUrl(
|
|
73
|
-
if (sysName !== 'profile') return;
|
|
72
|
+
export function getOfficialSiteRedirectUrl() {
|
|
74
73
|
let url;
|
|
75
74
|
switch (host) {
|
|
75
|
+
case 'localhost:8000':
|
|
76
76
|
case 'localhost:8003':
|
|
77
|
+
case 'localhost:8009':
|
|
78
|
+
case 'localhost:8010':
|
|
77
79
|
case 'testing-profile.yeeyoon.com':
|
|
80
|
+
case 'testing-collab.yeeyoon.com':
|
|
81
|
+
case 'testing-bpm.yeeyoon.com':
|
|
78
82
|
url = `https://testing.yeeyoon.com`;
|
|
79
83
|
break;
|
|
80
84
|
case 'demo-profile.yeeyoon.com':
|
|
81
85
|
url = `https://demonstration.yeeyoon.com`;
|
|
82
86
|
break;
|
|
83
87
|
case 'staging-profile.yeeyoon.com':
|
|
88
|
+
case 'staging-collab.yeeyoon.com':
|
|
89
|
+
case 'staging-bpm.yeeyoon.com':
|
|
84
90
|
url = `https://staging.yeeyoon.com`;
|
|
85
91
|
break;
|
|
86
92
|
case 'profile.yeeyoon.com':
|
|
93
|
+
case 'collab.yeeyoon.com':
|
|
94
|
+
case 'bpm.yeeyoon.com':
|
|
87
95
|
default:
|
|
88
96
|
url = `https://yeeyoon.com`;
|
|
89
97
|
break;
|
|
@@ -99,9 +99,8 @@ const Header = (props) => {
|
|
|
99
99
|
}, [tenantId]);
|
|
100
100
|
|
|
101
101
|
const backToIam = () => {
|
|
102
|
-
window.location
|
|
103
|
-
|
|
104
|
-
}`;
|
|
102
|
+
const { origin, pathname } = window.location;
|
|
103
|
+
window.location.href = `${getIamRedirectUrl()}?redirect=${origin}${pathname}`;
|
|
105
104
|
};
|
|
106
105
|
|
|
107
106
|
const getCySystemToken = async () => {
|
|
@@ -184,25 +183,28 @@ const Header = (props) => {
|
|
|
184
183
|
}}
|
|
185
184
|
/>
|
|
186
185
|
</Tooltip>
|
|
187
|
-
<
|
|
188
|
-
src={getSysBrandConfig().logo}
|
|
186
|
+
<span
|
|
189
187
|
className={styles['comp-header__logo']}
|
|
190
|
-
style={{ height: productName !== 'profile' ? '40px' : '32px' }}
|
|
191
188
|
onClick={() => {
|
|
192
189
|
getOfficialSiteRedirectUrl();
|
|
193
190
|
}}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
style={{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
191
|
+
>
|
|
192
|
+
<img
|
|
193
|
+
src={getSysBrandConfig().logo}
|
|
194
|
+
style={{ height: productName !== 'profile' ? '40px' : '32px' }}
|
|
195
|
+
/>
|
|
196
|
+
{productName !== 'profile' && (
|
|
197
|
+
<span
|
|
198
|
+
style={{
|
|
199
|
+
color: 'rgba(0, 0, 0, .85)',
|
|
200
|
+
fontSize: '24px',
|
|
201
|
+
marginLeft: '5px',
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
{getSysBrandConfig().name}
|
|
205
|
+
</span>
|
|
206
|
+
)}
|
|
207
|
+
</span>
|
|
206
208
|
</div>
|
|
207
209
|
<div className={styles['comp-header__right-content']}>
|
|
208
210
|
<Tooltip title="任务中心" className={styles['comp-header__icon']}>
|
|
@@ -12,13 +12,19 @@ function getCyWsApiHost() {
|
|
|
12
12
|
case 'localhost:8010':
|
|
13
13
|
case 'testing-task.yeeyoon.com':
|
|
14
14
|
case 'testing-profile.yeeyoon.com':
|
|
15
|
+
case 'testing-collab.yeeyoon.com':
|
|
16
|
+
case 'testing-bpm.yeeyoon.com':
|
|
15
17
|
case 'demo-task.yeeyoon.com':
|
|
16
18
|
case 'demo-profile.yeeyoon.com':
|
|
19
|
+
return 'wss://testing-ws.yeeyoon.com/yeeyoon';
|
|
17
20
|
case 'staging-task.yeeyoon.com':
|
|
18
21
|
case 'staging-profile.yeeyoon.com':
|
|
19
|
-
|
|
22
|
+
case 'staging-collab.yeeyoon.com':
|
|
23
|
+
case 'staging-bpm.yeeyoon.com':
|
|
20
24
|
case 'task.yeeyoon.com':
|
|
21
25
|
case 'profile.yeeyoon.com':
|
|
26
|
+
case 'collab.yeeyoon.com':
|
|
27
|
+
case 'bpm.yeeyoon.com':
|
|
22
28
|
default:
|
|
23
29
|
return 'wss://ws.yeeyoon.com/yeeyoon';
|
|
24
30
|
}
|
|
@@ -49,13 +55,19 @@ function getCyMessageApiHost() {
|
|
|
49
55
|
case 'localhost:8010':
|
|
50
56
|
case 'testing-task.yeeyoon.com':
|
|
51
57
|
case 'testing-profile.yeeyoon.com':
|
|
58
|
+
case 'testing-collab.yeeyoon.com':
|
|
59
|
+
case 'testing-bpm.yeeyoon.com':
|
|
52
60
|
case 'demo-task.yeeyoon.com':
|
|
53
61
|
case 'demo-profile.yeeyoon.com':
|
|
62
|
+
return 'https://testing-api.yeeyoon.com/notification';
|
|
54
63
|
case 'staging-task.yeeyoon.com':
|
|
55
64
|
case 'staging-profile.yeeyoon.com':
|
|
56
|
-
|
|
65
|
+
case 'staging-collab.yeeyoon.com':
|
|
66
|
+
case 'staging-bpm.yeeyoon.com':
|
|
57
67
|
case 'task.yeeyoon.com':
|
|
58
68
|
case 'profile.yeeyoon.com':
|
|
69
|
+
case 'collab.yeeyoon.com':
|
|
70
|
+
case 'bpm.yeeyoon.com':
|
|
59
71
|
default:
|
|
60
72
|
return 'https://api.yeeyoon.com/notification';
|
|
61
73
|
}
|
|
@@ -102,15 +114,21 @@ export function getEnvVar() {
|
|
|
102
114
|
case 'localhost:8010':
|
|
103
115
|
case 'testing-task.yeeyoon.com':
|
|
104
116
|
case 'testing-profile.yeeyoon.com':
|
|
117
|
+
case 'testing-collab.yeeyoon.com':
|
|
118
|
+
case 'testing-bpm.yeeyoon.com':
|
|
105
119
|
return 'test';
|
|
106
120
|
case 'demo-task.yeeyoon.com':
|
|
107
121
|
case 'demo-profile.yeeyoon.com':
|
|
108
122
|
return 'demo';
|
|
109
123
|
case 'staging-task.yeeyoon.com':
|
|
110
124
|
case 'staging-profile.yeeyoon.com':
|
|
125
|
+
case 'staging-collab.yeeyoon.com':
|
|
126
|
+
case 'staging-bpm.yeeyoon.com':
|
|
111
127
|
return 'uat';
|
|
112
128
|
case 'task.yeeyoon.com':
|
|
113
129
|
case 'profile.yeeyoon.com':
|
|
130
|
+
case 'collab.yeeyoon.com':
|
|
131
|
+
case 'bpm.yeeyoon.com':
|
|
114
132
|
default:
|
|
115
133
|
return 'prod';
|
|
116
134
|
}
|