eoss-ui 0.4.39 → 0.4.41

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 (72) hide show
  1. package/lib/button-group.js +40 -13
  2. package/lib/button.js +35 -8
  3. package/lib/checkbox-group.js +35 -8
  4. package/lib/data-table-form.js +35 -8
  5. package/lib/data-table.js +97 -34
  6. package/lib/date-picker.js +35 -8
  7. package/lib/dialog.js +52 -39
  8. package/lib/editor.js +415 -887
  9. package/lib/eoss-ui.common.js +11166 -10552
  10. package/lib/flow-group.js +37 -26
  11. package/lib/flow-list.js +35 -8
  12. package/lib/flow.js +163 -54
  13. package/lib/form.js +10081 -9075
  14. package/lib/handle-user.js +35 -8
  15. package/lib/handler.js +35 -8
  16. package/lib/icons.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +35 -8
  19. package/lib/input.js +35 -8
  20. package/lib/login.js +35 -8
  21. package/lib/main.js +35 -8
  22. package/lib/mainComp.js +35 -8
  23. package/lib/nav.js +35 -8
  24. package/lib/page.js +35 -8
  25. package/lib/player.js +37 -10
  26. package/lib/qr-code.js +35 -8
  27. package/lib/radio-group.js +35 -8
  28. package/lib/select-ganged.js +35 -8
  29. package/lib/select.js +35 -8
  30. package/lib/selector-panel.js +43 -16
  31. package/lib/selector.js +40 -13
  32. package/lib/sizer.js +35 -8
  33. package/lib/steps.js +35 -8
  34. package/lib/switch.js +35 -8
  35. package/lib/table-form.js +48 -13
  36. package/lib/tabs.js +40 -36
  37. package/lib/theme-chalk/editor.css +1 -1
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/tips.js +35 -8
  40. package/lib/tree-group.js +39 -21
  41. package/lib/tree.js +35 -8
  42. package/lib/upload.js +95 -52
  43. package/lib/utils/util.js +35 -8
  44. package/lib/wujie.js +35 -8
  45. package/lib/wxlogin.js +35 -8
  46. package/package.json +1 -1
  47. package/packages/button-group/src/main.vue +3 -3
  48. package/packages/data-table/src/column.vue +6 -0
  49. package/packages/data-table/src/main.vue +12 -0
  50. package/packages/dialog/src/main.vue +3 -11
  51. package/packages/editor/src/editor.vue +20 -0
  52. package/packages/editor/src/minx.js +129 -19
  53. package/packages/editor/src/toolbar.vue +93 -324
  54. package/packages/flow/src/component/CommonOpinions.vue +29 -11
  55. package/packages/flow/src/component/CustomPreset.vue +5 -1
  56. package/packages/flow/src/component/Preset.vue +5 -1
  57. package/packages/flow/src/main.vue +21 -1
  58. package/packages/flow/src/processForm.vue +15 -8
  59. package/packages/flow/src/selectUser.vue +9 -2
  60. package/packages/flow-group/src/main.vue +0 -8
  61. package/packages/form/src/main.vue +1519 -1462
  62. package/packages/form/src/table.vue +8 -0
  63. package/packages/selector/src/main.vue +1 -1
  64. package/packages/selector-panel/src/main.vue +4 -4
  65. package/packages/tabs/src/main.vue +1 -10
  66. package/packages/theme-chalk/lib/editor.css +1 -1
  67. package/packages/theme-chalk/lib/index.css +1 -1
  68. package/packages/theme-chalk/src/editor.scss +23 -0
  69. package/packages/tree-group/src/main.vue +0 -2
  70. package/packages/upload/src/main.vue +31 -23
  71. package/src/index.js +1 -1
  72. package/src/utils/util.js +41 -8
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,
package/lib/input.js CHANGED
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,
package/lib/login.js CHANGED
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,
package/lib/main.js CHANGED
@@ -1402,7 +1402,7 @@ var isFunction = function isFunction(obj) {
1402
1402
  };
1403
1403
 
1404
1404
  /**
1405
- * isLogged
1405
+ * isLogined
1406
1406
  * @desc:是否登录(用于路由守卫中)
1407
1407
  * @author huangbo
1408
1408
  * @date 2022年5月7日
@@ -1415,7 +1415,9 @@ var isFunction = function isFunction(obj) {
1415
1415
  * @param {sting} [loginPage] - 第三方登录页面地址
1416
1416
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1417
1417
  **/
