@yeeyoon/library 1.8.8 → 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(sysName) {
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;
@@ -183,25 +183,28 @@ const Header = (props) => {
183
183
  }}
184
184
  />
185
185
  </Tooltip>
186
- <img
187
- src={getSysBrandConfig().logo}
186
+ <span
188
187
  className={styles['comp-header__logo']}
189
- style={{ height: productName !== 'profile' ? '40px' : '32px' }}
190
188
  onClick={() => {
191
189
  getOfficialSiteRedirectUrl();
192
190
  }}
193
- />
194
- {productName !== 'profile' && (
195
- <span
196
- style={{
197
- color: 'rgba(0, 0, 0, .85)',
198
- fontSize: '24px',
199
- marginLeft: '5px',
200
- }}
201
- >
202
- {getSysBrandConfig().name}
203
- </span>
204
- )}
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>
205
208
  </div>
206
209
  <div className={styles['comp-header__right-content']}>
207
210
  <Tooltip title="任务中心" className={styles['comp-header__icon']}>
@@ -9,6 +9,9 @@
9
9
  border-radius: 5px;
10
10
  &__logo {
11
11
  margin-left: 10px;
12
+ cursor: pointer;
13
+ display: flex;
14
+ align-items: center;
12
15
  }
13
16
  &__logo__name {
14
17
  font-size: 24px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "1.8.8",
3
+ "version": "1.8.9",
4
4
  "description": "宜云前端组件库和通用服务",
5
5
  "main": "index.js",
6
6
  "repository": {