ecinc-cloud-mappaio 9.7.6 → 9.7.7
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/ecmappaio.common.js +8 -17
- package/lib/ecmappaio.umd.js +8 -17
- package/lib/ecmappaio.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecmappaio.common.js
CHANGED
|
@@ -1045,14 +1045,9 @@ var actions = {
|
|
|
1045
1045
|
window.$user.findUserRolePermissions().then(function (response) {
|
|
1046
1046
|
if (response.code === 'success') {
|
|
1047
1047
|
var data = response.body;
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1052
|
-
window.$auth.setToken(jwtToken);
|
|
1053
|
-
}
|
|
1054
|
-
} catch (e) {
|
|
1055
|
-
console.log(e);
|
|
1048
|
+
if (!window.$auth.getToken() !== inJwtToken && inJwtToken) {
|
|
1049
|
+
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1050
|
+
window.$auth.setToken(jwtToken);
|
|
1056
1051
|
}
|
|
1057
1052
|
window.$auth.setTicket(data[window.ecwebTicket || 'ecweb-ticket']);
|
|
1058
1053
|
window.$auth.setCsrfToken(data['ecweb-csrf-token']);
|
|
@@ -1167,15 +1162,10 @@ var actions = {
|
|
|
1167
1162
|
window.$user.findUserRolePermissions().then(function (response) {
|
|
1168
1163
|
if (response.code === 'success') {
|
|
1169
1164
|
var data = response.body;
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
window.$auth.setToken(jwtToken);
|
|
1175
|
-
}
|
|
1176
|
-
} catch (e) {
|
|
1177
|
-
console.log(e);
|
|
1178
|
-
}
|
|
1165
|
+
|
|
1166
|
+
// 始终先设置产品代码和令牌,确保 setTicket 使用正确的闭包 productCode
|
|
1167
|
+
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1168
|
+
window.$auth.setToken(jwtToken);
|
|
1179
1169
|
window.$auth.setTicket(data[window.ecwebTicket || 'ecweb-ticket']);
|
|
1180
1170
|
window.$auth.setCsrfToken(data['ecweb-csrf-token']);
|
|
1181
1171
|
commit('SET_ROLES', data['ROLE_CODE_LIST']);
|
|
@@ -54907,6 +54897,7 @@ var auth_install = function install(Vue) {
|
|
|
54907
54897
|
},
|
|
54908
54898
|
removeTicket: function removeTicket() {
|
|
54909
54899
|
js_cookie_default().remove((window.ecwebTicket || 'ecweb-ticket') + port);
|
|
54900
|
+
js_cookie_default().remove((window.ecwebTicket || 'ecweb-ticket') + productCode);
|
|
54910
54901
|
return sessionStorage.removeItem((window.ecwebTicket || 'ecweb-ticket') + productCode);
|
|
54911
54902
|
},
|
|
54912
54903
|
getToken: function getToken() {
|
package/lib/ecmappaio.umd.js
CHANGED
|
@@ -1055,14 +1055,9 @@ var actions = {
|
|
|
1055
1055
|
window.$user.findUserRolePermissions().then(function (response) {
|
|
1056
1056
|
if (response.code === 'success') {
|
|
1057
1057
|
var data = response.body;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1062
|
-
window.$auth.setToken(jwtToken);
|
|
1063
|
-
}
|
|
1064
|
-
} catch (e) {
|
|
1065
|
-
console.log(e);
|
|
1058
|
+
if (!window.$auth.getToken() !== inJwtToken && inJwtToken) {
|
|
1059
|
+
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1060
|
+
window.$auth.setToken(jwtToken);
|
|
1066
1061
|
}
|
|
1067
1062
|
window.$auth.setTicket(data[window.ecwebTicket || 'ecweb-ticket']);
|
|
1068
1063
|
window.$auth.setCsrfToken(data['ecweb-csrf-token']);
|
|
@@ -1177,15 +1172,10 @@ var actions = {
|
|
|
1177
1172
|
window.$user.findUserRolePermissions().then(function (response) {
|
|
1178
1173
|
if (response.code === 'success') {
|
|
1179
1174
|
var data = response.body;
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
window.$auth.setToken(jwtToken);
|
|
1185
|
-
}
|
|
1186
|
-
} catch (e) {
|
|
1187
|
-
console.log(e);
|
|
1188
|
-
}
|
|
1175
|
+
|
|
1176
|
+
// 始终先设置产品代码和令牌,确保 setTicket 使用正确的闭包 productCode
|
|
1177
|
+
window.$auth.setProductCode(data['PRODUCT_CODE_LIST'], loginUser.sysCode);
|
|
1178
|
+
window.$auth.setToken(jwtToken);
|
|
1189
1179
|
window.$auth.setTicket(data[window.ecwebTicket || 'ecweb-ticket']);
|
|
1190
1180
|
window.$auth.setCsrfToken(data['ecweb-csrf-token']);
|
|
1191
1181
|
commit('SET_ROLES', data['ROLE_CODE_LIST']);
|
|
@@ -54917,6 +54907,7 @@ var auth_install = function install(Vue) {
|
|
|
54917
54907
|
},
|
|
54918
54908
|
removeTicket: function removeTicket() {
|
|
54919
54909
|
js_cookie_default().remove((window.ecwebTicket || 'ecweb-ticket') + port);
|
|
54910
|
+
js_cookie_default().remove((window.ecwebTicket || 'ecweb-ticket') + productCode);
|
|
54920
54911
|
return sessionStorage.removeItem((window.ecwebTicket || 'ecweb-ticket') + productCode);
|
|
54921
54912
|
},
|
|
54922
54913
|
getToken: function getToken() {
|