ecinc-cloud-wappaio 9.6.428 → 9.6.430
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.
- package/lib/ecwappaio.common.js +23 -24
- package/lib/ecwappaio.umd.js +23 -24
- package/lib/ecwappaio.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecwappaio.common.js
CHANGED
|
@@ -10294,7 +10294,7 @@ var actions = {
|
|
|
10294
10294
|
return new Promise(function (resolve, reject) {
|
|
10295
10295
|
window.$user.findNavMenus(nowf).then( /*#__PURE__*/function () {
|
|
10296
10296
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
|
|
10297
|
-
var layout, accessedRoutes, topMenus,
|
|
10297
|
+
var layout, accessedRoutes, topMenus, loginUser, dynamicRoutes, key;
|
|
10298
10298
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10299
10299
|
while (1) switch (_context.prev = _context.next) {
|
|
10300
10300
|
case 0:
|
|
@@ -10302,19 +10302,29 @@ var actions = {
|
|
|
10302
10302
|
accessedRoutes = [];
|
|
10303
10303
|
topMenus = response.body.listdata.filter(function (item) {
|
|
10304
10304
|
if (item.moduleLevel === 1) return true;
|
|
10305
|
-
});
|
|
10305
|
+
}); //本次会话产品动态子路径
|
|
10306
|
+
_context.next = 5;
|
|
10307
|
+
return window.$user.getLoginUser(window.$auth.getToken());
|
|
10308
|
+
case 5:
|
|
10309
|
+
loginUser = _context.sent;
|
|
10310
|
+
dynamicRoutes = sessionStorage.getItem('dynamicRoutes-' + loginUser.personAccount);
|
|
10311
|
+
if (dynamicRoutes) {
|
|
10312
|
+
dynamicRoutes = JSON.parse(dynamicRoutes);
|
|
10313
|
+
loadWappRoutes(accessedRoutes, dynamicRoutes);
|
|
10314
|
+
}
|
|
10315
|
+
|
|
10316
|
+
//模块菜单定义路由
|
|
10306
10317
|
topMenus.forEach(function (item) {
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10318
|
+
if (!dynamicRoutes || item.id !== dynamicRoutes[0].meta.id) {
|
|
10319
|
+
var view = layout;
|
|
10320
|
+
if (item.href && (item.href.substring(0, 2) === '@/' || item.href.substring(0, 10) === '#/dcontent') && item.target === '_top') {
|
|
10321
|
+
view = window.$loadComponent(item.href);
|
|
10322
|
+
}
|
|
10323
|
+
var route = convertToRoute(view, item, null, null, null);
|
|
10324
|
+
accessedRoutes.push(route);
|
|
10325
|
+
var children = findChildrenRoute(view, response.body.listdata, item, null, null);
|
|
10326
|
+
accessedRoutes = accessedRoutes.concat(children);
|
|
10310
10327
|
}
|
|
10311
|
-
var route = convertToRoute(view, item, null, null, null);
|
|
10312
|
-
accessedRoutes.push(route);
|
|
10313
|
-
|
|
10314
|
-
// if (item.leafFlag === 0) {
|
|
10315
|
-
var children = findChildrenRoute(view, response.body.listdata, item, null, null);
|
|
10316
|
-
accessedRoutes = accessedRoutes.concat(children);
|
|
10317
|
-
// }
|
|
10318
10328
|
});
|
|
10319
10329
|
|
|
10320
10330
|
//产品定义子路由
|
|
@@ -10323,17 +10333,6 @@ var actions = {
|
|
|
10323
10333
|
loadWappRoutes(accessedRoutes, response.body.wappRoutes[key]);
|
|
10324
10334
|
}
|
|
10325
10335
|
}
|
|
10326
|
-
|
|
10327
|
-
//本次会话产品动态子路径
|
|
10328
|
-
_context.next = 7;
|
|
10329
|
-
return window.$user.getLoginUser(window.$auth.getToken());
|
|
10330
|
-
case 7:
|
|
10331
|
-
loginUser = _context.sent;
|
|
10332
|
-
dynamicRoutes = sessionStorage.getItem('dynamicRoutes-' + loginUser.personAccount);
|
|
10333
|
-
if (dynamicRoutes) {
|
|
10334
|
-
dynamicRoutes = JSON.parse(dynamicRoutes);
|
|
10335
|
-
loadWappRoutes(accessedRoutes, dynamicRoutes);
|
|
10336
|
-
}
|
|
10337
10336
|
commit('SET_ROUTES', accessedRoutes);
|
|
10338
10337
|
|
|
10339
10338
|
// 登录成功后连接webSocket
|
|
@@ -10362,7 +10361,7 @@ function loadWappRoutes(accessedRoutes, wappRoutes) {
|
|
|
10362
10361
|
wappRoutes.forEach(function (route) {
|
|
10363
10362
|
if (route.component && typeof route.component === 'string') {
|
|
10364
10363
|
route.component = window.$loadComponent(route.component);
|
|
10365
|
-
} else if (route.meta && route.meta.href && (route.href.
|
|
10364
|
+
} else if (route.meta && route.meta.href && (route.meta.href.indexOf('@/') === 0 || route.meta.href.indexOf('#/dcontent') === 0)) {
|
|
10366
10365
|
route.component = window.$loadComponent(route.meta.href);
|
|
10367
10366
|
}
|
|
10368
10367
|
accessedRoutes.push(route);
|
package/lib/ecwappaio.umd.js
CHANGED
|
@@ -10304,7 +10304,7 @@ var actions = {
|
|
|
10304
10304
|
return new Promise(function (resolve, reject) {
|
|
10305
10305
|
window.$user.findNavMenus(nowf).then( /*#__PURE__*/function () {
|
|
10306
10306
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
|
|
10307
|
-
var layout, accessedRoutes, topMenus,
|
|
10307
|
+
var layout, accessedRoutes, topMenus, loginUser, dynamicRoutes, key;
|
|
10308
10308
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10309
10309
|
while (1) switch (_context.prev = _context.next) {
|
|
10310
10310
|
case 0:
|
|
@@ -10312,19 +10312,29 @@ var actions = {
|
|
|
10312
10312
|
accessedRoutes = [];
|
|
10313
10313
|
topMenus = response.body.listdata.filter(function (item) {
|
|
10314
10314
|
if (item.moduleLevel === 1) return true;
|
|
10315
|
-
});
|
|
10315
|
+
}); //本次会话产品动态子路径
|
|
10316
|
+
_context.next = 5;
|
|
10317
|
+
return window.$user.getLoginUser(window.$auth.getToken());
|
|
10318
|
+
case 5:
|
|
10319
|
+
loginUser = _context.sent;
|
|
10320
|
+
dynamicRoutes = sessionStorage.getItem('dynamicRoutes-' + loginUser.personAccount);
|
|
10321
|
+
if (dynamicRoutes) {
|
|
10322
|
+
dynamicRoutes = JSON.parse(dynamicRoutes);
|
|
10323
|
+
loadWappRoutes(accessedRoutes, dynamicRoutes);
|
|
10324
|
+
}
|
|
10325
|
+
|
|
10326
|
+
//模块菜单定义路由
|
|
10316
10327
|
topMenus.forEach(function (item) {
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10328
|
+
if (!dynamicRoutes || item.id !== dynamicRoutes[0].meta.id) {
|
|
10329
|
+
var view = layout;
|
|
10330
|
+
if (item.href && (item.href.substring(0, 2) === '@/' || item.href.substring(0, 10) === '#/dcontent') && item.target === '_top') {
|
|
10331
|
+
view = window.$loadComponent(item.href);
|
|
10332
|
+
}
|
|
10333
|
+
var route = convertToRoute(view, item, null, null, null);
|
|
10334
|
+
accessedRoutes.push(route);
|
|
10335
|
+
var children = findChildrenRoute(view, response.body.listdata, item, null, null);
|
|
10336
|
+
accessedRoutes = accessedRoutes.concat(children);
|
|
10320
10337
|
}
|
|
10321
|
-
var route = convertToRoute(view, item, null, null, null);
|
|
10322
|
-
accessedRoutes.push(route);
|
|
10323
|
-
|
|
10324
|
-
// if (item.leafFlag === 0) {
|
|
10325
|
-
var children = findChildrenRoute(view, response.body.listdata, item, null, null);
|
|
10326
|
-
accessedRoutes = accessedRoutes.concat(children);
|
|
10327
|
-
// }
|
|
10328
10338
|
});
|
|
10329
10339
|
|
|
10330
10340
|
//产品定义子路由
|
|
@@ -10333,17 +10343,6 @@ var actions = {
|
|
|
10333
10343
|
loadWappRoutes(accessedRoutes, response.body.wappRoutes[key]);
|
|
10334
10344
|
}
|
|
10335
10345
|
}
|
|
10336
|
-
|
|
10337
|
-
//本次会话产品动态子路径
|
|
10338
|
-
_context.next = 7;
|
|
10339
|
-
return window.$user.getLoginUser(window.$auth.getToken());
|
|
10340
|
-
case 7:
|
|
10341
|
-
loginUser = _context.sent;
|
|
10342
|
-
dynamicRoutes = sessionStorage.getItem('dynamicRoutes-' + loginUser.personAccount);
|
|
10343
|
-
if (dynamicRoutes) {
|
|
10344
|
-
dynamicRoutes = JSON.parse(dynamicRoutes);
|
|
10345
|
-
loadWappRoutes(accessedRoutes, dynamicRoutes);
|
|
10346
|
-
}
|
|
10347
10346
|
commit('SET_ROUTES', accessedRoutes);
|
|
10348
10347
|
|
|
10349
10348
|
// 登录成功后连接webSocket
|
|
@@ -10372,7 +10371,7 @@ function loadWappRoutes(accessedRoutes, wappRoutes) {
|
|
|
10372
10371
|
wappRoutes.forEach(function (route) {
|
|
10373
10372
|
if (route.component && typeof route.component === 'string') {
|
|
10374
10373
|
route.component = window.$loadComponent(route.component);
|
|
10375
|
-
} else if (route.meta && route.meta.href && (route.href.
|
|
10374
|
+
} else if (route.meta && route.meta.href && (route.meta.href.indexOf('@/') === 0 || route.meta.href.indexOf('#/dcontent') === 0)) {
|
|
10376
10375
|
route.component = window.$loadComponent(route.meta.href);
|
|
10377
10376
|
}
|
|
10378
10377
|
accessedRoutes.push(route);
|