eoss-ui 0.7.22 → 0.7.24

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.
Files changed (119) hide show
  1. package/lib/button-group.js +48 -7
  2. package/lib/button.js +48 -7
  3. package/lib/calogin.js +48 -7
  4. package/lib/checkbox-group.js +48 -7
  5. package/lib/data-table-form.js +48 -7
  6. package/lib/data-table.js +48 -7
  7. package/lib/date-picker.js +48 -7
  8. package/lib/dialog.js +48 -7
  9. package/lib/eoss-ui.common.js +608 -525
  10. package/lib/flow-group.js +70 -9
  11. package/lib/flow-list.js +129 -88
  12. package/lib/flow.js +340 -294
  13. package/lib/form.js +48 -7
  14. package/lib/handle-user.js +48 -7
  15. package/lib/handler.js +48 -7
  16. package/lib/icon.js +48 -7
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +48 -7
  19. package/lib/input.js +48 -7
  20. package/lib/login.js +74 -16
  21. package/lib/main.js +176 -135
  22. package/lib/nav.js +48 -7
  23. package/lib/page.js +48 -7
  24. package/lib/pagination.js +48 -7
  25. package/lib/player.js +48 -7
  26. package/lib/qr-code.js +48 -7
  27. package/lib/radio-group.js +48 -7
  28. package/lib/retrial-auth.js +48 -7
  29. package/lib/select-ganged.js +48 -7
  30. package/lib/select.js +48 -7
  31. package/lib/selector-panel.js +48 -7
  32. package/lib/selector.js +48 -7
  33. package/lib/sizer.js +48 -7
  34. package/lib/steps.js +48 -7
  35. package/lib/switch.js +48 -7
  36. package/lib/table-form.js +48 -7
  37. package/lib/tabs.js +48 -7
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/login.css +1 -1
  40. package/lib/tips.js +48 -7
  41. package/lib/tree-group.js +48 -7
  42. package/lib/tree.js +48 -7
  43. package/lib/upload.js +48 -7
  44. package/lib/utils/util.js +48 -7
  45. package/lib/wujie.js +48 -7
  46. package/lib/wxlogin.js +48 -7
  47. package/package.json +160 -160
  48. package/packages/.DS_Store +0 -0
  49. package/packages/button-group/src/main.vue +346 -346
  50. package/packages/calogin/.DS_Store +0 -0
  51. package/packages/calogin/src/main.vue +412 -412
  52. package/packages/data-table/src/column.vue +988 -988
  53. package/packages/data-table/src/main.vue +1831 -1831
  54. package/packages/date-picker/.DS_Store +0 -0
  55. package/packages/date-picker/src/.DS_Store +0 -0
  56. package/packages/flow/.DS_Store +0 -0
  57. package/packages/flow/src/.DS_Store +0 -0
  58. package/packages/flow/src/component/Circulate.vue +413 -413
  59. package/packages/flow/src/component/CommonOpinions.vue +373 -373
  60. package/packages/flow/src/component/FileList.vue +97 -97
  61. package/packages/flow/src/component/FreeCirculation.vue +240 -240
  62. package/packages/flow/src/component/SendMsg.vue +242 -242
  63. package/packages/flow/src/component/taskUnionExamine.vue +738 -738
  64. package/packages/flow/src/freeStartFlow.vue +2847 -2847
  65. package/packages/flow/src/main.vue +3843 -3843
  66. package/packages/flow/src/processForm.vue +1370 -1366
  67. package/packages/flow/src/processReject.vue +308 -308
  68. package/packages/flow/src/reset.vue +941 -941
  69. package/packages/flow/src/startTaskRead.vue +691 -691
  70. package/packages/flow/src/supervise.vue +159 -159
  71. package/packages/flow-group/src/main.vue +717 -696
  72. package/packages/flow-list/.DS_Store +0 -0
  73. package/packages/flow-list/src/main.vue +1770 -1770
  74. package/packages/form/.DS_Store +0 -0
  75. package/packages/form/src/main.vue +3901 -3901
  76. package/packages/form/src/table.vue +1512 -1512
  77. package/packages/handle-user/src/main.vue +137 -137
  78. package/packages/handler/src/main.vue +496 -496
  79. package/packages/icon/src/main.vue +104 -104
  80. package/packages/login/.DS_Store +0 -0
  81. package/packages/login/src/main.vue +2020 -1994
  82. package/packages/login/src/resetPassword.vue +557 -557
  83. package/packages/main/.DS_Store +0 -0
  84. package/packages/main/src/.DS_Store +0 -0
  85. package/packages/main/src/default/userinfo.vue +502 -502
  86. package/packages/main/src/public/search.vue +464 -464
  87. package/packages/main/src/simplicity/avatar.vue +82 -82
  88. package/packages/main/src/simplicity/handler.vue +263 -263
  89. package/packages/main/src/simplicity/index.vue +2125 -2125
  90. package/packages/main/src/simplicity/user.vue +259 -259
  91. package/packages/main/src/simplicity/userinfo.vue +398 -398
  92. package/packages/menu/.DS_Store +0 -0
  93. package/packages/select/.DS_Store +0 -0
  94. package/packages/select/src/main.vue +782 -782
  95. package/packages/selector/.DS_Store +0 -0
  96. package/packages/selector/src/main.vue +761 -761
  97. package/packages/selector-panel/.DS_Store +0 -0
  98. package/packages/selector-panel/src/main.vue +1027 -1027
  99. package/packages/selector-panel/src/selection.vue +170 -170
  100. package/packages/switch/src/main.vue +170 -170
  101. package/packages/theme-chalk/lib/index.css +1 -1
  102. package/packages/theme-chalk/lib/login.css +1 -1
  103. package/packages/theme-chalk/src/.DS_Store +0 -0
  104. package/packages/theme-chalk/src/flow.scss +351 -351
  105. package/packages/theme-chalk/src/form.scss +501 -501
  106. package/packages/theme-chalk/src/handler.scss +148 -148
  107. package/packages/theme-chalk/src/icon.scss +1817 -1817
  108. package/packages/theme-chalk/src/login.scss +987 -984
  109. package/packages/theme-chalk/src/selector.scss +92 -92
  110. package/packages/theme-chalk/src/simplicity.scss +1366 -1366
  111. package/packages/theme-chalk/src/upload.scss +172 -172
  112. package/packages/upload/.DS_Store +0 -0
  113. package/packages/upload/src/main.vue +1343 -1343
  114. package/src/.DS_Store +0 -0
  115. package/src/config/api.js +315 -315
  116. package/src/index.js +163 -163
  117. package/src/utils/.DS_Store +0 -0
  118. package/src/utils/rules.js +18 -18
  119. package/src/utils/util.js +49 -9
