eoss-ui 0.6.75 → 0.6.77

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 (66) hide show
  1. package/lib/button-group.js +30 -8
  2. package/lib/button.js +30 -8
  3. package/lib/calogin.js +30 -8
  4. package/lib/checkbox-group.js +30 -8
  5. package/lib/data-table-form.js +30 -8
  6. package/lib/data-table.js +30 -8
  7. package/lib/date-picker.js +30 -8
  8. package/lib/dialog.js +30 -8
  9. package/lib/eoss-ui.common.js +239 -179
  10. package/lib/flow-group.js +30 -8
  11. package/lib/flow-list.js +30 -8
  12. package/lib/flow.js +30 -8
  13. package/lib/form.js +50 -10
  14. package/lib/handle-user.js +30 -8
  15. package/lib/handler.js +30 -8
  16. package/lib/icon.js +30 -8
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +30 -8
  19. package/lib/input.js +30 -8
  20. package/lib/login.js +30 -8
  21. package/lib/main.js +180 -138
  22. package/lib/nav.js +30 -8
  23. package/lib/page.js +30 -8
  24. package/lib/pagination.js +30 -8
  25. package/lib/player.js +30 -8
  26. package/lib/qr-code.js +30 -8
  27. package/lib/radio-group.js +30 -8
  28. package/lib/retrial-auth.js +30 -8
  29. package/lib/select-ganged.js +30 -8
  30. package/lib/select.js +30 -8
  31. package/lib/selector-panel.js +30 -8
  32. package/lib/selector.js +30 -8
  33. package/lib/sizer.js +30 -8
  34. package/lib/steps.js +30 -8
  35. package/lib/switch.js +30 -8
  36. package/lib/table-form.js +30 -8
  37. package/lib/tabs.js +30 -8
  38. package/lib/theme-chalk/form.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/upload.css +1 -1
  41. package/lib/tips.js +30 -8
  42. package/lib/tree-group.js +30 -8
  43. package/lib/tree.js +30 -8
  44. package/lib/upload.js +30 -8
  45. package/lib/utils/util.js +26 -4
  46. package/lib/wujie.js +30 -8
  47. package/lib/wxlogin.js +30 -8
  48. package/package.json +2 -2
  49. package/packages/.DS_Store +0 -0
  50. package/packages/form/.DS_Store +0 -0
  51. package/packages/form/src/main.vue +1 -0
  52. package/packages/login/.DS_Store +0 -0
  53. package/packages/main/.DS_Store +0 -0
  54. package/packages/main/src/.DS_Store +0 -0
  55. package/packages/main/src/default/index.vue +42 -40
  56. package/packages/main/src/main.vue +107 -85
  57. package/packages/main/src/simplicity/index.vue +5 -2
  58. package/packages/theme-chalk/lib/form.css +1 -1
  59. package/packages/theme-chalk/lib/index.css +1 -1
  60. package/packages/theme-chalk/lib/upload.css +1 -1
  61. package/packages/theme-chalk/src/form.scss +3 -0
  62. package/packages/theme-chalk/src/upload.scss +6 -2
  63. package/packages/upload/.DS_Store +0 -0
  64. package/src/.DS_Store +0 -0
  65. package/src/index.js +1 -1
  66. package/src/utils/util.js +39 -3
package/lib/main.js CHANGED
@@ -122,8 +122,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
122
122
  **/
123
123
 
124
124
  /* eslint-disable indent */
125
- var sm2 = __webpack_require__(13).sm2;
126
- var lodash = __webpack_require__(12);
125
+ var sm2 = __webpack_require__(12).sm2;
126
+ var lodash = __webpack_require__(13);
127
127
 
128
128
 
129
129
 
