eoss-ui 0.7.91 → 0.7.93

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 (67) hide show
  1. package/lib/button-group.js +45 -0
  2. package/lib/button.js +45 -0
  3. package/lib/calogin.js +45 -0
  4. package/lib/checkbox-group.js +45 -0
  5. package/lib/data-table-form.js +45 -0
  6. package/lib/data-table.js +58 -8
  7. package/lib/date-picker.js +45 -0
  8. package/lib/dialog.js +52 -11
  9. package/lib/eoss-ui.common.js +290 -175
  10. package/lib/flow-group.js +81 -12
  11. package/lib/flow-list.js +45 -0
  12. package/lib/flow.js +45 -0
  13. package/lib/form.js +45 -0
  14. package/lib/handle-user.js +45 -0
  15. package/lib/handler.js +45 -0
  16. package/lib/icon.js +45 -0
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +45 -0
  19. package/lib/input.js +45 -0
  20. package/lib/login.js +52 -6
  21. package/lib/main.js +160 -87
  22. package/lib/nav.js +45 -0
  23. package/lib/page.js +45 -0
  24. package/lib/pagination.js +48 -3
  25. package/lib/player.js +45 -0
  26. package/lib/qr-code.js +45 -0
  27. package/lib/radio-group.js +45 -0
  28. package/lib/retrial-auth.js +67 -6
  29. package/lib/select-ganged.js +45 -0
  30. package/lib/select.js +45 -0
  31. package/lib/selector-panel.js +45 -0
  32. package/lib/selector.js +45 -0
  33. package/lib/sizer.js +45 -0
  34. package/lib/steps.js +45 -0
  35. package/lib/switch.js +45 -0
  36. package/lib/table-form.js +45 -0
  37. package/lib/tabs.js +45 -0
  38. package/lib/tips.js +45 -0
  39. package/lib/tree-group.js +48 -3
  40. package/lib/tree.js +45 -0
  41. package/lib/upload.js +45 -0
  42. package/lib/utils/util.js +45 -0
  43. package/lib/wujie.js +45 -0
  44. package/lib/wxlogin.js +45 -0
  45. package/package.json +1 -1
  46. package/packages/.DS_Store +0 -0
  47. package/packages/data-table/src/main.vue +8 -4
  48. package/packages/dialog/.DS_Store +0 -0
  49. package/packages/dialog/src/main.vue +5 -11
  50. package/packages/flow/.DS_Store +0 -0
  51. package/packages/flow-group/src/main.vue +34 -12
  52. package/packages/flow-list/.DS_Store +0 -0
  53. package/packages/login/src/main.vue +2 -1
  54. package/packages/main/.DS_Store +0 -0
  55. package/packages/main/src/default/userinfo.vue +22 -14
  56. package/packages/main/src/main.vue +11 -12
  57. package/packages/main/src/simplicity/index.vue +19 -14
  58. package/packages/main/src/simplicity/userinfo.vue +18 -13
  59. package/packages/main/src/simplicityTop/index.vue +1 -1
  60. package/packages/main/src/simplicityTop/userinfo.vue +18 -13
  61. package/packages/pagination/src/main.vue +4 -4
  62. package/packages/retrial-auth/src/main.vue +23 -4
  63. package/packages/select/.DS_Store +0 -0
  64. package/packages/tree-group/src/main.vue +1 -2
  65. package/src/.DS_Store +0 -0
  66. package/src/index.js +1 -1
  67. package/src/utils/util.js +45 -0