package/lib/main.js CHANGED
@@ -242,16 +242,17 @@ var ajax = function ajax(_ref) {
242
242
  http.interceptors.response.use(function (response) {
243
243
  // delPendingRequest(response.config);
244
244
  loading && loading.close();
245
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
246
- setStorage({
245
+ if (response.headers.authorization) {
246
+ response.headers.authorization !== getStorage('token') && setStorage({
247
+
247
248
  key: ['token', 'Authorization'],
248
249
  value: response.headers.authorization
249
250
  });
250
251
  }
251
252
  var ssId = response.headers.ssId || response.headers.Ssid || response.headers.ssid;
252
253
 
253
- if (ssId && ssId !== getStorage('ssId')) {
254
- setStorage({
254
+ if (ssId) {
255
+ ssId !== getStorage('ssId') && setStorage({
255
256
  key: 'ssId',
256
257
  value: ssId
257
258
  });
@@ -3449,6 +3450,9 @@ var getStorage = function getStorage(key) {
3449
3450
  if (key === 'host' && !res) {
3450
3451
  return win.location.origin;
3451
3452
  }
3453
+ if (!res && key === 'token') {
3454
+ res = getCookie('token');
3455
+ }
3452
3456
  return res;
3453
3457
  }
3454
3458
  var defaults = {};
@@ -3502,11 +3506,48 @@ var removeStorage = function removeStorage(key) {
3502
3506
  * @desc 设置cookie
3503
3507
  * @author huangbo
3504
3508
  * @param {string} [name] cookie名称
3505
- * @return {string} [value] cookie值
3509
+ * @param {string} [value] cookie值
3510
+ * @param {boolean} [isSession] 是否是会话cookie
3506
3511
  **/
3507
3512
  var setCookie = function setCookie(name, value) {
3508
- // 不设置 expires max-age,默认为会话 Cookie
3509
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/';
3513
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3514
+ var time = arguments[3];
3515
+
3516
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
3517
+ try {
3518
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3519
+ ];
3520
+ // 会话/持久Cookie设置
3521
+ if (!isSession) {
3522
+ if (isIE) {
3523
+ // IE使用expires
3524
+ var date = new Date();
3525
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3526
+ cookieParts.push('expires=' + date.toUTCString());
3527
+ } else {
3528
+ // 其他浏览器使用max-age
3529
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3530
+ }
3531
+ }
3532
+ // 内核兼容处理
3533
+ if (isIE) {
3534
+ // IE特殊处理:添加P3P协议头
3535
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3536
+ } else {
3537
+ // 现代浏览器设置
3538
+ cookieParts.push('samesite=lax');
3539
+ if (window.location.protocol === 'https:') {
3540
+ cookieParts.push('secure');
3541
+ }
3542
+ }
3543
+
3544
+ // 设置Cookie
3545
+ document.cookie = cookieParts.join('; ');
3546
+ return true;
3547
+ } catch (e) {
3548
+ console.error('Cookie设置失败:', e);
3549
+ return false;
3550
+ }
3510
3551
  };
3511
3552
 
3512
3553
  /**
@@ -11461,10 +11502,10 @@ var events = [function (tabs, index, that) {
11461
11502
  },
11462
11503
 
11463
11504
  methods: {
11464
- /**
11465
- * @desc:匹配路由
11466
- * @author huangbo
11467
- * @date 2024年9月7日
11505
+ /**
11506
+ * @desc:匹配路由
11507
+ * @author huangbo
11508
+ * @date 2024年9月7日
11468
11509
  **/
11469
11510
  hasRouter: function hasRouter(res, url, code) {
11470
11511
  if (!url) {
@@ -11508,10 +11549,10 @@ var events = [function (tabs, index, that) {
11508
11549
  return false;
11509
11550
  },
11510
11551
 
11511
- /**
11512
- * @desc:获取初始数据
11513
- * @author huangbo
11514
- * @date 2024年9月7日
11552
+ /**
11553
+ * @desc:获取初始数据
11554
+ * @author huangbo
11555
+ * @date 2024年9月7日
11515
11556
  **/
11516
11557
  init: function init(results, first) {
11517
11558
  this.setConfig(results);
@@ -11520,10 +11561,10 @@ var events = [function (tabs, index, that) {
11520
11561
  }
11521
11562
  },
11522
11563
 
11523
- /**
11524
- * @desc:设置用户配置及信息
11525
- * @author huangbo
11526
- * @date 2024年9月7日
11564
+ /**
11565
+ * @desc:设置用户配置及信息
11566
+ * @author huangbo
11567
+ * @date 2024年9月7日
11527
11568
  **/
11528
11569
  setConfig: function setConfig(results) {
11529
11570
  localStorage.setItem('mainConfig', JSON.stringify(results));
@@ -11660,10 +11701,10 @@ var events = [function (tabs, index, that) {
11660
11701
  }
11661
11702
  },
11662
11703
 
11663
- /**
11664
- * @desc:获取所有应用
11665
- * @author huangbo
11666
- * @date 2024年9月7日
11704
+ /**
11705
+ * @desc:获取所有应用
11706
+ * @author huangbo
11707
+ * @date 2024年9月7日
11667
11708
  **/
11668
11709
  getApplications: function getApplications() {
11669
11710
  var _this = this;
@@ -11711,10 +11752,10 @@ var events = [function (tabs, index, that) {
11711
11752
  });
11712
11753
  },
11713
11754
 
11714
- /**
11715
- * @desc:获取菜单列表
11716
- * @author huangbo
11717
- * @date 2024年9月7日
11755
+ /**
11756
+ * @desc:获取菜单列表
11757
+ * @author huangbo
11758
+ * @date 2024年9月7日
11718
11759
  **/
11719
11760
  getMenus: function getMenus(loading) {
11720
11761
  var _this2 = this;
@@ -11747,10 +11788,10 @@ var events = [function (tabs, index, that) {
11747
11788
  });
11748
11789
  },
11749
11790
 
11750
- /**
11751
- * @desc:处理菜单列表
11752
- * @author huangbo
11753
- * @date 2024年9月7日
11791
+ /**
11792
+ * @desc:处理菜单列表
11793
+ * @author huangbo
11794
+ * @date 2024年9月7日
11754
11795
  **/
11755
11796
  renderMenus: function renderMenus(res) {
11756
11797
  this.menus = res;
@@ -11846,10 +11887,10 @@ var events = [function (tabs, index, that) {
11846
11887
  }
11847
11888
  },
11848
11889
 
11849
- /**
11850
- * @desc:设置页面加载类型
11851
- * @author huangbo
11852
- * @date 2024年9月7日
11890
+ /**
11891
+ * @desc:设置页面加载类型
11892
+ * @author huangbo
11893
+ * @date 2024年9月7日
11853
11894
  **/
11854
11895
  setIframeType: function setIframeType(res) {
11855
11896
  var url = res.url;
@@ -11905,10 +11946,10 @@ var events = [function (tabs, index, that) {
11905
11946
  return res;
11906
11947
  },
11907
11948
 
11908
- /**
11909
- * @desc:获取菜单
11910
- * @author huangbo
11911
- * @date 2024年9月7日
11949
+ /**
11950
+ * @desc:获取菜单
11951
+ * @author huangbo
11952
+ * @date 2024年9月7日
11912
11953
  **/
11913
11954
  getMenu: function getMenu(menus, res, key) {
11914
11955
  if (Array.isArray(menus)) {
@@ -11937,10 +11978,10 @@ var events = [function (tabs, index, that) {
11937
11978
  return false;
11938
11979
  },
11939
11980
 
11940
- /**
11941
- * @desc:获取菜单第一条数据
11942
- * @author huangbo
11943
- * @date 2024年9月7日
11981
+ /**
11982
+ * @desc:获取菜单第一条数据
11983
+ * @author huangbo
11984
+ * @date 2024年9月7日
11944
11985
  **/
11945
11986
  getFirst: function getFirst(obj) {
11946
11987
  if (!obj) {
@@ -11959,10 +12000,10 @@ var events = [function (tabs, index, that) {
11959
12000
  }
11960
12001
  },
11961
12002
 
11962
- /**
11963
- * @desc:遍历设置菜单气泡提醒
11964
- * @author huangbo
11965
- * @date 2024年9月7日
12003
+ /**
12004
+ * @desc:遍历设置菜单气泡提醒
12005
+ * @author huangbo
12006
+ * @date 2024年9月7日
11966
12007
  **/
11967
12008
  setTips: function setTips(obj) {
11968
12009
  var _this3 = this;
@@ -12025,10 +12066,10 @@ var events = [function (tabs, index, that) {
12025
12066
  }
12026
12067
  },
12027
12068
 
12028
- /**
12029
- * @desc:获取气泡提醒
12030
- * @author huangbo
12031
- * @date 2024年9月7日
12069
+ /**
12070
+ * @desc:获取气泡提醒
12071
+ * @author huangbo
12072
+ * @date 2024年9月7日
12032
12073
  **/
12033
12074
  getBadge: function getBadge(res) {
12034
12075
  var num = res.tips || 0;
@@ -12042,10 +12083,10 @@ var events = [function (tabs, index, that) {
12042
12083
  };
12043
12084
  },
12044
12085
 
12045
- /**
12046
- * @desc:开启weosocket
12047
- * @author huangbo
12048
- * @date 2024年9月7日
12086
+ /**
12087
+ * @desc:开启weosocket
12088
+ * @author huangbo
12089
+ * @date 2024年9月7日
12049
12090
  **/
12050
12091
  initWebSocket: function initWebSocket() {
12051
12092
  var _this5 = this;
@@ -12094,10 +12135,10 @@ var events = [function (tabs, index, that) {
12094
12135
  });
12095
12136
  },
12096
12137
 
12097
- /**
12098
- * @desc:显示用户信息
12099
- * @author huangbo
12100
- * @date 2024年9月7日
12138
+ /**
12139
+ * @desc:显示用户信息
12140
+ * @author huangbo
12141
+ * @date 2024年9月7日
12101
12142
  **/
12102
12143
  showUserInfo: function showUserInfo() {
12103
12144
  if (this.showUser === false) {
@@ -12105,19 +12146,19 @@ var events = [function (tabs, index, that) {
12105
12146
  }
12106
12147
  },
12107
12148
 
12108
- /**
12109
- * @desc:删除更多应用菜单点击
12110
- * @author huangbo
12111
- * @date 2024年9月7日
12149
+ /**
12150
+ * @desc:删除更多应用菜单点击
12151
+ * @author huangbo
12152
+ * @date 2024年9月7日
12112
12153
  **/
12113
12154
  handleDelete: function handleDelete(index) {
12114
12155
  this.newApps.splice(index, 1);
12115
12156
  },
12116
12157
 
12117
- /**
12118
- * @desc:储存更多应用菜单点击
12119
- * @author huangbo
12120
- * @date 2024年9月7日
12158
+ /**
12159
+ * @desc:储存更多应用菜单点击
12160
+ * @author huangbo
12161
+ * @date 2024年9月7日
12121
12162
  **/
12122
12163
  handlerClickApps: function handlerClickApps(res) {
12123
12164
  if (res.permission === false) {
@@ -12130,10 +12171,10 @@ var events = [function (tabs, index, that) {
12130
12171
  this.handlerClickApp(res);
12131
12172
  },
12132
12173
 
12133
- /**
12134
- * @desc:侧边应用菜单点击
12135
- * @author huangbo
12136
- * @date 2024年9月7日
12174
+ /**
12175
+ * @desc:侧边应用菜单点击
12176
+ * @author huangbo
12177
+ * @date 2024年9月7日
12137
12178
  **/
12138
12179
  handlerClickApp: function handlerClickApp(res) {
12139
12180
  this.showMsg = false;
@@ -12222,10 +12263,10 @@ var events = [function (tabs, index, that) {
12222
12263
  }
12223
12264
  },
12224
12265
 
12225
- /**
12226
- * @desc:显示Drawer界面
12227
- * @author huangbo
12228
- * @date 2024年9月7日
12266
+ /**
12267
+ * @desc:显示Drawer界面
12268
+ * @author huangbo
12269
+ * @date 2024年9月7日
12229
12270
  **/
12230
12271
  handlerSetDrawer: function handlerSetDrawer(res, type) {
12231
12272
  var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
@@ -12245,19 +12286,19 @@ var events = [function (tabs, index, that) {
12245
12286
  }
12246
12287
  },
12247
12288
 
12248
- /**
12249
- * @desc:关闭Drawer界面
12250
- * @author huangbo
12251
- * @date 2024年9月7日
12289
+ /**
12290
+ * @desc:关闭Drawer界面
12291
+ * @author huangbo
12292
+ * @date 2024年9月7日
12252
12293
  **/
12253
12294
  handleCloseDrawer: function handleCloseDrawer() {
12254
12295
  this.drawer = { visible: false };
12255
12296
  },
12256
12297
 
12257
- /**
12258
- * @desc:菜单点击
12259
- * @author huangbo
12260
- * @date 2024年9月7日
12298
+ /**
12299
+ * @desc:菜单点击
12300
+ * @author huangbo
12301
+ * @date 2024年9月7日
12261
12302
  **/
12262
12303
  handlerClickMenu: function handlerClickMenu(res) {
12263
12304
  util["a" /* default */].ajax({
@@ -12306,19 +12347,19 @@ var events = [function (tabs, index, that) {
12306
12347
  },
12307
12348
 
12308
12349
 
12309
- /**
12310
- * @desc:用户详情请求成功
12311
- * @author huangbo
12312
- * @date 2024年9月7日
12350
+ /**
12351
+ * @desc:用户详情请求成功
12352
+ * @author huangbo
12353
+ * @date 2024年9月7日
12313
12354
  **/
12314
12355
  handleSuccess: function handleSuccess(res) {
12315
12356
  this.simpleUserInfo = res.simpleUserInfo;
12316
12357
  },
12317
12358
 
12318
- /**
12319
- * @desc:修改用户配置
12320
- * @author huangbo
12321
- * @date 2024年9月7日
12359
+ /**
12360
+ * @desc:修改用户配置
12361
+ * @author huangbo
12362
+ * @date 2024年9月7日
12322
12363
  **/
12323
12364
  handleChangeConfig: function handleChangeConfig(name, res) {
12324
12365
  if (name == 'userHeadUrl') {
@@ -12334,10 +12375,10 @@ var events = [function (tabs, index, that) {
12334
12375
  }
12335
12376
  },
12336
12377
 
12337
- /**
12338
- * @desc:关闭webSocket
12339
- * @author huangbo
12340
- * @date 2024年9月7日
12378
+ /**
12379
+ * @desc:关闭webSocket
12380
+ * @author huangbo
12381
+ * @date 2024年9月7日
12341
12382
  **/
12342
12383
  handlerClose: function handlerClose() {
12343
12384
  if (this.webSocket) {
@@ -12345,10 +12386,10 @@ var events = [function (tabs, index, that) {
12345
12386
  }
12346
12387
  },
12347
12388
 
12348
- /**
12349
- * @desc:刷新选中iframe页签
12350
- * @author huangbo
12351
- * @date 2024年9月7日
12389
+ /**
12390
+ * @desc:刷新选中iframe页签
12391
+ * @author huangbo
12392
+ * @date 2024年9月7日
12352
12393
  **/
12353
12394
  handleRefresh: function handleRefresh() {
12354
12395
  var i = util["a" /* default */].indexOfObj(this.tabs, this.activeName, 'id');
@@ -12369,10 +12410,10 @@ var events = [function (tabs, index, that) {
12369
12410
  }
12370
12411
  },
12371
12412
 
12372
- /**
12373
- * @desc:删除iframe
12374
- * @author huangbo
12375
- * @date 2024年9月7日
12413
+ /**
12414
+ * @desc:删除iframe
12415
+ * @author huangbo
12416
+ * @date 2024年9月7日
12376
12417
  **/
12377
12418
  handleRemove: function handleRemove(name) {
12378
12419
  var len = this.tabs.length - 1;
@@ -12389,10 +12430,10 @@ var events = [function (tabs, index, that) {
12389
12430
  }
12390
12431
  },
12391
12432
 
12392
- /**
12393
- * @desc:tabs鼠标右键事件
12394
- * @author huangbo
12395
- * @date 2024年9月7日
12433
+ /**
12434
+ * @desc:tabs鼠标右键事件
12435
+ * @author huangbo
12436
+ * @date 2024年9月7日
12396
12437
  **/
12397
12438
  handleContextmenu: function handleContextmenu(tabs, e) {
12398
12439
  var disabled = {};
@@ -12417,10 +12458,10 @@ var events = [function (tabs, index, that) {
12417
12458
  window.addEventListener('click', this.closeTabsEvents);
12418
12459
  },
12419
12460
 
12420
- /**
12421
- * @desc:tabs页签事件
12422
- * @author huangbo
12423
- * @date 2024年9月7日
12461
+ /**
12462
+ * @desc:tabs页签事件
12463
+ * @author huangbo
12464
+ * @date 2024年9月7日
12424
12465
  **/
12425
12466
  handleTabsEvents: function handleTabsEvents(num) {
12426
12467
  if (this.pane !== null) {
@@ -12438,10 +12479,10 @@ var events = [function (tabs, index, that) {
12438
12479
  window.removeEventListener('click', this.closeTabsEvents);
12439
12480
  },
12440
12481
 
12441
- /**
12442
- * @desc:handler工具栏点击事件
12443
- * @author huangbo
12444
- * @date 2024年9月7日
12482
+ /**
12483
+ * @desc:handler工具栏点击事件
12484
+ * @author huangbo
12485
+ * @date 2024年9月7日
12445
12486
  **/
12446
12487
  handleClick: function handleClick(res) {
12447
12488
  var type = res.type,
@@ -12519,10 +12560,10 @@ var events = [function (tabs, index, that) {
12519
12560
  this.$emit('handler-click', res);
12520
12561
  },
12521
12562
 
12522
- /**
12523
- * @desc:退出登录
12524
- * @author huangbo
12525
- * @date 2024年9月7日
12563
+ /**
12564
+ * @desc:退出登录
12565
+ * @author huangbo
12566
+ * @date 2024年9月7日
12526
12567
  **/
12527
12568
  handleQuit: function handleQuit() {
12528
12569
  var _this6 = this;
@@ -12597,10 +12638,10 @@ var events = [function (tabs, index, that) {
12597
12638
  }).catch(function (e) {});
12598
12639
  },
12599
12640
 
12600
- /**
12601
- * @desc:主题、消息回调
12602
- * @author huangbo
12603
- * @date 2024年9月7日
12641
+ /**
12642
+ * @desc:主题、消息回调
12643
+ * @author huangbo
12644
+ * @date 2024年9月7日
12604
12645
  **/
12605
12646
  handleChange: function handleChange(res) {
12606
12647
  var type = res.type,
@@ -12616,10 +12657,10 @@ var events = [function (tabs, index, that) {
12616
12657
  }
12617
12658
  },
12618
12659
 
12619
- /**
12620
- * @desc:菜单布局样式切换
12621
- * @author huangbo
12622
- * @date 2024年9月7日
12660
+ /**
12661
+ * @desc:菜单布局样式切换
12662
+ * @author huangbo
12663
+ * @date 2024年9月7日
12623
12664
  **/
12624
12665
  handleLayout: function handleLayout(res, active) {
12625
12666
  if (active) {
@@ -12628,10 +12669,10 @@ var events = [function (tabs, index, that) {
12628
12669
  this.$emit('chang-layout', res, active);
12629
12670
  },
12630
12671
 
12631
- /**
12632
- * @desc:消息修改总数
12633
- * @author huangbo
12634
- * @date 2024年9月7日
12672
+ /**
12673
+ * @desc:消息修改总数
12674
+ * @author huangbo
12675
+ * @date 2024年9月7日
12635
12676
  **/
12636
12677
  handleMenuTips: function handleMenuTips(id, num) {
12637
12678
  if (num) {
@@ -12642,10 +12683,10 @@ var events = [function (tabs, index, that) {
12642
12683
  }
12643
12684
  },
12644
12685
 
12645
- /**
12646
- * @desc:处理即时消息
12647
- * @author huangbo
12648
- * @date 2024年9月7日
12686
+ /**
12687
+ * @desc:处理即时消息
12688
+ * @author huangbo
12689
+ * @date 2024年9月7日
12649
12690
  **/
12650
12691
  handleOpened: function handleOpened(res) {
12651
12692
  var _this7 = this;
package/lib/nav.js CHANGED
@@ -243,16 +243,17 @@ var ajax = function ajax(_ref) {
243
243
  http.interceptors.response.use(function (response) {
244
244
  // delPendingRequest(response.config);
245
245
  loading && loading.close();
246
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
247
- setStorage({
246
+ if (response.headers.authorization) {
247
+ response.headers.authorization !== getStorage('token') && setStorage({
248
+
248
249
  key: ['token', 'Authorization'],
249
250
  value: response.headers.authorization
250
251
  });
251
252
  }
252
253
  var ssId = response.headers.ssId || response.headers.Ssid || response.headers.ssid;
253
254
 
254
- if (ssId && ssId !== getStorage('ssId')) {
255
- setStorage({
255
+ if (ssId) {
256
+ ssId !== getStorage('ssId') && setStorage({
256
257
  key: 'ssId',
257
258
  value: ssId
258
259
  });
@@ -3450,6 +3451,9 @@ var getStorage = function getStorage(key) {
3450
3451
  if (key === 'host' && !res) {
3451
3452
  return win.location.origin;
3452
3453
  }
3454
+ if (!res && key === 'token') {
3455
+ res = getCookie('token');
3456
+ }
3453
3457
  return res;
3454
3458
  }
3455
3459
  var defaults = {};
@@ -3503,11 +3507,48 @@ var removeStorage = function removeStorage(key) {
3503
3507
  * @desc 设置cookie
3504
3508
  * @author huangbo
3505
3509
  * @param {string} [name] cookie名称
3506
- * @return {string} [value] cookie值
3510
+ * @param {string} [value] cookie值
3511
+ * @param {boolean} [isSession] 是否是会话cookie
3507
3512
  **/
3508
3513
  var setCookie = function setCookie(name, value) {
3509
- // 不设置 expires max-age,默认为会话 Cookie
3510
- document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/';
3514
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3515
+ var time = arguments[3];
3516
+
3517
+ var isIE = /MSIE|Trident/.test(navigator.userAgent);
3518
+ try {
3519
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
3520
+ ];
3521
+ // 会话/持久Cookie设置
3522
+ if (!isSession) {
3523
+ if (isIE) {
3524
+ // IE使用expires
3525
+ var date = new Date();
3526
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
3527
+ cookieParts.push('expires=' + date.toUTCString());
3528
+ } else {
3529
+ // 其他浏览器使用max-age
3530
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
3531
+ }
3532
+ }
3533
+ // 内核兼容处理
3534
+ if (isIE) {
3535
+ // IE特殊处理:添加P3P协议头
3536
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
3537
+ } else {
3538
+ // 现代浏览器设置
3539
+ cookieParts.push('samesite=lax');
3540
+ if (window.location.protocol === 'https:') {
3541
+ cookieParts.push('secure');
3542
+ }
3543
+ }
3544
+
3545
+ // 设置Cookie
3546
+ document.cookie = cookieParts.join('; ');
3547
+ return true;
3548
+ } catch (e) {
3549
+ console.error('Cookie设置失败:', e);
3550
+ return false;
3551
+ }
3511
3552
  };
3512
3553
 
3513
3554
  /**