eoss-ui 0.6.55 → 0.6.56

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 (59) hide show
  1. package/lib/button-group.js +266 -212
  2. package/lib/button.js +403 -347
  3. package/lib/checkbox-group.js +270 -216
  4. package/lib/data-table-form.js +269 -215
  5. package/lib/data-table.js +271 -222
  6. package/lib/date-picker.js +403 -347
  7. package/lib/dialog.js +268 -219
  8. package/lib/enable-drag.js +8 -8
  9. package/lib/eoss-ui.common.js +249 -200
  10. package/lib/flow-group.js +272 -216
  11. package/lib/flow-list.js +618 -545
  12. package/lib/flow.js +268 -219
  13. package/lib/form.js +270 -221
  14. package/lib/handle-user.js +503 -429
  15. package/lib/handler.js +272 -216
  16. package/lib/icon.js +272 -216
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +403 -347
  19. package/lib/input.js +405 -349
  20. package/lib/login.js +270 -221
  21. package/lib/main.js +270 -216
  22. package/lib/menu.js +2 -2
  23. package/lib/nav.js +274 -218
  24. package/lib/page.js +272 -216
  25. package/lib/pagination.js +272 -216
  26. package/lib/player.js +494 -416
  27. package/lib/qr-code.js +272 -216
  28. package/lib/radio-group.js +276 -220
  29. package/lib/retrial-auth.js +272 -216
  30. package/lib/select-ganged.js +405 -349
  31. package/lib/select.js +407 -351
  32. package/lib/selector-panel.js +268 -214
  33. package/lib/selector.js +272 -216
  34. package/lib/sizer.js +269 -220
  35. package/lib/steps.js +274 -218
  36. package/lib/switch.js +272 -216
  37. package/lib/table-form.js +272 -216
  38. package/lib/tabs.js +272 -216
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/main.css +1 -1
  41. package/lib/theme-chalk/simplicity.css +1 -1
  42. package/lib/tips.js +274 -218
  43. package/lib/tree-group.js +272 -216
  44. package/lib/tree.js +274 -218
  45. package/lib/upload.js +270 -216
  46. package/lib/utils/util.js +231 -182
  47. package/lib/wujie.js +272 -216
  48. package/lib/wxlogin.js +404 -348
  49. package/package.json +2 -2
  50. package/packages/.DS_Store +0 -0
  51. package/packages/main/.DS_Store +0 -0
  52. package/packages/main/src/.DS_Store +0 -0
  53. package/packages/theme-chalk/lib/index.css +1 -1
  54. package/packages/theme-chalk/lib/main.css +1 -1
  55. package/packages/theme-chalk/lib/simplicity.css +1 -1
  56. package/packages/theme-chalk/src/simplicity.scss +10 -2
  57. package/src/.DS_Store +0 -0
  58. package/src/index.js +1 -1
  59. package/src/utils/util.js +2 -2
@@ -87,13 +87,6 @@ module.exports =
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 14:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("babel-runtime/regenerator");
94
-
95
- /***/ }),
96
-
97
90
  /***/ 3:
98
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
92
 
@@ -197,6 +190,13 @@ function normalizeComponent(
197
190
  }
198
191
 
199
192
 
193
+ /***/ }),
194
+
195
+ /***/ 4:
196
+ /***/ (function(module, exports) {
197
+
198
+ module.exports = require("babel-runtime/regenerator");
199
+
200
200
  /***/ }),
201
201
 
202
202
  /***/ 42:
@@ -401,7 +401,7 @@ render._withStripped = true
401
401
  // CONCATENATED MODULE: ./packages/enable-drag/src/main.vue?vue&type=template&id=740c305c&scoped=true&
402
402
 
403
403
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
404
- var regenerator_ = __webpack_require__(14);
404
+ var regenerator_ = __webpack_require__(4);
405
405
  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
406
406
 
407
407
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/enable-drag/src/main.vue?vue&type=script&lang=js&
@@ -90,20 +90,26 @@ module.exports =
90
90
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
91
91
 
92
92
  "use strict";
93
- /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
94
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
95
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
96
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
97
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);
98
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
99
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
100
- /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
101
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
102
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
93
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
94
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
95
+ /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
96
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
97
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);
98
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
99
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);
100
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
101
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_4__);
102
+ /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12);
103
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
104
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_6__);
105
+
106
+
103
107
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
104
108
 