package/lib/main.js CHANGED
@@ -2137,6 +2137,10 @@ var getWeekday = function getWeekday(date) {
2137
2137
  var getWinTop = function getWinTop(wind) {
2138
2138
  wind = wind ? wind : window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
2139
2139
  try {
2140
+ // 检查是否已经是顶层窗口,避免无限递归
2141
+ if (wind === wind.parent) {
2142
+ return wind;
2143
+ }
2140
2144
  wind.parent.document;
2141
2145
  return getWinTop(wind.parent);
2142
2146
  } catch (error) {
@@ -2144,6 +2148,46 @@ var getWinTop = function getWinTop(wind) {
2144
2148
  }
2145
2149
  };
2146
2150
 
2151
+ /**
2152
+ * getWinTopProperty
2153
+ * @desc 安全获取顶层窗口的属性,避免跨域访问错误
2154
+ * @param {string} propertyName - 要获取的属性名
2155
+ * @param {any} defaultValue - 默认值,当属性获取失败时返回
2156
+ * @return {any} 属性值或默认值
2157
+ **/
2158
+ var getWinTopProperty = function getWinTopProperty(propertyName, defaultValue) {
2159
+ // 1. 先尝试获取 window.top 的属性
2160
+ try {
2161
+ if (window.top && window.top[propertyName] !== undefined) {
2162
+ return window.top[propertyName];
2163
+ }
2164
+ } catch (topError) {}
2165
+ // window.top 跨域,继续尝试
2166
+
2167
+
2168
+ // 2. 尝试获取同源的最上层窗口的属性
2169
+ try {
2170
+ var sameOriginTop = getWinTop();
2171
+ if (sameOriginTop && sameOriginTop[propertyName] !== undefined) {
2172
+ return sameOriginTop[propertyName];
2173
+ }
2174
+ } catch (sameOriginError) {}
2175
+ // 同源最上层窗口获取失败,继续尝试
2176
+
2177
+
2178
+ // 3. 尝试获取当前窗口的属性
2179
+ try {
2180
+ if (window[propertyName] !== undefined) {
2181
+ return window[propertyName];
2182
+ }
2183
+ } catch (currentWinError) {}
2184
+ // 当前窗口获取失败,返回默认值
2185
+
2186
+
2187
+ // 4. 所有尝试都失败,返回默认值
2188
+ return defaultValue;
2189
+ };
2190
+
2147
2191
  /**
2148
2192
  * getZoom
2149
2193
  * @desc 获取缩放比
@@ -3889,6 +3933,7 @@ var winTopOpen = function winTopOpen(config) {
3889
3933
  getValues: getValues,
3890
3934
  getWeekday: getWeekday,
3891
3935
  getWinTop: getWinTop,
3936
+ getWinTopProperty: getWinTopProperty,
3892
3937
  handlerUrl: handlerUrl,
3893
3938
  hasChars: hasChars,
3894
3939
  hasClass: hasClass,
@@ -5277,7 +5322,7 @@ module.exports = function (css) {
5277
5322
  // ESM COMPAT FLAG
5278
5323
  __webpack_require__.r(__webpack_exports__);
5279
5324
 
5280
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=4e6a76ca&
5325
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=3dbf95b9&
5281
5326
  var render = function () {
5282
5327
  var _vm = this
5283
5328
  var _h = _vm.$createElement
@@ -5428,13 +5473,13 @@ var staticRenderFns = []
5428
5473
  render._withStripped = true
5429
5474
 
5430
5475
 
5431
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=4e6a76ca&
5476
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=3dbf95b9&
5432
5477
 
5433
5478
  // EXTERNAL MODULE: ./src/config/image.js
5434
5479
  var config_image = __webpack_require__(19);
5435
5480
 
5436
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=4f7a89eb&scoped=true&
5437
- var simplicityvue_type_template_id_4f7a89eb_scoped_true_render = function () {
5481
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=8605940a&scoped=true&
5482
+ var simplicityvue_type_template_id_8605940a_scoped_true_render = function () {
5438
5483
  var _vm = this
5439
5484
  var _h = _vm.$createElement
5440
5485
  var _c = _vm._self._c || _h
@@ -6200,11 +6245,11 @@ var simplicityvue_type_template_id_4f7a89eb_scoped_true_render = function () {
6200
6245
  ),
6201
6246
  ])
6202
6247
  }
6203
- var simplicityvue_type_template_id_4f7a89eb_scoped_true_staticRenderFns = []
6204
- simplicityvue_type_template_id_4f7a89eb_scoped_true_render._withStripped = true
6248
+ var simplicityvue_type_template_id_8605940a_scoped_true_staticRenderFns = []
6249
+ simplicityvue_type_template_id_8605940a_scoped_true_render._withStripped = true
6205
6250
 
6206
6251
 
6207
- // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=4f7a89eb&scoped=true&
6252
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=8605940a&scoped=true&
6208
6253
 
6209
6254
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=e722b45c&scoped=true&
6210
6255
  var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
@@ -8457,8 +8502,8 @@ uservue_type_template_id_6bbe7986_scoped_true_render._withStripped = true
8457
8502
 
8458
8503
  // CONCATENATED MODULE: ./packages/main/src/simplicity/user.vue?vue&type=template&id=6bbe7986&scoped=true&
8459
8504
 
8460
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/userinfo.vue?vue&type=template&id=14462712&
8461
- var userinfovue_type_template_id_14462712_render = function () {
8505
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/userinfo.vue?vue&type=template&id=2c473ee6&
8506
+ var userinfovue_type_template_id_2c473ee6_render = function () {
8462
8507
  var _vm = this
8463
8508
  var _h = _vm.$createElement
8464
8509
  var _c = _vm._self._c || _h
@@ -8482,11 +8527,11 @@ var userinfovue_type_template_id_14462712_render = function () {
8482
8527
  2
8483
8528
  )
8484
8529
  }
8485
- var userinfovue_type_template_id_14462712_staticRenderFns = []
8486
- userinfovue_type_template_id_14462712_render._withStripped = true
8530
+ var userinfovue_type_template_id_2c473ee6_staticRenderFns = []
8531
+ userinfovue_type_template_id_2c473ee6_render._withStripped = true
8487
8532
 
8488
8533
 
8489
- // CONCATENATED MODULE: ./packages/main/src/simplicity/userinfo.vue?vue&type=template&id=14462712&
8534
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/userinfo.vue?vue&type=template&id=2c473ee6&
8490
8535
 
8491
8536
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/userinfo.vue?vue&type=script&lang=js&
8492
8537
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -8750,10 +8795,11 @@ var _props;
8750
8795
  }).then(function () {
8751
8796
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
8752
8797
  try {
8798
+ var topWin = util["a" /* default */].getWinTop();
8753
8799
  if (loginPage) {
8754
8800
  var src = void 0;
8755
8801
  if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
8756
- var pathname = util["a" /* default */].getWinTop().location.pathname;
8802
+ var pathname = topWin.location.pathname;
8757
8803
  if (pathname !== '/') {
8758
8804
  pathname = pathname.split('/');
8759
8805
  pathname.splice(pathname.length - 1);
@@ -8765,20 +8811,25 @@ var _props;
8765
8811
  } else {
8766
8812
  src = loginPage;
8767
8813
  }
8768
- util["a" /* default */].getWinTop().location.href = src;
8769
- } else if (util["a" /* default */].getWinTop().location.href.indexOf('main.html') > -1) {
8770
- util["a" /* default */].getWinTop().location.href = './login.html';
8814
+ topWin.location.href = src;
8815
+ } else if (topWin.location.href.indexOf('main.html') > -1) {
8816
+ topWin.location.href = './login.html';
8771
8817
  } else {
8772
- var hash = util["a" /* default */].getWinTop().location.hash;
8818
+ var hash = topWin.location.hash;
8773
8819
  if (hash) {
8774
- var len = util["a" /* default */].getWinTop().location.href.indexOf(hash);
8775
- util["a" /* default */].getWinTop().location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
8820
+ var len = topWin.location.href.indexOf(hash);
8821
+ topWin.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
8776
8822
  } else {
8777
- util["a" /* default */].getWinTop().location.href = '/login.html';
8823
+ topWin.location.href = '/login.html';
8778
8824
  }
8779
8825
  }
8780
8826
  } catch (error) {
8781
- util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
8827
+ console.warn('Failed to handle login redirect:', error);
8828
+ try {
8829
+ util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
8830
+ } catch (postMessageError) {
8831
+ console.warn('Failed to send postMessage:', postMessageError);
8832
+ }
8782
8833
  }