@@ -2365,7 +2365,7 @@ var isLogined = function () {
2365
2365
  cookie = _ref11.cookie,
2366
2366
  loginPage = _ref11.loginPage,
2367
2367
  redirect = _ref11.redirect;
2368
- var quit, pathname, path, token, loadingInstance;
2368
+ var quit, pathname, path, token, loadingInstance, referrerUrl;
2369
2369
  return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2370
2370
  while (1) {
2371
2371
  switch (_context.prev = _context.next) {
@@ -2493,7 +2493,14 @@ var isLogined = function () {
2493
2493
  if (loginPage) {
2494
2494
  win.top.location.replace(loginPage);
2495
2495
  } else if (document.referrer) {
2496
- win.top.location.replace(document.referrer);
2496
+ var referrerUrl = new URL(document.referrer);
2497
+ if (referrerUrl.host !== win.top.location.host) {
2498
+ win.top.location.replace(document.referrer);
2499
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2500
+ win.top.location.href = './login.html';
2501
+ } else {
2502
+ next('/login');
2503
+ }
2497
2504
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2498
2505
  win.top.location.href = './login.html';
2499
2506
  } else {
@@ -2516,7 +2523,14 @@ var isLogined = function () {
2516
2523
  if (loginPage) {
2517
2524
  win.top.location.replace(loginPage);
2518
2525
  } else if (document.referrer) {
2519
- win.top.location.replace(document.referrer);
2526
+ var referrerUrl = new URL(document.referrer);
2527
+ if (referrerUrl.host !== win.top.location.host) {
2528
+ win.top.location.replace(document.referrer);
2529
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2530
+ win.top.location.href = './login.html';
2531
+ } else {
2532
+ next('/login');
2533
+ }
2520
2534
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2521
2535
  win.top.location.href = './login.html';
2522
2536
  } else {
@@ -2549,7 +2563,15 @@ var isLogined = function () {
2549
2563
  if (loginPage) {
2550
2564
  win.top.location.replace(loginPage);
2551
2565
  } else if (document.referrer) {
2552
- win.top.location.replace(document.referrer);
2566
+ referrerUrl = new URL(document.referrer);
2567
+
2568
+ if (referrerUrl.host !== win.top.location.host) {
2569
+ win.top.location.replace(document.referrer);
2570
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2571
+ win.top.location.href = './login.html';
2572
+ } else {
2573
+ next('/login');
2574
+ }
2553
2575
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2554
2576
  win.top.location.href = './login.html';
2555
2577
  } else {
@@ -4240,13 +4262,13 @@ module.exports = require("ua-parser-js");
4240
4262
  /* 12 */
4241
4263
  /***/ (function(module, exports) {
4242
4264
 
4243
- module.exports = require("lodash");
4265
+ module.exports = require("sm-crypto");
4244
4266
 
4245
4267
  /***/ }),
4246
4268
  /* 13 */
4247
4269
  /***/ (function(module, exports) {
4248
4270
 
4249
- module.exports = require("sm-crypto");
4271
+ module.exports = require("lodash");
4250
4272
 
4251
4273
  /***/ }),
4252
4274
  /* 14 */
@@ -4316,7 +4338,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
4316
4338
  // ESM COMPAT FLAG
4317
4339
  __webpack_require__.r(__webpack_exports__);
4318
4340
 
4319
- // 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=2c29aadc&
4341
+ // 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=88d82eac&
4320
4342
  var render = function () {
4321
4343
  var _vm = this
4322
4344
  var _h = _vm.$createElement
@@ -4414,13 +4436,13 @@ var staticRenderFns = []
4414
4436
  render._withStripped = true
4415
4437
 
4416
4438
 
4417
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=2c29aadc&
4439
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=88d82eac&
4418
4440
 
4419
4441
  // EXTERNAL MODULE: ./src/config/image.js
4420
4442
  var config_image = __webpack_require__(20);
4421
4443
 
4422
- // 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=532a2b35&scoped=true&
4423
- var simplicityvue_type_template_id_532a2b35_scoped_true_render = function () {
4444
+ // 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=634782ec&scoped=true&
4445
+ var simplicityvue_type_template_id_634782ec_scoped_true_render = function () {
4424
4446
  var _vm = this
4425
4447
  var _h = _vm.$createElement
4426
4448
  var _c = _vm._self._c || _h
@@ -5086,11 +5108,11 @@ var simplicityvue_type_template_id_532a2b35_scoped_true_render = function () {
5086
5108
  ),
5087
5109
  ])
5088
5110
  }
5089
- var simplicityvue_type_template_id_532a2b35_scoped_true_staticRenderFns = []
5090
- simplicityvue_type_template_id_532a2b35_scoped_true_render._withStripped = true
5111
+ var simplicityvue_type_template_id_634782ec_scoped_true_staticRenderFns = []
5112
+ simplicityvue_type_template_id_634782ec_scoped_true_render._withStripped = true
5091
5113
 
5092
5114
 
5093
- // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=532a2b35&scoped=true&
5115
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=634782ec&scoped=true&
5094
5116
 
5095
5117
  // 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&
5096
5118
  var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
@@ -11553,6 +11575,7 @@ var events = [function (tabs, index, that) {
11553
11575
  } else {
11554
11576
  this.subMenus = null;
11555
11577
  this.showMenu = false;
11578
+ this.$message.error('未分配菜单权限,请联系管理员!');
11556
11579
  }
11557
11580
  } else {
11558
11581
  var _subMenus = this.getMenu(this.menus, this.appCode, 'appCode');
@@ -11574,6 +11597,7 @@ var events = [function (tabs, index, that) {
11574
11597
  } else {
11575
11598
  this.subMenus = null;
11576
11599
  this.showMenu = false;
11600
+ this.$message.error('未分配菜单权限,请联系管理员!');
11577
11601
  }
11578
11602
  }
11579
11603
  } else if (this.initApps && this.initApps.length && !this.indexUrl) {
@@ -11823,8 +11847,9 @@ var events = [function (tabs, index, that) {
11823
11847
  _this5.$store.commit('websocket', data);
11824
11848
  } catch (error) {}
11825
11849
  }
11826
- if (_this5.$eventBus) {
11827
- _this5.$eventBus.$emit('websocket', data);
11850
+ var bus = _this5.bus || _this5.$eventBus || _this5.$root.Bus;
11851
+ if (bus) {
11852
+ bus.$emit('websocket', data);
11828
11853
  }
11829
11854
  if (util["a" /* default */].win.eventBus) {
11830
11855
  util["a" /* default */].win.eventBus.$emit('websocket', data);
@@ -12508,18 +12533,18 @@ var events = [function (tabs, index, that) {
12508
12533
 
12509
12534
  var simplicity_component = Object(componentNormalizer["a" /* default */])(
12510
12535
  src_simplicityvue_type_script_lang_js_,
12511
- simplicityvue_type_template_id_532a2b35_scoped_true_render,
12512
- simplicityvue_type_template_id_532a2b35_scoped_true_staticRenderFns,
12536
+ simplicityvue_type_template_id_634782ec_scoped_true_render,
12537
+ simplicityvue_type_template_id_634782ec_scoped_true_staticRenderFns,
12513
12538
  false,
12514
12539
  null,
12515
- "532a2b35",
12540
+ "634782ec",
12516
12541
  null
12517
12542
 
12518
12543
  )
12519
12544
 
12520
12545
  /* harmony default export */ var simplicity = (simplicity_component.exports);
12521
- // 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/index.vue?vue&type=template&id=5f979f7b&
12522
- var defaultvue_type_template_id_5f979f7b_render = function () {
12546
+ // 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/index.vue?vue&type=template&id=377c361a&
12547
+ var defaultvue_type_template_id_377c361a_render = function () {
12523
12548
  var _vm = this
12524
12549
  var _h = _vm.$createElement
12525
12550
  var _c = _vm._self._c || _h
@@ -13070,11 +13095,11 @@ var defaultvue_type_template_id_5f979f7b_render = function () {
13070
13095
  1
13071
13096
  )
13072
13097
  }
13073
- var defaultvue_type_template_id_5f979f7b_staticRenderFns = []
13074
- defaultvue_type_template_id_5f979f7b_render._withStripped = true
13098
+ var defaultvue_type_template_id_377c361a_staticRenderFns = []
13099
+ defaultvue_type_template_id_377c361a_render._withStripped = true
13075
13100
 
13076
13101
 
13077
- // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=5f979f7b&
13102
+ // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=377c361a&
13078
13103
 
13079
13104
  // 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=516cb128&
13080
13105
  var userinfovue_type_template_id_516cb128_render = function () {
@@ -15235,29 +15260,6 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15235
15260
  }
15236
15261
  if (i === 'indexUrl' && results[i]) {
15237
15262
  this.homePage = results[i];
15238
- if (this.isLoadHomePage) {
15239
- var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
15240
- var hash = util["a" /* default */].win.location.hash;
15241
- if (hash) {
15242
- hash = hash.split('?')[0];
15243
- }
15244
- var jump = sessionStorage.getItem('jump');
15245
- if (!applicationid && !this.menuCode && (!jump || !this.isHistory) && (hash === '#/' || hash === '#/main') || jump == results[i]) {
15246
- if (this.isHomePage) {
15247
- if (this.menus && this.menus.length) {
15248
- var ids = ids = this.getId(this.menus, this.homePage);
15249
- if (ids) {
15250
- this.defaultActive = ids;
15251
- } else {
15252
- this.handleJump(this.homePage);
15253
- }
15254
- this.setMenu(this.menus);
15255
- }
15256
- }
15257
- } else if (this.menus && this.menus.length) {
15258
- this.setMenu(this.menus);
15259
- }
15260
- }
15261
15263
  }
15262
15264
  if (i === 'doorIndex' && results[i]) {
15263
15265
  window.open(results[i]);
@@ -15273,13 +15275,15 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15273
15275
  localStorage.setItem('sysLogoIco', results[i]);
15274
15276
  util["a" /* default */].setFavicon(results[i]);
15275
15277
  }
15276
- if (i === 'userStyle' && results[i] && results[i].color) {
15277
- var color = unescape(results[i].color).toLowerCase();
15278
- if (util["a" /* default */].startWith(color, '#')) {
15279
- this.color = color;
15278
+ if (i === 'userStyle' && results[i]) {
15279
+ if (results[i].color) {
15280
+ var color = unescape(results[i].color).toLowerCase();
15281
+ if (util["a" /* default */].startWith(color, '#')) {
15282
+ this.color = color;
15283
+ }
15280
15284
  }
15281
15285
  if (results[i].indexUrl) {
15282
- this.indexUrl = results[i].indexUrl;
15286
+ this.homePage = results[i].indexUrl;
15283
15287
  }
15284
15288
  }
15285
15289
  if (i === 'subsystemExtend' && results[i]) {
@@ -15349,13 +15353,36 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15349
15353
  }
15350
15354
  store["a" /* default */].set(i, results[i]);
15351
15355
  }
15356
+ if (this.isLoadHomePage && this.homePage) {
15357
+ var applicationid = util["a" /* default */].getParams('applicationid') || util["a" /* default */].getParams('applicationId');
15358
+ var hash = util["a" /* default */].win.location.hash;
15359
+ if (hash) {
15360
+ hash = hash.split('?')[0];
15361
+ }
15362
+ var jump = sessionStorage.getItem('jump');
15363
+ if (!applicationid && !this.menuCode && (!jump || !this.isHistory) && (hash === '#/' || hash === '#/main') || jump == this.homePage) {
15364
+ if (this.isHomePage) {
15365
+ if (this.menus && this.menus.length) {
15366
+ var ids = ids = this.getId(this.menus, this.homePage);
15367
+ if (ids) {
15368
+ this.defaultActive = ids;
15369
+ } else {
15370
+ this.handleJump(this.homePage);
15371
+ }
15372
+ this.setMenu(this.menus);
15373
+ }
15374
+ }
15375
+ } else if (this.menus && this.menus.length) {
15376
+ this.setMenu(this.menus);
15377
+ }
15378
+ }
15352
15379
  this.userModel = results.userModel;
15353
15380
  },
15354
15381
 
15355
15382
  //初始用户配置及信息
15356
- init: function init(results) {
15383
+ init: function init(results, first) {
15357
15384
  this.setConfig(results);
15358
- if (this.remote) {
15385
+ if (this.remote && first) {
15359
15386
  this.getMenu();
15360
15387
  } else {
15361
15388
  this.renderMenu();
@@ -16416,8 +16443,9 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16416
16443
  _this11.$store.commit('websocket', data);
16417
16444
  } catch (error) {}
16418
16445
  }
16419
- if (_this11.$eventBus) {
16420
- _this11.$eventBus.$emit('websocket', data);
16446
+ var bus = _this11.bus || _this11.$eventBus || _this11.$root.Bus;
16447
+ if (bus) {
16448
+ bus.$emit('websocket', data);
16421
16449
  }
16422
16450
  if (util["a" /* default */].win.eventBus) {
16423
16451
  util["a" /* default */].win.eventBus.$emit('websocket', data);
@@ -16514,8 +16542,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
16514
16542
 
16515
16543
  var default_component = Object(componentNormalizer["a" /* default */])(
16516
16544
  src_defaultvue_type_script_lang_js_,
16517
- defaultvue_type_template_id_5f979f7b_render,
16518
- defaultvue_type_template_id_5f979f7b_staticRenderFns,
16545
+ defaultvue_type_template_id_377c361a_render,
16546
+ defaultvue_type_template_id_377c361a_staticRenderFns,
16519
16547
  false,
16520
16548
  null,
16521
16549
  null,
@@ -16528,9 +16556,6 @@ var default_component = Object(componentNormalizer["a" /* default */])(
16528
16556
  var external_wujie_vue2_ = __webpack_require__(17);
16529
16557
  var external_wujie_vue2_default = /*#__PURE__*/__webpack_require__.n(external_wujie_vue2_);
16530
16558
 
16531
- // EXTERNAL MODULE: external "lodash"
16532
- var external_lodash_ = __webpack_require__(12);
16533
-
16534
16559
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=script&lang=js&
16535
16560
  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
16536
16561
 
@@ -16588,7 +16613,6 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16588
16613
 
16589
16614
 
16590
16615
 
16591
-
16592
16616
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
16593
16617
  name: 'EsMain',
16594
16618
  inheritAttrs: false,
@@ -16651,88 +16675,113 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16651
16675
  if (this.params.cookie && (this.params.cookie == true || this.params.cookie == 1)) {
16652
16676
  this.isLogin = true;
16653
16677
  }
16654
- this.getConfig(this.params);
16655
- // 主应用监听事件
16656
16678
  },
16657
16679
  mounted: function mounted() {
16658
16680
  var _this = this;
16659
16681
 
16682
+ console.log('params', this.$refs, this.$refs.main);
16683
+
16684
+ var token = util["a" /* default */].getStorage('token') || util["a" /* default */].getStorage('Authorization');
16685
+ this.isLogin = token ? true : this.isLogin;
16686
+ if (!token && Object.prototype.hasOwnProperty.call(this.params, 'serverId') && Object.prototype.hasOwnProperty.call(this.params, 'authType')) {
16687
+ return false;
16688
+ }
16660
16689
  if (this.isLogin) {
16661
16690
  if (util["a" /* default */].win.$wujie) {
16662
16691
  util["a" /* default */].win.$wujie.bus.$on('changeTheme', function (res) {
16663
16692
  util["a" /* default */].updateTheme(res);
16664
16693
  });
16665
16694
  }
16666
-
16667
- var bus = this.bus || this.$root.Bus;
16668
- if (bus) {
16669
- bus.$on('reLogin', this.handleReLogin);
16670
- bus.$on('refresh', this.$refs.main.handleRefresh);
16671
- bus.$on('jumpMenu', this.$refs.main.jumpMenu);
16672
- bus.$on('emit', function (method, args) {
16695
+ this.$nextTick(function () {
16696
+ _this.getConfig();
16697
+ var bus = _this.bus || _this.$root.Bus;
16698
+ if (bus) {
16699
+ bus.$on('reLogin', _this.handleReLogin);
16700
+ bus.$on('refresh', _this.$refs.main.handleRefresh);
16701
+ bus.$on('jumpMenu', _this.$refs.main.jumpMenu);
16702
+ bus.$on('emit', function (method, args) {
16703
+ // 主应用发送事件
16704
+ bus.$emit(method, args);
16705
+ });
16706
+ }
16707
+ util["a" /* default */].win.reLogin = _this.handleReLogin;
16708
+ util["a" /* default */].win.windowOpen = _this.openPage;
16709
+ util["a" /* default */].win.refresh = _this.$refs.main.handleRefresh;
16710
+ util["a" /* default */].win.jumpMenu = _this.$refs.main.jumpMenu;
16711
+ external_wujie_vue2_default.a.bus.$on('reLogin', _this.handleReLogin);
16712
+ external_wujie_vue2_default.a.bus.$on('refresh', _this.$refs.main.handleRefresh);
16713
+ external_wujie_vue2_default.a.bus.$on('jumpMenu', _this.$refs.main.jumpMenu);
16714
+ external_wujie_vue2_default.a.bus.$on('emit', function (method, args) {
16673
16715
  // 主应用发送事件
16674
- bus.$emit(method, args);
16716
+ external_wujie_vue2_default.a.bus.$emit(method, args);
16675
16717
  });
16676
- }
16677
- util["a" /* default */].win.reLogin = this.handleReLogin;
16678
- util["a" /* default */].win.windowOpen = this.openPage;
16679
- util["a" /* default */].win.refresh = this.$refs.main.handleRefresh;
16680
- util["a" /* default */].win.jumpMenu = this.$refs.main.jumpMenu;
16681
- external_wujie_vue2_default.a.bus.$on('reLogin', this.handleReLogin);
16682
- external_wujie_vue2_default.a.bus.$on('refresh', this.$refs.main.handleRefresh);
16683
- external_wujie_vue2_default.a.bus.$on('jumpMenu', this.$refs.main.jumpMenu);
16684
- external_wujie_vue2_default.a.bus.$on('emit', function (method, args) {
16685
- // 主应用发送事件
16686
- external_wujie_vue2_default.a.bus.$emit(method, args);
16687
- });
16688
16718
 
16689
- window.addEventListener('message', function (e) {
16690
- var _$refs$main;
16719
+ window.addEventListener('message', function (e) {
16720
+ var _$refs$main;
16691
16721
 
16692
- var _e$data = e.data,
16693
- method = _e$data.method,
16694
- args = _e$data.args;
16722
+ var _e$data = e.data,
16723
+ method = _e$data.method,
16724
+ args = _e$data.args;
16695
16725
 
16696
- switch (method) {
16697
- case 'reLogin':
16698
- _this.handleReLogin(args);
16699
- break;
16700
- case 'refresh':
16701
- _this.$refs.main.handleRefresh(args);
16702
- break;
16703
- case 'jumpMenu':
16704
- Array.isArray(args) ? (_$refs$main = _this.$refs.main).jumpMenu.apply(_$refs$main, args) : _this.$refs.main.jumpMenu(args);
16705
- break;
16706
- case 'emit':
16707
- var origin = args.origin,
16708
- data = _objectWithoutProperties(args, ['origin']);
16726
+ switch (method) {
16727
+ case 'reLogin':
16728
+ _this.handleReLogin(args);
16729
+ break;
16730
+ case 'refresh':
16731
+ _this.$refs.main.handleRefresh(args);
16732
+ break;
16733
+ case 'jumpMenu':
16734
+ Array.isArray(args) ? (_$refs$main = _this.$refs.main).jumpMenu.apply(_$refs$main, args) : _this.$refs.main.jumpMenu(args);
16735
+ break;
16736
+ case 'emit':
16737
+ var origin = args.origin,
16738
+ data = _objectWithoutProperties(args, ['origin']);
16709
16739
 
16710
- var iframes = document.getElementsByTagName('iframe');
16711
- iframes = iframes.filter(function (item) {
16712
- return origin ? item.src.indexOf(origin) > -1 : item.src.indexOf(e.origin) == -1;
16713
- });
16714
- for (var i = 0; i < iframes.length; i++) {
16715
- iframes[i] && iframes[i].contentWindow.postMessage(data, origin ? origin : '*');
16716
- }
16717
- break;
16718
- case 'openDialog':
16719
- _this.dialogs.push(args);
16720
- var index = _this.visibles.length;
16721
- _this.visibles.push(false);
16722
- _this.$nextTick(function () {
16723
- _this.$set(_this.visibles, index, true);
16724
- });
16725
- break;
16726
- case 'closeDialog':
16727
- for (var _i = 0; _i < _this.dialogs.length; _i++) {
16728
- var item = _this.dialogs[_i];
16729
- if (item.url == args.url) {
16730
- _this.$set(_this.visibles, _i, false);
16740
+ var iframes = document.getElementsByTagName('iframe');
16741
+ iframes = iframes.filter(function (item) {
16742
+ return origin ? item.src.indexOf(origin) > -1 : item.src.indexOf(e.origin) == -1;
16743
+ });
16744
+ for (var i = 0; i < iframes.length; i++) {
16745
+ iframes[i] && iframes[i].contentWindow.postMessage(data, origin ? origin : '*');
16731
16746
  }
16732
- }
16733
- break;
16734
- }
16747
+ break;
16748
+ case 'openDialog':
16749
+ _this.dialogs.push(args);
16750
+ var index = _this.visibles.length;
16751
+ _this.visibles.push(false);
16752
+ _this.$nextTick(function () {
16753
+ _this.$set(_this.visibles, index, true);
16754
+ });
16755
+ break;
16756
+ case 'closeDialog':
16757
+ for (var _i = 0; _i < _this.dialogs.length; _i++) {
16758
+ var item = _this.dialogs[_i];
16759
+ if (item.url == args.url) {
16760
+ _this.$set(_this.visibles, _i, false);
16761
+ }
16762
+ }
16763
+ break;
16764
+ }
16765
+ });
16735
16766
  });
16767
+ } else {
16768
+ var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
16769
+ if (loginPage) {
16770
+ window.location.replace(loginPage);
16771
+ } else if (document.referrer) {
16772
+ var referrerUrl = new URL(document.referrer);
16773
+ if (referrerUrl.host !== window.location.host) {
16774
+ window.location.replace(document.referrer);
16775
+ } 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) {
16776
+ window.location.href = './login.html';
16777
+ } else {
16778
+ next('/login');
16779
+ }
16780
+ } else if (window.location.href.indexOf('main.html') > -1) {
16781
+ window.location.href = './login.html';
16782
+ } else {
16783
+ next('/login');
16784
+ }
16736
16785
  }
16737
16786
  },
16738
16787
 
@@ -16847,22 +16896,15 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
16847
16896
  * @author huangbo
16848
16897
  * @date 2024年9月7日
16849
16898
  **/
16850
- getConfig: function getConfig(query) {
16899
+ getConfig: function getConfig() {
16851
16900
  var _this4 = this;
16852
16901
 
16853
- var token = util["a" /* default */].getStorage('token') || util["a" /* default */].getStorage('Authorization');
16854
- this.isLogin = token ? true : this.isLogin;
16855
- if (!token && Object.prototype.hasOwnProperty.call(query, 'serverId') && Object.prototype.hasOwnProperty.call(query, 'authType')) {
16856
- return false;
16857
- }
16858
16902
  var mainConfig = util["a" /* default */].getStorage('mainConfig');
16859
16903
  if (mainConfig) {
16860
16904
  mainConfig = JSON.parse(mainConfig);
16861
- this.$nextTick(function () {
16862
- _this4.$refs.main.init(mainConfig, true);
16863
- util["a" /* default */].getMainConfig(function (res) {
16864
- _this4.$refs.main.init(res, false);
16865
- });
16905
+ this.$refs.main.init(mainConfig, true);
16906
+ util["a" /* default */].getMainConfig(function (res) {
16907
+ _this4.$refs.main.init(res, false);
16866
16908
  });
16867
16909
  } else {
16868
16910
  util["a" /* default */].getMainConfig(function (res) {
package/lib/nav.js CHANGED
@@ -123,8 +123,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
123
123
  **/
124
124
 
125
125
  /* eslint-disable indent */
126
- var sm2 = __webpack_require__(13).sm2;
127
- var lodash = __webpack_require__(12);
126
+ var sm2 = __webpack_require__(12).sm2;
127
+ var lodash = __webpack_require__(13);
128
128
 
129
129
 
130
130
 
@@ -2366,7 +2366,7 @@ var isLogined = function () {
2366
2366
  cookie = _ref11.cookie,
2367
2367
  loginPage = _ref11.loginPage,
2368
2368
  redirect = _ref11.redirect;
2369
- var quit, pathname, path, token, loadingInstance;
2369
+ var quit, pathname, path, token, loadingInstance, referrerUrl;
2370
2370
  return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2371
2371
  while (1) {
2372
2372
  switch (_context.prev = _context.next) {
@@ -2494,7 +2494,14 @@ var isLogined = function () {
2494
2494
  if (loginPage) {
2495
2495
  win.top.location.replace(loginPage);
2496
2496
  } else if (document.referrer) {
2497
- win.top.location.replace(document.referrer);
2497
+ var referrerUrl = new URL(document.referrer);
2498
+ if (referrerUrl.host !== win.top.location.host) {
2499
+ win.top.location.replace(document.referrer);
2500
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2501
+ win.top.location.href = './login.html';
2502
+ } else {
2503
+ next('/login');
2504
+ }
2498
2505
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2499
2506
  win.top.location.href = './login.html';
2500
2507
  } else {
@@ -2517,7 +2524,14 @@ var isLogined = function () {
2517
2524
  if (loginPage) {
2518
2525
  win.top.location.replace(loginPage);
2519
2526
  } else if (document.referrer) {
2520
- win.top.location.replace(document.referrer);
2527
+ var referrerUrl = new URL(document.referrer);
2528
+ if (referrerUrl.host !== win.top.location.host) {
2529
+ win.top.location.replace(document.referrer);
2530
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2531
+ win.top.location.href = './login.html';
2532
+ } else {
2533
+ next('/login');
2534
+ }
2521
2535
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2522
2536
  win.top.location.href = './login.html';
2523
2537
  } else {
@@ -2550,7 +2564,15 @@ var isLogined = function () {
2550
2564
  if (loginPage) {
2551
2565
  win.top.location.replace(loginPage);
2552
2566
  } else if (document.referrer) {
2553
- win.top.location.replace(document.referrer);
2567
+ referrerUrl = new URL(document.referrer);
2568
+
2569
+ if (referrerUrl.host !== win.top.location.host) {
2570
+ win.top.location.replace(document.referrer);
2571
+ } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2572
+ win.top.location.href = './login.html';
2573
+ } else {
2574
+ next('/login');
2575
+ }
2554
2576
  } else if (win.top.location.href.indexOf('main.html') > -1) {
2555
2577
  win.top.location.href = './login.html';
2556
2578
  } else {
@@ -3963,14 +3985,14 @@ module.exports = require("ua-parser-js");
3963
3985
  /***/ 12:
3964
3986
  /***/ (function(module, exports) {
3965
3987
 
3966
- module.exports = require("lodash");
3988
+ module.exports = require("sm-crypto");
3967
3989
 
3968
3990
  /***/ }),
3969
3991
 
3970
3992
  /***/ 13:
3971
3993
  /***/ (function(module, exports) {
3972
3994
 
3973
- module.exports = require("sm-crypto");
3995
+ module.exports = require("lodash");
3974
3996
 
3975
3997
  /***/ }),
3976
3998