module-menu 0.3.32 → 0.3.34

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "module-menu",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
4
4
  "description": "城市大数据平台公共头部及尾部",
5
5
  "main": "src/pages/index.jsx",
6
6
  "scripts": {
@@ -21,7 +21,7 @@ import cn from 'classnames';
21
21
  轻量级-国资委 GZW
22
22
  *
23
23
  */
24
- const ModuleMenu = ({ sysName, stash = '' }) => {
24
+ const ModuleMenu = ({ sysName, stash = '', xiangtan = false }) => {
25
25
  const [sessionMenu, setSessionMenu] = useState([]);
26
26
  const [showMenuList, setshowMenuList] = useState(false);
27
27
  const [menuList, setMenuList] = useState([]);
@@ -172,7 +172,11 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
172
172
  .then((res) => {
173
173
  if (res.data.code === 0) {
174
174
  if (res.data.data.search('http') !== -1) {
175
- window.location.href = res.data.data;
175
+ if (xiangtan) {
176
+ window.open(res.data.data, '_blank');
177
+ } else {
178
+ window.location.href = res.data.data;
179
+ }
176
180
  }
177
181
  } else {
178
182
  message.warning(res.data.msg || '获取信息失败');
@@ -298,6 +302,8 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
298
302
  ].includes(nameStr)
299
303
  ) {
300
304
  window.open(thirdPartyServiceJumpPath, '_blank');
305
+ } else if (xiangtan) {
306
+ window.open(thirdPartyServiceJumpPath, '_blank');
301
307
  } else {
302
308
  window.location.href = thirdPartyServiceJumpPath;
303
309
  }
@@ -306,11 +312,16 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
306
312
  // 跳转首页
307
313
  const toHomePage = (index) => {
308
314
  if (index === 0) {
309
- window.location.href = ['integration', 'LNRD', 'HBJK'].includes(stash)
315
+ const homeUrl = ['integration', 'LNRD', 'HBJK'].includes(stash)
310
316
  ? '/dataadmin/#/index'
311
317
  : stash === 'GZW'
312
318
  ? '/data-platform/#/index'
313
319
  : '/#/index';
320
+ if (xiangtan) {
321
+ window.open(homeUrl, '_blank');
322
+ } else {
323
+ window.location.href = homeUrl;
324
+ }
314
325
  }
315
326
  };
316
327
  const getNewMenuList = (menuGet) => {
@@ -352,7 +352,7 @@ const ModuleUser = ({
352
352
  marginLeft: '10px',
353
353
  verticalAlign: '-2px',
354
354
  fontSize: '16px',
355
- fontWeight: '500',
355
+ fontWeight: '400',
356
356
  // color: stash !== 'LNRD'? null: '#FFFFFF'
357
357
  color: ['LNRD', 'HBJK'].includes(stash) ? '#FFFFFF' : null,
358
358
  }}