8783
8834
  }).catch(function (e) {});
8784
8835
  } else {
@@ -8818,8 +8869,8 @@ var _props;
8818
8869
 
8819
8870
  var userinfo_component = Object(componentNormalizer["a" /* default */])(
8820
8871
  simplicity_userinfovue_type_script_lang_js_,
8821
- userinfovue_type_template_id_14462712_render,
8822
- userinfovue_type_template_id_14462712_staticRenderFns,
8872
+ userinfovue_type_template_id_2c473ee6_render,
8873
+ userinfovue_type_template_id_2c473ee6_staticRenderFns,
8823
8874
  false,
8824
8875
  null,
8825
8876
  null,
@@ -12227,7 +12278,7 @@ var simplicityvue_type_script_lang_js_extends = Object.assign || function (targe
12227
12278
 
12228
12279
 
12229
12280
  var isIE = /MSIE|Trident/.test(navigator.userAgent);
12230
- var systemMode = util["a" /* default */].win.systemMode || 'default';
12281
+ var systemMode = util["a" /* default */].getWinTopProperty('systemMode', 'default');
12231
12282
 
12232
12283
  var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
12233
12284
  var tab = tabs[index];
@@ -13854,10 +13905,11 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
13854
13905
  } else {
13855
13906
  try {
13856
13907
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
13908
+ var topWin = util["a" /* default */].getWinTop();
13857
13909
  if (loginPage) {
13858
13910
  var _src = void 0;
13859
13911
  if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
13860
- var pathname = util["a" /* default */].getWinTop().location.pathname;
13912
+ var pathname = topWin.location.pathname;
13861
13913
  if (pathname !== '/') {
13862
13914
  pathname = pathname.split('/');
13863
13915
  pathname.splice(pathname.length - 1);
@@ -13869,20 +13921,25 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
13869
13921
  } else {
13870
13922
  _src = loginPage;
13871
13923
  }
13872
- util["a" /* default */].getWinTop().location.href = _src;
13873
- } else if (util["a" /* default */].getWinTop().location.href.indexOf('main.html') > -1) {
13874
- util["a" /* default */].getWinTop().location.href = './login.html';
13924
+ topWin.location.href = _src;
13925
+ } else if (topWin.location.href.indexOf('main.html') > -1) {
13926
+ topWin.location.href = './login.html';
13875
13927
  } else {
13876
- var hash = util["a" /* default */].getWinTop().location.hash;
13928
+ var hash = topWin.location.hash;
13877
13929
  if (hash) {
13878
- var len = util["a" /* default */].getWinTop().location.href.indexOf(hash);
13879
- util["a" /* default */].getWinTop().location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
13930
+ var len = topWin.location.href.indexOf(hash);
13931
+ topWin.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
13880
13932
  } else {
13881
- util["a" /* default */].getWinTop().location.href = '/login.html';
13933
+ topWin.location.href = '/login.html';
13882
13934
  }
13883
13935
  }
13884
13936
  } catch (error) {
13885
- util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
13937
+ console.warn('Failed to handle login redirect:', error);
13938
+ try {
13939
+ util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
13940
+ } catch (postMessageError) {
13941
+ console.warn('Failed to send postMessage:', postMessageError);
13942
+ }
13886
13943
  }
13887
13944
  }
13888
13945
  }
@@ -14071,18 +14128,18 @@ var simplicityvue_type_script_lang_js_events = [function (tabs, index, that) {
14071
14128
 
14072
14129
  var simplicity_component = Object(componentNormalizer["a" /* default */])(
14073
14130
  src_simplicityvue_type_script_lang_js_,
14074
- simplicityvue_type_template_id_4f7a89eb_scoped_true_render,
14075
- simplicityvue_type_template_id_4f7a89eb_scoped_true_staticRenderFns,
14131
+ simplicityvue_type_template_id_8605940a_scoped_true_render,
14132
+ simplicityvue_type_template_id_8605940a_scoped_true_staticRenderFns,
14076
14133
  false,
14077
14134
  null,
14078
- "4f7a89eb",
14135
+ "8605940a",
14079
14136
  null
14080
14137
 
14081
14138
  )
14082
14139
 
14083
14140
  /* harmony default export */ var simplicity = (simplicity_component.exports);
14084
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=58443c19&scoped=true&
14085
- var simplicityTopvue_type_template_id_58443c19_scoped_true_render = function () {
14141
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/index.vue?vue&type=template&id=20c08436&scoped=true&
14142
+ var simplicityTopvue_type_template_id_20c08436_scoped_true_render = function () {
14086
14143
  var _vm = this
14087
14144
  var _h = _vm.$createElement
14088
14145
  var _c = _vm._self._c || _h
@@ -14649,11 +14706,11 @@ var simplicityTopvue_type_template_id_58443c19_scoped_true_render = function ()
14649
14706
  1
14650
14707
  )
14651
14708
  }
14652
- var simplicityTopvue_type_template_id_58443c19_scoped_true_staticRenderFns = []
14653
- simplicityTopvue_type_template_id_58443c19_scoped_true_render._withStripped = true
14709
+ var simplicityTopvue_type_template_id_20c08436_scoped_true_staticRenderFns = []
14710
+ simplicityTopvue_type_template_id_20c08436_scoped_true_render._withStripped = true
14654
14711
 
14655
14712
 
14656
- // CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=58443c19&scoped=true&
14713
+ // CONCATENATED MODULE: ./packages/main/src/simplicityTop/index.vue?vue&type=template&id=20c08436&scoped=true&
14657
14714
 
14658
14715
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
14659
14716
  var regenerator_ = __webpack_require__(4);
@@ -15304,8 +15361,8 @@ uservue_type_template_id_22bc2a9d_scoped_true_render._withStripped = true
15304
15361
 
15305
15362
  // CONCATENATED MODULE: ./packages/main/src/simplicityTop/user.vue?vue&type=template&id=22bc2a9d&scoped=true&
15306
15363
 
15307
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/userinfo.vue?vue&type=template&id=a05f8be4&
15308
- var userinfovue_type_template_id_a05f8be4_render = function () {
15364
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/userinfo.vue?vue&type=template&id=664c5306&
15365
+ var userinfovue_type_template_id_664c5306_render = function () {
15309
15366
  var _vm = this
15310
15367
  var _h = _vm.$createElement
15311
15368
  var _c = _vm._self._c || _h
@@ -15329,11 +15386,11 @@ var userinfovue_type_template_id_a05f8be4_render = function () {
15329
15386
  2
15330
15387
  )
15331
15388
  }
15332
- var userinfovue_type_template_id_a05f8be4_staticRenderFns = []
15333
- userinfovue_type_template_id_a05f8be4_render._withStripped = true
15389
+ var userinfovue_type_template_id_664c5306_staticRenderFns = []
15390
+ userinfovue_type_template_id_664c5306_render._withStripped = true
15334
15391
 
15335
15392
 
15336
- // CONCATENATED MODULE: ./packages/main/src/simplicityTop/userinfo.vue?vue&type=template&id=a05f8be4&
15393
+ // CONCATENATED MODULE: ./packages/main/src/simplicityTop/userinfo.vue?vue&type=template&id=664c5306&
15337
15394
 
15338
15395
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicityTop/userinfo.vue?vue&type=script&lang=js&
15339
15396
  var userinfovue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -15597,10 +15654,11 @@ var userinfovue_type_script_lang_js_props;
15597
15654
  }).then(function () {
15598
15655
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
15599
15656
  try {
15657
+ var topWin = util["a" /* default */].getWinTop();
15600
15658
  if (loginPage) {
15601
15659
  var src = void 0;
15602
15660
  if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
15603
- var pathname = util["a" /* default */].getWinTop().location.pathname;
15661
+ var pathname = topWin.location.pathname;
15604
15662
  if (pathname !== '/') {
15605
15663
  pathname = pathname.split('/');
15606
15664
  pathname.splice(pathname.length - 1);
@@ -15612,20 +15670,25 @@ var userinfovue_type_script_lang_js_props;
15612
15670
  } else {
15613
15671
  src = loginPage;
15614
15672
  }
15615
- util["a" /* default */].getWinTop().location.href = src;
15616
- } else if (util["a" /* default */].getWinTop().location.href.indexOf('main.html') > -1) {
15617
- util["a" /* default */].getWinTop().location.href = './login.html';
15673
+ topWin.location.href = src;
15674
+ } else if (topWin.location.href.indexOf('main.html') > -1) {
15675
+ topWin.location.href = './login.html';
15618
15676
  } else {
15619
- var hash = util["a" /* default */].getWinTop().location.hash;
15677
+ var hash = topWin.location.hash;
15620
15678
  if (hash) {
15621
- var len = util["a" /* default */].getWinTop().location.href.indexOf(hash);
15622
- util["a" /* default */].getWinTop().location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
15679
+ var len = topWin.location.href.indexOf(hash);
15680
+ topWin.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
15623
15681
  } else {
15624
- util["a" /* default */].getWinTop().location.href = '/login.html';
15682
+ topWin.location.href = '/login.html';
15625
15683
  }
15626
15684
  }
15627
15685
  } catch (error) {
15628
- util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
15686
+ console.warn('Failed to handle login redirect:', error);
15687
+ try {
15688
+ util["a" /* default */].getWinTop().postMessage({ type: 1 }, '*');
15689
+ } catch (postMessageError) {
15690
+ console.warn('Failed to send postMessage:', postMessageError);
15691
+ }
15629
15692
  }
15630
15693
  }).catch(function (e) {});
15631
15694
  } else {
@@ -15665,8 +15728,8 @@ var userinfovue_type_script_lang_js_props;
15665
15728
 
15666
15729
  var simplicityTop_userinfo_component = Object(componentNormalizer["a" /* default */])(
15667
15730
  src_simplicityTop_userinfovue_type_script_lang_js_,
15668
- userinfovue_type_template_id_a05f8be4_render,
15669
- userinfovue_type_template_id_a05f8be4_staticRenderFns,
15731
+ userinfovue_type_template_id_664c5306_render,
15732
+ userinfovue_type_template_id_664c5306_staticRenderFns,
15670
15733
  false,
15671
15734
  null,
15672
15735
  null,
@@ -17258,7 +17321,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
17258
17321
 
17259
17322
 
17260
17323
  var simplicityTopvue_type_script_lang_js_isIE = /MSIE|Trident/.test(navigator.userAgent);
17261
- var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].win.systemMode || 'default';
17324
+ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].getWinTopProperty('systemMode', 'default');
17262
17325
  // let events = [
17263
17326
  // (tabs, index, that) => {
17264
17327
  // let tab = tabs[index];
@@ -19517,11 +19580,11 @@ var simplicityTopvue_type_script_lang_js_systemMode = util["a" /* default */].wi
19517
19580
 
19518
19581
  var simplicityTop_component = Object(componentNormalizer["a" /* default */])(
19519
19582
  src_simplicityTopvue_type_script_lang_js_,
19520
- simplicityTopvue_type_template_id_58443c19_scoped_true_render,
19521
- simplicityTopvue_type_template_id_58443c19_scoped_true_staticRenderFns,
19583
+ simplicityTopvue_type_template_id_20c08436_scoped_true_render,
19584
+ simplicityTopvue_type_template_id_20c08436_scoped_true_staticRenderFns,
19522
19585
  false,
19523
19586
  null,
19524
- "58443c19",
19587
+ "20c08436",
19525
19588
  null
19526
19589
 
19527
19590
  )
@@ -20085,8 +20148,8 @@ defaultvue_type_template_id_b6763862_render._withStripped = true
20085
20148
 
20086
20149
  // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=b6763862&
20087
20150
 
20088
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=template&id=d096642a&
20089
- var userinfovue_type_template_id_d096642a_render = function () {
20151
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=template&id=7e14e68e&
20152
+ var userinfovue_type_template_id_7e14e68e_render = function () {
20090
20153
  var _vm = this
20091
20154
  var _h = _vm.$createElement
20092
20155
  var _c = _vm._self._c || _h
@@ -20102,11 +20165,11 @@ var userinfovue_type_template_id_d096642a_render = function () {
20102
20165
  2
20103
20166
  )
20104
20167
  }
20105
- var userinfovue_type_template_id_d096642a_staticRenderFns = []
20106
- userinfovue_type_template_id_d096642a_render._withStripped = true
20168
+ var userinfovue_type_template_id_7e14e68e_staticRenderFns = []
20169
+ userinfovue_type_template_id_7e14e68e_render._withStripped = true
20107
20170
 
20108
20171
 
20109
- // CONCATENATED MODULE: ./packages/main/src/default/userinfo.vue?vue&type=template&id=d096642a&
20172
+ // CONCATENATED MODULE: ./packages/main/src/default/userinfo.vue?vue&type=template&id=7e14e68e&
20110
20173
 
20111
20174
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=script&lang=js&
20112
20175
  var default_userinfovue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -20472,11 +20535,12 @@ var default_userinfovue_type_script_lang_js_extends = Object.assign || function
20472
20535
  type: 'warning'
20473
20536
  }).then(function () {
20474
20537
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
20538
+ var topWin = util["a" /* default */].getWinTop();
20475
20539
  try {
20476
20540
  if (loginPage) {
20477
20541
  var src = void 0;
20478
20542
  if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
20479
- var pathname = util["a" /* default */].getWinTop().location.pathname;
20543
+ var pathname = topWin.location.pathname;
20480
20544
  if (pathname !== '/') {
20481
20545
  pathname = pathname.split('/');
20482
20546
  pathname.splice(pathname.length - 1);
@@ -20488,19 +20552,27 @@ var default_userinfovue_type_script_lang_js_extends = Object.assign || function
20488
20552
  } else {
20489
20553
  src = loginPage;
20490
20554
  }
20491
- util["a" /* default */].getWinTop().location.href = src;
20492
- } else if (util["a" /* default */].getWinTop().location.href.indexOf('main.html') > -1) {
20493
- util["a" /* default */].getWinTop().location.href = './login.html';
20555
+ topWin.location.href = src;
20556
+ } else if (topWin.location.href.indexOf('main.html') > -1) {
20557
+ topWin.location.href = './login.html';
20494
20558
  } else {
20495
- var hash = util["a" /* default */].getWinTop().location.hash;
20559
+ var hash = topWin.location.hash;
20496
20560
  if (hash) {
20497
- var len = util["a" /* default */].getWinTop().location.href.indexOf(hash);
20498
- util["a" /* default */].getWinTop().location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
20561
+ var len = topWin.location.href.indexOf(hash);
20562
+ topWin.location.href = topWin.location.href.slice(0, len) + '#/login';
20499
20563
  } else {
20500
- util["a" /* default */].getWinTop().location.href = '/login.html';
20564
+ topWin.location.href = '/login.html';
20501
20565
  }
20502
20566
  }
20503
- } catch (error) {}
20567
+ } catch (error) {
20568
+ console.warn('Failed to handle login redirect:', error);
20569
+ try {
20570
+ // Fallback to postMessage if direct access fails
20571
+ topWin.postMessage({ type: 1 }, '*');
20572
+ } catch (postMessageError) {
20573
+ console.warn('Failed to send postMessage:', postMessageError);
20574
+ }
20575
+ }
20504
20576
  }).catch(function (e) {});