1418
- var isLogged = function isLogged(_ref8) {
1418
+ var isLogined = function isLogined(_ref8) {
1419
+ var _this = this;
1420
+
1419
1421
  var to = _ref8.to,
1420
1422
  from = _ref8.from,
1421
1423
  next = _ref8.next,
@@ -1459,16 +1461,18 @@ var isLogged = function isLogged(_ref8) {
1459
1461
  data: to.query
1460
1462
  }).then(function (res) {
1461
1463
  if (res.rCode === 0) {
1462
- switch (res.results.statusCode) {
1464
+ var results = res.results;
1465
+
1466
+ switch (results.statusCode) {
1463
1467
  case 0:
1464
1468
  var storage = getStorage('storage');
1465
1469
  setStorage({
1466
1470
  type: storage,
1467
1471
  key: {
1468
- ssId: res.results.ssId,
1469
- token: res.results.token,
1470
- Authorization: res.results.token,
1471
- deviceUnique: res.results.deviceUnique
1472
+ ssId: results.ssId,
1473
+ token: results.token,
1474
+ Authorization: results.token,
1475
+ deviceUnique: results.deviceUnique
1472
1476
  }
1473
1477
  });
1474
1478
  next();
@@ -1478,7 +1482,7 @@ var isLogged = function isLogged(_ref8) {
1478
1482
  case 2:
1479
1483
  break;
1480
1484
  case 3:
1481
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1485
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1482
1486
  if (to.query.openType) {
1483
1487
  switch (to.query.openType) {
1484
1488
  case 'self':
@@ -1502,6 +1506,25 @@ var isLogged = function isLogged(_ref8) {
1502
1506
  }
1503
1507
  }
1504
1508
  break;
1509
+ case 4:
1510
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1511
+ confirmButtonText: '确定',
1512
+ type: 'error'
1513
+ }).then(function () {
1514
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1515
+ window.location.href = delUrlParam({ key: 'code' });
1516
+ if (loginPage) {
1517
+ win.top.location.replace(loginPage);
1518
+ } else if (document.referrer) {
1519
+ win.top.location.replace(document.referrer);
1520
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1521
+ win.top.location.href = './login.html';
1522
+ } else {
1523
+ next('/login');
1524
+ }
1525
+ }).catch(function (e) {});
1526
+ break;
1527
+ default:
1505
1528
  }
1506
1529
  } else {
1507
1530
  if (token) {
@@ -1530,6 +1553,9 @@ var isLogged = function isLogged(_ref8) {
1530
1553
  }
1531
1554
  }
1532
1555
  };
1556
+ var isLogged = function isLogged(res) {
1557
+ isLogined(res);
1558
+ };
1533
1559
 
1534
1560
  /**
1535
1561
  * isObject
@@ -2181,6 +2207,7 @@ var watermark = function watermark(option) {
2181
2207
  indexOfObj: indexOfObj,
2182
2208
  isFunction: isFunction,
2183
2209
  isLogged: isLogged,
2210
+ isLogined: isLogined,
2184
2211
  isObject: isObject,
2185
2212
  jointUrl: jointUrl,
2186
2213
  loadJs: loadJs,
package/lib/mainComp.js CHANGED
@@ -1402,7 +1402,7 @@ var isFunction = function isFunction(obj) {
1402
1402
  };
1403
1403
 
1404
1404
  /**
1405
- * isLogged
1405
+ * isLogined
1406
1406
  * @desc:是否登录(用于路由守卫中)
1407
1407
  * @author huangbo
1408
1408
  * @date 2022年5月7日
@@ -1415,7 +1415,9 @@ var isFunction = function isFunction(obj) {
1415
1415
  * @param {sting} [loginPage] - 第三方登录页面地址
1416
1416
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1417
1417
  **/
1418
- var isLogged = function isLogged(_ref8) {
1418
+ var isLogined = function isLogined(_ref8) {
1419
+ var _this = this;
1420
+
1419
1421
  var to = _ref8.to,
1420
1422
  from = _ref8.from,
1421
1423
  next = _ref8.next,
@@ -1459,16 +1461,18 @@ var isLogged = function isLogged(_ref8) {
1459
1461
  data: to.query
1460
1462
  }).then(function (res) {
1461
1463
  if (res.rCode === 0) {
1462
- switch (res.results.statusCode) {
1464
+ var results = res.results;
1465
+
1466
+ switch (results.statusCode) {
1463
1467
  case 0:
1464
1468
  var storage = getStorage('storage');
1465
1469
  setStorage({
1466
1470
  type: storage,
1467
1471
  key: {
1468
- ssId: res.results.ssId,
1469
- token: res.results.token,
1470
- Authorization: res.results.token,
1471
- deviceUnique: res.results.deviceUnique
1472
+ ssId: results.ssId,
1473
+ token: results.token,
1474
+ Authorization: results.token,
1475
+ deviceUnique: results.deviceUnique
1472
1476
  }
1473
1477
  });
1474
1478
  next();
@@ -1478,7 +1482,7 @@ var isLogged = function isLogged(_ref8) {
1478
1482
  case 2:
1479
1483
  break;
1480
1484
  case 3:
1481
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1485
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1482
1486
  if (to.query.openType) {
1483
1487
  switch (to.query.openType) {
1484
1488
  case 'self':
@@ -1502,6 +1506,25 @@ var isLogged = function isLogged(_ref8) {
1502
1506
  }
1503
1507
  }
1504
1508
  break;
1509
+ case 4:
1510
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1511
+ confirmButtonText: '确定',
1512
+ type: 'error'
1513
+ }).then(function () {
1514
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1515
+ window.location.href = delUrlParam({ key: 'code' });
1516
+ if (loginPage) {
1517
+ win.top.location.replace(loginPage);
1518
+ } else if (document.referrer) {
1519
+ win.top.location.replace(document.referrer);
1520
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1521
+ win.top.location.href = './login.html';
1522
+ } else {
1523
+ next('/login');
1524
+ }
1525
+ }).catch(function (e) {});
1526
+ break;
1527
+ default:
1505
1528
  }
1506
1529
  } else {
1507
1530
  if (token) {
@@ -1530,6 +1553,9 @@ var isLogged = function isLogged(_ref8) {
1530
1553
  }
1531
1554
  }
1532
1555
  };
1556
+ var isLogged = function isLogged(res) {
1557
+ isLogined(res);
1558
+ };
1533
1559
 
1534
1560
  /**
1535
1561
  * isObject
@@ -2181,6 +2207,7 @@ var watermark = function watermark(option) {
2181
2207
  indexOfObj: indexOfObj,
2182
2208
  isFunction: isFunction,
2183
2209
  isLogged: isLogged,
2210
+ isLogined: isLogined,
2184
2211
  isObject: isObject,
2185
2212
  jointUrl: jointUrl,
2186
2213
  loadJs: loadJs,
package/lib/nav.js CHANGED
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,
package/lib/page.js CHANGED
@@ -1403,7 +1403,7 @@ var isFunction = function isFunction(obj) {
1403
1403
  };
1404
1404
 
1405
1405
  /**
1406
- * isLogged
1406
+ * isLogined
1407
1407
  * @desc:是否登录(用于路由守卫中)
1408
1408
  * @author huangbo
1409
1409
  * @date 2022年5月7日
@@ -1416,7 +1416,9 @@ var isFunction = function isFunction(obj) {
1416
1416
  * @param {sting} [loginPage] - 第三方登录页面地址
1417
1417
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
1418
1418
  **/
1419
- var isLogged = function isLogged(_ref8) {
1419
+ var isLogined = function isLogined(_ref8) {
1420
+ var _this = this;
1421
+
1420
1422
  var to = _ref8.to,
1421
1423
  from = _ref8.from,
1422
1424
  next = _ref8.next,
@@ -1460,16 +1462,18 @@ var isLogged = function isLogged(_ref8) {
1460
1462
  data: to.query
1461
1463
  }).then(function (res) {
1462
1464
  if (res.rCode === 0) {
1463
- switch (res.results.statusCode) {
1465
+ var results = res.results;
1466
+
1467
+ switch (results.statusCode) {
1464
1468
  case 0:
1465
1469
  var storage = getStorage('storage');
1466
1470
  setStorage({
1467
1471
  type: storage,
1468
1472
  key: {
1469
- ssId: res.results.ssId,
1470
- token: res.results.token,
1471
- Authorization: res.results.token,
1472
- deviceUnique: res.results.deviceUnique
1473
+ ssId: results.ssId,
1474
+ token: results.token,
1475
+ Authorization: results.token,
1476
+ deviceUnique: results.deviceUnique
1473
1477
  }
1474
1478
  });
1475
1479
  next();
@@ -1479,7 +1483,7 @@ var isLogged = function isLogged(_ref8) {
1479
1483
  case 2:
1480
1484
  break;
1481
1485
  case 3:
1482
- var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1486
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1483
1487
  if (to.query.openType) {
1484
1488
  switch (to.query.openType) {
1485
1489
  case 'self':
@@ -1503,6 +1507,25 @@ var isLogged = function isLogged(_ref8) {
1503
1507
  }
1504
1508
  }
1505
1509
  break;
1510
+ case 4:
1511
+ _this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
1512
+ confirmButtonText: '确定',
1513
+ type: 'error'
1514
+ }).then(function () {
1515
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
1516
+ window.location.href = delUrlParam({ key: 'code' });
1517
+ if (loginPage) {
1518
+ win.top.location.replace(loginPage);
1519
+ } else if (document.referrer) {
1520
+ win.top.location.replace(document.referrer);
1521
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
1522
+ win.top.location.href = './login.html';
1523
+ } else {
1524
+ next('/login');
1525
+ }
1526
+ }).catch(function (e) {});
1527
+ break;
1528
+ default:
1506
1529
  }
1507
1530
  } else {
1508
1531
  if (token) {
@@ -1531,6 +1554,9 @@ var isLogged = function isLogged(_ref8) {
1531
1554
  }
1532
1555
  }
1533
1556
  };
1557
+ var isLogged = function isLogged(res) {
1558
+ isLogined(res);
1559
+ };
1534
1560
 
1535
1561
  /**
1536
1562
  * isObject
@@ -2182,6 +2208,7 @@ var watermark = function watermark(option) {
2182
2208
  indexOfObj: indexOfObj,
2183
2209
  isFunction: isFunction,
2184
2210
  isLogged: isLogged,
2211
+ isLogined: isLogined,
2185
2212
  isObject: isObject,
2186
2213
  jointUrl: jointUrl,
2187
2214
  loadJs: loadJs,