105
109
  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; };
106
110
 
111
+ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
112
+
107
113
  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; }
108
114
 
109
115
  /**
@@ -136,7 +142,7 @@ var loginMsg = void 0;
136
142
  var initAuth = void 0;
137
143
  var $_http = void 0;
138
144
 
139
- var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
145
+ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_4___default()({ storeAsString: true });
140
146
 
141
147
 
142
148
  /**
@@ -207,7 +213,7 @@ var ajax = function ajax(_ref) {
207
213
  var http = $_http;
208
214
  if (!http) {
209
215
  var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
210
- http = axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
216
+ http = axios__WEBPACK_IMPORTED_MODULE_2___default.a.create({
211
217
  baseURL: baseURL,
212
218
  timeout: 99000,
213
219
  transformResponse: [function (data) {
@@ -280,7 +286,7 @@ var ajax = function ajax(_ref) {
280
286
  clearTimeout(loginMsg);
281
287
  loginMsg = setTimeout(function () {
282
288
  sessionStorage.setItem('remind', 1);
283
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
289
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
284
290
  confirmButtonText: '确定',
285
291
  closeOnClickModal: false,
286
292
  type: 'warning'
@@ -331,7 +337,7 @@ var ajax = function ajax(_ref) {
331
337
  } else if (response.data.rCode === 61) {
332
338
  clearTimeout(initAuth);
333
339
  initAuth = setTimeout(function () {
334
- Object(eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"])({
340
+ Object(eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"])({
335
341
  title: '请进行二次鉴权',
336
342
  closeOnClickModal: false,
337
343
  closeOnPressEscape: false,
@@ -487,7 +493,7 @@ var ajax = function ajax(_ref) {
487
493
  }
488
494
  }
489
495
  if (method === 'post' && format) {
490
- data = qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data);
496
+ data = qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);
491
497
  if (!header['content-type'] && !header['Content-Type']) {
492
498
  header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
493
499
  }
@@ -1615,7 +1621,7 @@ var getLightness = function getLightness($v, $i, $isLight) {
1615
1621
  * @param {function} callback - 回调函数
1616
1622
  **/