20505
20577
  } else {
20506
20578
  var notify = _this4.values.notify.sort().join(',');
@@ -20566,8 +20638,8 @@ var default_userinfovue_type_script_lang_js_extends = Object.assign || function
20566
20638
 
20567
20639
  var default_userinfo_component = Object(componentNormalizer["a" /* default */])(
20568
20640
  src_default_userinfovue_type_script_lang_js_,
20569
- userinfovue_type_template_id_d096642a_render,
20570
- userinfovue_type_template_id_d096642a_staticRenderFns,
20641
+ userinfovue_type_template_id_7e14e68e_render,
20642
+ userinfovue_type_template_id_7e14e68e_staticRenderFns,
20571
20643
  false,
20572
20644
  null,
20573
20645
  null,
@@ -23766,12 +23838,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
23766
23838
  } else if (window.location.href.indexOf('main.html') > -1 || window.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
23767
23839
  window.location.href = './login.html';
23768
23840
  } else {
23769
- next('/login');
23841
+ this.$router.replace('/login');
23770
23842
  }
23771
23843
  } else if (window.location.href.indexOf('main.html') > -1) {
23772
23844
  window.location.href = './login.html';
23773
23845
  } else {
23774
- next('/login');
23846
+ this.$router.replace('/login');
23775
23847
  }
23776
23848
  }
23777
23849
  },
@@ -23877,10 +23949,11 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
23877
23949
  util["a" /* default */].removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
23878
23950
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
23879
23951
  try {
23952
+ var topWin = util["a" /* default */].getWinTop();
23880
23953
  if (loginPage) {
23881
23954
  var src = void 0;
23882
23955
  if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
23883
- var pathname = util["a" /* default */].getWinTop().location.pathname;
23956
+ var pathname = topWin.location.pathname;
23884
23957
  if (pathname !== '/') {
23885
23958
  pathname = pathname.split('/');
23886
23959
  pathname.splice(pathname.length - 1);
@@ -23892,16 +23965,16 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
23892
23965
  } else {
23893
23966
  src = loginPage;
23894
23967
  }
23895
- util["a" /* default */].getWinTop().location.href = src;
23896
- } else if (util["a" /* default */].getWinTop().location.href.indexOf('main.html') > -1) {
23897
- util["a" /* default */].getWinTop().location.href = './login.html';
23968
+ topWin.location.href = src;
23969
+ } else if (topWin.location.href.indexOf('main.html') > -1) {
23970
+ topWin.location.href = './login.html';
23898
23971
  } else {
23899
- var hash = util["a" /* default */].getWinTop().location.hash;
23972
+ var hash = topWin.location.hash;
23900
23973
  if (hash) {
23901
- var len = util["a" /* default */].getWinTop().location.href.indexOf(hash);
23902
- util["a" /* default */].getWinTop().location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
23974
+ var len = topWin.location.href.indexOf(hash);
23975
+ topWin.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
23903
23976
  } else {
23904
- util["a" /* default */].getWinTop().location.href = '/login.html';
23977
+ topWin.location.href = '/login.html';
23905
23978
  }
23906
23979
  }
23907
23980
  } catch (error) {}