1617
1623
  var getMainConfig = function getMainConfig(callback) {
1618
- ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* mainConfig */ "kb"] }).then(function (res) {
1624
+ ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* mainConfig */ "kb"] }).then(function (res) {
1619
1625
  if (res && res.rCode === 0) {
1620
1626
  callback(res.results);
1621
1627
  }
@@ -2347,137 +2353,196 @@ var isFunction = function isFunction(obj) {
2347
2353
  * @param {sting} [loginPage] - 第三方登录页面地址
2348
2354
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
2349
2355
  **/
2350
- var isLogined = function isLogined(_ref10) {
2351
- var to = _ref10.to,
2352
- from = _ref10.from,
2353
- next = _ref10.next,
2354
- _ref10$exclude = _ref10.exclude,
2355
- exclude = _ref10$exclude === undefined ? [] : _ref10$exclude,
2356
- cookie = _ref10.cookie,
2357
- loginPage = _ref10.loginPage,
2358
- redirect = _ref10.redirect;
2359
-
2360
- if (cookie === undefined) {
2361
- cookie = getParams({ name: 'cookie' });
2362
- }
2363
- var quit = getParams('quit') || getParams('logout');
2364
- if (quit) {
2365
- ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* logout */ "jb"] }).then(function (res) {
2366
- if (res.rCode === 0) {
2367
- removeStorage();
2368
- }
2369
- }).catch(function () {});
2370
- return;
2371
- }
2372
- var pathname = '';
2373
- try {
2374
- pathname = win.top.location.pathname;
2375
- } catch (error) {
2376
- pathname = win.location.pathname;
2377
- }
2378
- if (loginPage) {
2379
- sessionStorage.setItem('loginPage', loginPage);
2380
- if (!startWith(loginPage, ['http', '/'], true)) {
2381
- if (pathname !== '/') {
2382
- var path = pathname.split('/');
2383
- path.splice(pathname.length - 1);
2384
- path = path.join('/');
2385
- loginPage = path + '/' + loginPage.replace('./', '');
2386
- } else {
2387
- loginPage = pathname + loginPage.replace('./', '');
2388
- }
2389
- }
2390
- }
2391
- var token = getStorage('token') || getStorage('Authorization');
2392
- // const logined = getStorage('logined');
2393
- // eslint-disable-next-line eqeqeq
2394
- if (token || cookie == true || cookie == 1) {
2395
- next && next();
2396
- } else {
2397
- if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
2398
- var loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2399
- ajax({
2400
- method: 'post',
2401
- url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
2402
- data: to.query
2403
- }).then(function (res) {
2404
- if (res.rCode === 0) {
2405
- var results = res.results;
2356
+ var isLogined = function () {
2357
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(_ref11) {
2358
+ var to = _ref11.to,
2359
+ from = _ref11.from,
2360
+ next = _ref11.next,
2361
+ _ref11$exclude = _ref11.exclude,
2362
+ exclude = _ref11$exclude === undefined ? [] : _ref11$exclude,
2363
+ cookie = _ref11.cookie,
2364
+ loginPage = _ref11.loginPage,
2365
+ redirect = _ref11.redirect;
2366
+ var quit, pathname, path, token, loadingInstance;
2367
+ return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2368
+ while (1) {
2369
+ switch (_context.prev = _context.next) {
2370
+ case 0:
2371
+ if (cookie === undefined) {
2372
+ cookie = getParams({ name: 'cookie' });
2373
+ }
2374
+ quit = getParams('quit') || getParams('logout');
2406
2375
 
2407
- switch (results.statusCode) {
2408
- case 0:
2409
- var storage = getStorage('storage');
2410
- setStorage({
2411
- type: storage,
2412
- key: {
2413
- ssId: results.ssId,
2414
- token: results.token,
2415
- Authorization: results.token,
2416
- deviceUnique: results.deviceUnique
2376
+ if (!quit) {
2377
+ _context.next = 5;
2378
+ break;
2379
+ }
2380
+
2381
+ ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* logout */ "jb"] }).then(function (res) {
2382
+ if (res.rCode === 0) {
2383
+ removeStorage();
2384
+ }
2385
+ }).catch(function () {});
2386
+ return _context.abrupt('return');
2387
+
2388
+ case 5:
2389
+ pathname = '';
2390
+
2391
+ try {
2392
+ pathname = win.top.location.pathname;
2393
+ } catch (error) {
2394
+ pathname = win.location.pathname;
2395
+ }
2396
+ if (loginPage) {
2397
+ sessionStorage.setItem('loginPage', loginPage);
2398
+ if (!startWith(loginPage, ['http', '/'], true)) {
2399
+ if (pathname !== '/') {
2400
+ path = pathname.split('/');
2401
+
2402
+ path.splice(pathname.length - 1);
2403
+ path = path.join('/');
2404
+ loginPage = path + '/' + loginPage.replace('./', '');
2405
+ } else {
2406
+ loginPage = pathname + loginPage.replace('./', '');
2417
2407
  }
2418
- });
2419
- try {
2420
- var url = delUrlParam({
2421
- url: win.top.location.href,
2422
- key: ['serverId', 'authType', 'code', 'sessionId']
2423
- });
2424
- win.top.location.href = url;
2425
- setTimeout(function () {
2426
- win.top.location.reload();
2427
- }, 200);
2428
- } catch (error) {
2429
- var _url2 = delUrlParam({
2430
- url: win.location.href,
2431
- key: ['serverId', 'authType', 'code', 'sessionId']
2432
- });
2433
- win.location.href = _url2;
2434
- setTimeout(function () {
2435
- win.location.reload();
2436
- }, 200);
2437
2408
  }
2409
+ }
2410
+ token = getStorage('token') || getStorage('Authorization');
2411
+ // const logined = getStorage('logined');
2412
+ // eslint-disable-next-line eqeqeq
2413
+
2414
+ if (!(token || cookie == true || cookie == 1)) {
2415
+ _context.next = 13;
2438
2416
  break;
2439
- case 1:
2440
- break;
2441
- case 2:
2442
- break;
2443
- case 3:
2444
- try {
2445
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2446
- win.top.location.href = href;
2447
- } catch (error) {
2448
- var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2449
- win.location.href = _href;
2450
- }
2417
+ }
2418
+
2419
+ next && next();
2420
+ _context.next = 20;
2421
+ break;
2422
+
2423
+ case 13:
2424
+ if (!(!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType'))) {
2425
+ _context.next = 19;
2451
2426
  break;
2452
- case 4:
2453
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2454
- confirmButtonText: '确定',
2455
- type: 'error',
2456
- callback: function callback() {
2457
- sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2458
- try {
2459
- if (loginPage) {
2460
- win.top.location.replace(loginPage);
2461
- } else if (document.referrer) {
2462
- win.top.location.replace(document.referrer);
2463
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2464
- win.top.location.href = './login.html';
2465
- } else {
2466
- next('/login');
2427
+ }
2428
+
2429
+ loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2430
+ _context.next = 17;
2431
+ return ajax({
2432
+ method: 'post',
2433
+ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* authCenter */ "b"],
2434
+ data: to.query
2435
+ }).then(function (res) {
2436
+ if (res.rCode === 0) {
2437
+ var results = res.results;
2438
+
2439
+ switch (results.statusCode) {
2440
+ case 0:
2441
+ var storage = getStorage('storage');
2442
+ setStorage({
2443
+ type: storage,
2444
+ key: {
2445
+ ssId: results.ssId,
2446
+ token: results.token,
2447
+ Authorization: results.token,
2448
+ deviceUnique: results.deviceUnique
2449
+ }
2450
+ });
2451
+ try {
2452
+ var url = delUrlParam({
2453
+ url: win.top.location.href,
2454
+ key: ['serverId', 'authType', 'code', 'sessionId']
2455
+ });
2456
+ win.top.location.href = url;
2457
+ setTimeout(function () {
2458
+ win.top.location.reload();
2459
+ }, 200);
2460
+ } catch (error) {
2461
+ var _url2 = delUrlParam({
2462
+ url: win.location.href,
2463
+ key: ['serverId', 'authType', 'code', 'sessionId']
2464
+ });
2465
+ win.location.href = _url2;
2466
+ setTimeout(function () {
2467
+ win.location.reload();
2468
+ }, 200);
2467
2469
  }
2468
- } catch (error) {
2469
- win.postMessage({ type: 1 }, '*');
2470
- }
2470
+ break;
2471
+ case 1:
2472
+ break;
2473
+ case 2:
2474
+ break;
2475
+ case 3:
2476
+ try {
2477
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2478
+ win.top.location.href = href;
2479
+ } catch (error) {
2480
+ var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2481
+ win.location.href = _href;
2482
+ }
2483
+ break;
2484
+ case 4:
2485
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2486
+ confirmButtonText: '确定',
2487
+ type: 'error',
2488
+ callback: function callback() {
2489
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2490
+ try {
2491
+ if (loginPage) {
2492
+ win.top.location.replace(loginPage);
2493
+ } else if (document.referrer) {
2494
+ win.top.location.replace(document.referrer);
2495
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2496
+ win.top.location.href = './login.html';
2497
+ } else {
2498
+ next('/login');
2499
+ }
2500
+ } catch (error) {
2501
+ win.postMessage({ type: 1 }, '*');
2502
+ }
2503
+ }
2504
+ });
2505
+ break;
2506
+ default:
2471
2507
  }
2472
- });
2473
- break;
2474
- default:
2475
- }
2476
- } else {
2477
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(res.msg, '提示', {
2478
- confirmButtonText: '确定',
2479
- type: 'error',
2480
- callback: function callback() {
2508
+ } else {
2509
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(res.msg, '提示', {
2510
+ confirmButtonText: '确定',
2511
+ type: 'error',
2512
+ callback: function callback() {
2513
+ try {
2514
+ if (loginPage) {
2515
+ win.top.location.replace(loginPage);
2516
+ } else if (document.referrer) {
2517
+ win.top.location.replace(document.referrer);
2518
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2519
+ win.top.location.href = './login.html';
2520
+ } else {
2521
+ next('/login');
2522
+ }
2523
+ } catch (error) {
2524
+ win.postMessage({ type: 1 }, '*');
2525
+ }
2526
+ }
2527
+ });
2528
+ }
2529
+ loadingInstance.close();
2530
+ }).catch(function (e) {
2531
+ loadingInstance.close();
2532
+ });
2533
+
2534
+ case 17:
2535
+ _context.next = 20;
2536
+ break;
2537
+
2538
+ case 19:
2539
+ if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2540
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
2541
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2542
+ } else {
2543
+ next();
2544
+ }
2545
+ } else {
2481
2546
  try {
2482
2547
  if (loginPage) {
2483
2548
  win.top.location.replace(loginPage);
@@ -2492,35 +2557,19 @@ var isLogined = function isLogined(_ref10) {
2492
2557
  win.postMessage({ type: 1 }, '*');
2493
2558
  }
2494
2559
  }
2495
- });
2496
- }
2497
- loadingInstance.close();
2498
- }).catch(function (e) {
2499
- loadingInstance.close();
2500
- });
2501
- } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2502
- if (redirect && (to.path === '/main' || to.path === '/login')) {
2503
- window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2504
- } else {
2505
- next();
2506
- }
2507
- } else {
2508
- try {
2509
- if (loginPage) {
2510
- win.top.location.replace(loginPage);
2511
- } else if (document.referrer) {
2512
- win.top.location.replace(document.referrer);
2513
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2514
- win.top.location.href = './login.html';
2515
- } else {
2516
- next('/login');
2560
+
2561
+ case 20:
2562
+ case 'end':
2563
+ return _context.stop();
2517
2564
  }
2518
- } catch (error) {
2519
- win.postMessage({ type: 1 }, '*');
2520
2565
  }
2521
- }
2522
- }
2523
- };
2566
+ }, _callee, this);
2567
+ }));
2568
+
2569
+ return function isLogined(_x5) {
2570
+ return _ref10.apply(this, arguments);
2571
+ };
2572
+ }();
2524
2573
  var isLogged = function isLogged(res) {
2525
2574
  isLogined(res);
2526
2575
  };