package/lib/nav.js CHANGED
@@ -2138,6 +2138,10 @@ var getWeekday = function getWeekday(date) {
2138
2138
  var getWinTop = function getWinTop(wind) {
2139
2139
  wind = wind ? wind : window.__WUJIE_RAW_WINDOW__ ? window.__WUJIE_RAW_WINDOW__ : window;
2140
2140
  try {
2141
+ // 检查是否已经是顶层窗口,避免无限递归
2142
+ if (wind === wind.parent) {
2143
+ return wind;
2144
+ }
2141
2145
  wind.parent.document;
2142
2146
  return getWinTop(wind.parent);
2143
2147
  } catch (error) {
@@ -2145,6 +2149,46 @@ var getWinTop = function getWinTop(wind) {
2145
2149
  }
2146
2150
  };
2147
2151
 
2152
+ /**
2153
+ * getWinTopProperty
2154
+ * @desc 安全获取顶层窗口的属性,避免跨域访问错误
2155
+ * @param {string} propertyName - 要获取的属性名
2156
+ * @param {any} defaultValue - 默认值,当属性获取失败时返回
2157
+ * @return {any} 属性值或默认值
2158
+ **/
2159
+ var getWinTopProperty = function getWinTopProperty(propertyName, defaultValue) {
2160
+ // 1. 先尝试获取 window.top 的属性
2161
+ try {
2162
+ if (window.top && window.top[propertyName] !== undefined) {
2163
+ return window.top[propertyName];
2164
+ }
2165
+ } catch (topError) {}
2166
+ // window.top 跨域,继续尝试
2167
+
2168
+
2169
+ // 2. 尝试获取同源的最上层窗口的属性
2170
+ try {
2171
+ var sameOriginTop = getWinTop();
2172
+ if (sameOriginTop && sameOriginTop[propertyName] !== undefined) {
2173
+ return sameOriginTop[propertyName];
2174
+ }
2175
+ } catch (sameOriginError) {}
2176
+ // 同源最上层窗口获取失败,继续尝试
2177
+
2178
+
2179
+ // 3. 尝试获取当前窗口的属性
2180
+ try {
2181
+ if (window[propertyName] !== undefined) {
2182
+ return window[propertyName];
2183
+ }
2184
+ } catch (currentWinError) {}
2185
+ // 当前窗口获取失败,返回默认值
2186
+
2187
+
2188
+ // 4. 所有尝试都失败,返回默认值
2189
+ return defaultValue;
2190
+ };
2191
+
2148
2192
  /**
2149
2193
  * getZoom
2150
2194
  * @desc 获取缩放比
@@ -3890,6 +3934,7 @@ var winTopOpen = function winTopOpen(config) {
3890
3934
  getValues: getValues,
3891
3935
  getWeekday: getWeekday,
3892
3936
  getWinTop: getWinTop,
3937
+ getWinTopProperty: getWinTopProperty,
3893
3938
  handlerUrl: handlerUrl,
3894
3939
  hasChars: hasChars,
3895
3940
  hasClass: hasClass,