@@ -2570,9 +2619,9 @@ var isObjectEqual = function isObjectEqual(obj, _obj) {
2570
2619
  * @param {string/array} [url] - 地址
2571
2620
  * @param {boolean} [single] - 是否做js沙箱隔离
2572
2621
  **/
2573
- var jointUrl = function jointUrl(_ref11) {
2574
- var url = _ref11.url,
2575
- reg = _ref11.reg;
2622
+ var jointUrl = function jointUrl(_ref12) {
2623
+ var url = _ref12.url,
2624
+ reg = _ref12.reg;
2576
2625
 
2577
2626
  if (startWith(url, ['https', 'http', 'blob:'], true) || !reg || !reg.length) {
2578
2627
  return url;
@@ -2587,13 +2636,13 @@ var jointUrl = function jointUrl(_ref11) {
2587
2636
  return startWith(url, reg) ? url : reg + url;
2588
2637
  };
2589
2638
 
2590
- var loadJs = function loadJs(_ref12) {
2591
- var url = _ref12.url,
2592
- _ref12$type = _ref12.type,
2593
- type = _ref12$type === undefined ? 'text/javascript' : _ref12$type,
2594
- id = _ref12.id,
2595
- _ref12$single = _ref12.single,
2596
- single = _ref12$single === undefined ? true : _ref12$single;
2639
+ var loadJs = function loadJs(_ref13) {
2640
+ var url = _ref13.url,
2641
+ _ref13$type = _ref13.type,
2642
+ type = _ref13$type === undefined ? 'text/javascript' : _ref13$type,
2643
+ id = _ref13.id,
2644
+ _ref13$single = _ref13.single,
2645
+ single = _ref13$single === undefined ? true : _ref13$single;
2597
2646
 
2598
2647
  return new Promise(function (resolve, reject) {
2599
2648
  var script = document.getElementById(id) || document.createElement('script');
@@ -2628,7 +2677,7 @@ var loadJs = function loadJs(_ref12) {
2628
2677
  **/
2629
2678
  var loading = function loading($loading, res) {
2630
2679
  if (!$loading) {
2631
- $loading = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service;
2680
+ $loading = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service;
2632
2681
  }
2633
2682
  if (isObject(res)) {
2634
2683
  var config = extend({}, {
@@ -2728,11 +2777,11 @@ var queryParams = function queryParams(obj) {
2728
2777
  * @param {string} [url] - 消息源的 URI
2729
2778
  * @param {function} [callback] - 回调函数
2730
2779
  **/
2731
- var receiveMessage = function receiveMessage(_ref13) {
2732
- var _ref13$data = _ref13.data,
2733
- data = _ref13$data === undefined ? {} : _ref13$data,
2734
- url = _ref13.url,
2735
- callback = _ref13.callback;
2780
+ var receiveMessage = function receiveMessage(_ref14) {
2781
+ var _ref14$data = _ref14.data,
2782
+ data = _ref14$data === undefined ? {} : _ref14$data,
2783
+ url = _ref14.url,
2784
+ callback = _ref14.callback;
2736
2785
 
2737
2786
  win.addEventListener('message', function (e) {
2738
2787
  if (url !== undefined) {
@@ -2776,9 +2825,9 @@ var removeStorage = function removeStorage(key) {
2776
2825
  * @param {string、number} [data] - 数字或字符串型数字
2777
2826
  * @param {number} [precision] - 需要的小数位数
2778
2827
  **/
2779
- var replenish = function replenish(_ref14) {
2780
- var data = _ref14.data,
2781
- precision = _ref14.precision;
2828
+ var replenish = function replenish(_ref15) {
2829
+ var data = _ref15.data,
2830
+ precision = _ref15.precision;
2782
2831
 
2783
2832
  if (data && precision && precision > 0) {
2784
2833
  var power = Math.pow(10, precision);
@@ -2924,10 +2973,10 @@ var setScale = function setScale() {
2924
2973
  * @param {object} [data] - 数据---其中type必须表示操作类型
2925
2974
  * @param {string} [url] - 指定的消息发送URI地址
2926
2975
  **/
2927
- var sendMessage = function sendMessage(_ref15) {
2928
- var _ref15$data = _ref15.data,
2929
- data = _ref15$data === undefined ? {} : _ref15$data,
2930
- url = _ref15.url;
2976
+ var sendMessage = function sendMessage(_ref16) {
2977
+ var _ref16$data = _ref16.data,
2978
+ data = _ref16$data === undefined ? {} : _ref16$data,
2979
+ url = _ref16.url;
2931
2980
 
2932
2981
  var iframes = document.getElementsByTagName('iframe');
2933
2982
  for (var i = 0; i < iframes.length; i++) {
@@ -2971,10 +3020,10 @@ var setFavicon = function setFavicon(url) {
2971
3020
  * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
2972
3021
  * @param {String} [value] - 数据的值
2973
3022
  **/
2974
- var setStorage = function setStorage(_ref16) {
2975
- var type = _ref16.type,
2976
- key = _ref16.key,
2977
- value = _ref16.value;
3023
+ var setStorage = function setStorage(_ref17) {
3024
+ var type = _ref17.type,
3025
+ key = _ref17.key,
3026
+ value = _ref17.value;
2978
3027
 
2979
3028
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2980
3029
  value = JSON.stringify(value);
@@ -3021,7 +3070,7 @@ var setStorage = function setStorage(_ref16) {
3021
3070
  * @param {Function} [error] - 重连间隔时间
3022
3071
  **/
3023
3072
  function socket(option, vm) {
3024
- var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]();
3073
+ var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]();
3025
3074
  socket.init(option, vm);
3026
3075
  return socket;
3027
3076
  }
@@ -3268,10 +3317,10 @@ var upperCase = function upperCase(text) {
3268
3317
  * @param {Object} [url] - url地址
3269
3318
  * @param {Object} [param] - 被转换的对象
3270
3319
  **/
3271
- var urlJoinParams = function urlJoinParams(_ref17) {
3272
- var url = _ref17.url,
3273
- param = _ref17.param,
3274
- timestamp = _ref17.timestamp;
3320
+ var urlJoinParams = function urlJoinParams(_ref18) {
3321
+ var url = _ref18.url,
3322
+ param = _ref18.param,
3323
+ timestamp = _ref18.timestamp;
3275
3324
 
3276
3325
  var arry = decodeURI(url).split('?');
3277
3326
  var times = new Date().getTime();
@@ -87053,7 +87102,7 @@ if (typeof window !== 'undefined' && window.Vue) {
87053
87102
  }
87054
87103
 
87055
87104
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
87056
- version: '0.6.55',
87105
+ version: '0.6.56',
87057
87106
  install: install,
87058
87107
  Button: packages_button,
87059
87108
  ButtonGroup: button_group,