eoss-ui 0.5.42 → 0.5.44
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/CHANGELOG.md +929 -0
- package/README.md +18 -0
- package/lib/button-group.js +120 -69
- package/lib/button.js +133 -72
- package/lib/checkbox-group.js +116 -67
- package/lib/data-table-form.js +126 -74
- package/lib/data-table.js +211 -106
- package/lib/date-picker.js +155 -71
- package/lib/dialog.js +132 -71
- package/lib/eoss-ui.common.js +744 -417
- package/lib/flow-group.js +144 -74
- package/lib/flow-list.js +120 -69
- package/lib/flow.js +169 -99
- package/lib/form.js +125 -69
- package/lib/handle-user.js +127 -70
- package/lib/handler.js +145 -92
- package/lib/index.js +1 -1
- package/lib/input-number.js +116 -67
- package/lib/input.js +116 -67
- package/lib/login.js +149 -97
- package/lib/main.js +234 -152
- package/lib/nav.js +116 -67
- package/lib/page.js +116 -67
- package/lib/player.js +116 -67
- package/lib/qr-code.js +116 -67
- package/lib/radio-group.js +116 -67
- package/lib/retrial-auth.js +130 -71
- package/lib/select-ganged.js +116 -67
- package/lib/select.js +116 -67
- package/lib/selector-panel.js +131 -74
- package/lib/selector.js +116 -67
- package/lib/sizer.js +116 -67
- package/lib/steps.js +116 -67
- package/lib/switch.js +116 -67
- package/lib/table-form.js +123 -72
- package/lib/tabs.js +119 -69
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +116 -67
- package/lib/tree-group.js +151 -71
- package/lib/tree.js +116 -67
- package/lib/upload.js +136 -78
- package/lib/utils/util.js +116 -67
- package/lib/wujie.js +116 -67
- package/lib/wxlogin.js +116 -67
- package/package.json +2 -2
- package/packages/button/src/main.vue +17 -5
- package/packages/button-group/src/main.vue +2 -0
- package/packages/data-table/src/column.vue +4 -0
- package/packages/data-table/src/main.vue +67 -28
- package/packages/data-table-form/src/tbody.vue +3 -0
- package/packages/date-picker/src/main.vue +48 -5
- package/packages/dialog/src/main.vue +14 -2
- package/packages/flow/src/component/CustomPreset.vue +14 -7
- package/packages/flow/src/component/FileList.vue +4 -2
- package/packages/flow/src/component/Preset.vue +11 -13
- package/packages/flow/src/form.vue +5 -4
- package/packages/flow/src/main.vue +7 -7
- package/packages/flow/src/table.vue +8 -1
- package/packages/flow-group/src/main.vue +26 -5
- package/packages/form/src/main.vue +12 -0
- package/packages/form/src/table.vue +2 -0
- package/packages/handle-user/src/main.vue +9 -1
- package/packages/handler/src/main.vue +31 -27
- package/packages/login/src/main.vue +35 -31
- package/packages/main/src/async-component/index.vue +4 -2
- package/packages/main/src/main.vue +62 -30
- package/packages/main/src/userinfo.vue +29 -25
- package/packages/retrial-auth/src/main.vue +12 -2
- package/packages/selector-panel/src/selection.vue +6 -0
- package/packages/tabs/src/main.vue +1 -0
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/data-table.scss +6 -0
- package/packages/tree-group/src/main.vue +36 -2
- package/packages/upload/src/main.vue +15 -6
- package/src/index.js +1 -1
- package/src/utils/util.js +132 -80
package/lib/form.js
CHANGED
|
@@ -257,7 +257,13 @@ var ajax = function ajax(_ref) {
|
|
|
257
257
|
if (response.status === 200) {
|
|
258
258
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
259
259
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
|
|
260
|
-
|
|
260
|
+
var href = '';
|
|
261
|
+
try {
|
|
262
|
+
href = win.top.location.href;
|
|
263
|
+
} catch (error) {
|
|
264
|
+
href = win.location.href;
|
|
265
|
+
}
|
|
266
|
+
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
261
267
|
var remind = sessionStorage.getItem('remind');
|
|
262
268
|
if (!remind) {
|
|
263
269
|
clearTimeout(loginMsg);
|
|
@@ -273,33 +279,37 @@ var ajax = function ajax(_ref) {
|
|
|
273
279
|
closeOnClickModal: false,
|
|
274
280
|
type: 'warning'
|
|
275
281
|
}).then(function () {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
pathname
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
282
|
+
try {
|
|
283
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
284
|
+
if (loginPage) {
|
|
285
|
+
var src = void 0;
|
|
286
|
+
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
287
|
+
var pathname = win.top.location.pathname;
|
|
288
|
+
if (pathname !== '/') {
|
|
289
|
+
pathname = pathname.split('/');
|
|
290
|
+
pathname.splice(pathname.length - 1);
|
|
291
|
+
pathname = pathname.join('/');
|
|
292
|
+
src = pathname + '/' + loginPage.replace('./', '');
|
|
293
|
+
} else {
|
|
294
|
+
src = pathname + loginPage.replace('./', '');
|
|
295
|
+
}
|
|
286
296
|
} else {
|
|
287
|
-
src =
|
|
297
|
+
src = loginPage;
|
|
288
298
|
}
|
|
299
|
+
win.top.location.href = src;
|
|
300
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
301
|
+
win.top.location.href = './login.html';
|
|
289
302
|
} else {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (hash) {
|
|
298
|
-
var len = win.top.location.href.indexOf(hash);
|
|
299
|
-
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
300
|
-
} else {
|
|
301
|
-
win.top.location.href = '/login.html';
|
|
303
|
+
var hash = win.top.location.hash;
|
|
304
|
+
if (hash) {
|
|
305
|
+
var len = win.top.location.href.indexOf(hash);
|
|
306
|
+
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
307
|
+
} else {
|
|
308
|
+
win.top.location.href = '/login.html';
|
|
309
|
+
}
|
|
302
310
|
}
|
|
311
|
+
} catch (error) {
|
|
312
|
+
win.postMessage({ type: 1 }, '*');
|
|
303
313
|
}
|
|
304
314
|
}).catch(function (e) {
|
|
305
315
|
sessionStorage.removeItem('remind');
|
|
@@ -737,7 +747,13 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
737
747
|
var url = _ref2.url,
|
|
738
748
|
key = _ref2.key;
|
|
739
749
|
|
|
740
|
-
var
|
|
750
|
+
var pUrl = '';
|
|
751
|
+
try {
|
|
752
|
+
pUrl = win.top.location.href;
|
|
753
|
+
} catch (error) {
|
|
754
|
+
pUrl = win.location.href;
|
|
755
|
+
}
|
|
756
|
+
var src = url ? decodeURI(url) : decodeURI(pUrl);
|
|
741
757
|
var param = getParams({ url: src });
|
|
742
758
|
if (param && key.length) {
|
|
743
759
|
if (Array.isArray(key)) {
|
|
@@ -1987,7 +2003,12 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1987
2003
|
}).catch(function () {});
|
|
1988
2004
|
return;
|
|
1989
2005
|
}
|
|
1990
|
-
var pathname =
|
|
2006
|
+
var pathname = '';
|
|
2007
|
+
try {
|
|
2008
|
+
pathname = win.top.location.pathname;
|
|
2009
|
+
} catch (error) {
|
|
2010
|
+
pathname = win.location.pathname;
|
|
2011
|
+
}
|
|
1991
2012
|
if (loginPage) {
|
|
1992
2013
|
sessionStorage.setItem('loginPage', loginPage);
|
|
1993
2014
|
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
@@ -2028,22 +2049,38 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2028
2049
|
deviceUnique: results.deviceUnique
|
|
2029
2050
|
}
|
|
2030
2051
|
});
|
|
2031
|
-
|
|
2032
|
-
url
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2052
|
+
try {
|
|
2053
|
+
var url = delUrlParam({
|
|
2054
|
+
url: win.top.location.href,
|
|
2055
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
2056
|
+
});
|
|
2057
|
+
win.top.location.href = url;
|
|
2058
|
+
setTimeout(function () {
|
|
2059
|
+
win.top.location.reload();
|
|
2060
|
+
}, 200);
|
|
2061
|
+
} catch (error) {
|
|
2062
|
+
var _url2 = delUrlParam({
|
|
2063
|
+
url: win.location.href,
|
|
2064
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
2065
|
+
});
|
|
2066
|
+
win.location.href = _url2;
|
|
2067
|
+
setTimeout(function () {
|
|
2068
|
+
win.location.reload();
|
|
2069
|
+
}, 200);
|
|
2070
|
+
}
|
|
2039
2071
|
break;
|
|
2040
2072
|
case 1:
|
|
2041
2073
|
break;
|
|
2042
2074
|
case 2:
|
|
2043
2075
|
break;
|
|
2044
2076
|
case 3:
|
|
2045
|
-
|
|
2046
|
-
|
|
2077
|
+
try {
|
|
2078
|
+
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
|
|
2079
|
+
win.top.location.href = href;
|
|
2080
|
+
} catch (error) {
|
|
2081
|
+
var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
|
|
2082
|
+
win.location.href = _href;
|
|
2083
|
+
}
|
|
2047
2084
|
break;
|
|
2048
2085
|
case 4:
|
|
2049
2086
|
eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
|
|
@@ -2051,14 +2088,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2051
2088
|
type: 'error',
|
|
2052
2089
|
callback: function callback() {
|
|
2053
2090
|
sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
win.top.location.href
|
|
2060
|
-
|
|
2061
|
-
|
|
2091
|
+
try {
|
|
2092
|
+
if (loginPage) {
|
|
2093
|
+
win.top.location.replace(loginPage);
|
|
2094
|
+
} else if (document.referrer) {
|
|
2095
|
+
win.top.location.replace(document.referrer);
|
|
2096
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2097
|
+
win.top.location.href = './login.html';
|
|
2098
|
+
} else {
|
|
2099
|
+
next('/login');
|
|
2100
|
+
}
|
|
2101
|
+
} catch (error) {
|
|
2102
|
+
win.postMessage({ type: 1 }, '*');
|
|
2062
2103
|
}
|
|
2063
2104
|
}
|
|
2064
2105
|
});
|
|
@@ -2070,14 +2111,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2070
2111
|
confirmButtonText: '确定',
|
|
2071
2112
|
type: 'error',
|
|
2072
2113
|
callback: function callback() {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
win.top.location.href
|
|
2079
|
-
|
|
2080
|
-
|
|
2114
|
+
try {
|
|
2115
|
+
if (loginPage) {
|
|
2116
|
+
win.top.location.replace(loginPage);
|
|
2117
|
+
} else if (document.referrer) {
|
|
2118
|
+
win.top.location.replace(document.referrer);
|
|
2119
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2120
|
+
win.top.location.href = './login.html';
|
|
2121
|
+
} else {
|
|
2122
|
+
next('/login');
|
|
2123
|
+
}
|
|
2124
|
+
} catch (error) {
|
|
2125
|
+
win.postMessage({ type: 1 }, '*');
|
|
2081
2126
|
}
|
|
2082
2127
|
}
|
|
2083
2128
|
});
|
|
@@ -2090,14 +2135,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2090
2135
|
next();
|
|
2091
2136
|
}
|
|
2092
2137
|
} else {
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
win.top.location.href
|
|
2099
|
-
|
|
2100
|
-
|
|
2138
|
+
try {
|
|
2139
|
+
if (loginPage) {
|
|
2140
|
+
win.top.location.replace(loginPage);
|
|
2141
|
+
} else if (document.referrer) {
|
|
2142
|
+
win.top.location.replace(document.referrer);
|
|
2143
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2144
|
+
win.top.location.href = './login.html';
|
|
2145
|
+
} else {
|
|
2146
|
+
next('/login');
|
|
2147
|
+
}
|
|
2148
|
+
} catch (error) {
|
|
2149
|
+
win.postMessage({ type: 1 }, '*');
|
|
2101
2150
|
}
|
|
2102
2151
|
}
|
|
2103
2152
|
}
|
|
@@ -2527,30 +2576,30 @@ var setStorage = function setStorage(_ref14) {
|
|
|
2527
2576
|
if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
|
|
2528
2577
|
value = JSON.stringify(value);
|
|
2529
2578
|
}
|
|
2530
|
-
if (type ===
|
|
2579
|
+
if (type === 'localStorage') {
|
|
2531
2580
|
if (typeof key === 'string') {
|
|
2532
|
-
|
|
2581
|
+
localStorage.setItem(key, value);
|
|
2533
2582
|
} else if (Array.isArray(key)) {
|
|
2534
2583
|
for (var i in key) {
|
|
2535
|
-
|
|
2584
|
+
localStorage.setItem(key[i], value);
|
|
2536
2585
|
}
|
|
2537
2586
|
} else {
|
|
2538
2587
|
for (var _i6 in key) {
|
|
2539
2588
|
var val = _typeof(key[_i6]) === 'object' ? JSON.stringify(key[_i6]) : key[_i6];
|
|
2540
|
-
|
|
2589
|
+
localStorage.setItem(_i6, val);
|
|
2541
2590
|
}
|
|
2542
2591
|
}
|
|
2543
2592
|
} else {
|
|
2544
2593
|
if (typeof key === 'string') {
|
|
2545
|
-
|
|
2594
|
+
sessionStorage.setItem(key, value);
|
|
2546
2595
|
} else if (Array.isArray(key)) {
|
|
2547
2596
|
for (var _i7 in key) {
|
|
2548
|
-
|
|
2597
|
+
sessionStorage.setItem(key[_i7], value);
|
|
2549
2598
|
}
|
|
2550
2599
|
} else {
|
|
2551
2600
|
for (var _i8 in key) {
|
|
2552
2601
|
var _val = _typeof(key[_i8]) === 'object' ? JSON.stringify(key[_i8]) : key[_i8];
|
|
2553
|
-
|
|
2602
|
+
sessionStorage.setItem(_i8, _val);
|
|
2554
2603
|
}
|
|
2555
2604
|
}
|
|
2556
2605
|
}
|
|
@@ -3703,7 +3752,7 @@ var bankCard = { pattern: new RegExp('^([1-9]{1})(\\d{14}|\\d{18})$'), message:
|
|
|
3703
3752
|
// ESM COMPAT FLAG
|
|
3704
3753
|
__webpack_require__.r(__webpack_exports__);
|
|
3705
3754
|
|
|
3706
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=
|
|
3755
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=7d054bca&
|
|
3707
3756
|
var render = function () {
|
|
3708
3757
|
var _vm = this
|
|
3709
3758
|
var _h = _vm.$createElement
|
|
@@ -14624,7 +14673,7 @@ var staticRenderFns = []
|
|
|
14624
14673
|
render._withStripped = true
|
|
14625
14674
|
|
|
14626
14675
|
|
|
14627
|
-
// CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=
|
|
14676
|
+
// CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=7d054bca&
|
|
14628
14677
|
|
|
14629
14678
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
14630
14679
|
var regenerator_ = __webpack_require__(12);
|
|
@@ -19119,6 +19168,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
19119
19168
|
}
|
|
19120
19169
|
_this6.values = util["a" /* default */].extend({}, data, value);
|
|
19121
19170
|
_this6.$emit('valueSuccess', _this6.values);
|
|
19171
|
+
_this6.$emit('value-success', _this6.values);
|
|
19122
19172
|
_this6.$emit('result', _this6.values);
|
|
19123
19173
|
}
|
|
19124
19174
|
}).catch(function (err) {
|
|
@@ -19200,6 +19250,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
19200
19250
|
if (valid) {
|
|
19201
19251
|
_this7.stepActive = index;
|
|
19202
19252
|
_this7.$emit('stepChange', _this7.stepActive);
|
|
19253
|
+
_this7.$emit('step-change', _this7.stepActive);
|
|
19203
19254
|
} else {
|
|
19204
19255
|
_this7.setScroll(valid, triggers, _this7.$refs.scrollbar);
|
|
19205
19256
|
}
|
|
@@ -19207,6 +19258,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
19207
19258
|
} else {
|
|
19208
19259
|
this.stepActive = index;
|
|
19209
19260
|
this.$emit('stepChange', this.stepActive);
|
|
19261
|
+
this.$emit('step-change', this.stepActive);
|
|
19210
19262
|
}
|
|
19211
19263
|
} else if (res.event === 'submit' || res.event === 'confirm' || res.type === 'submit') {
|
|
19212
19264
|
if (this.action) {
|
|
@@ -19246,13 +19298,16 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
19246
19298
|
} else if (res.event === 'stepPrev') {
|
|
19247
19299
|
this.stepActive -= 1;
|
|
19248
19300
|
this.$emit('stepChange', this.stepActive);
|
|
19301
|
+
this.$emit('step-change', this.stepActive);
|
|
19249
19302
|
this.$emit('stepPrev', res, this.models, this.getNewValue(util["a" /* default */].extend({}, this._value, this.models), res));
|
|
19250
19303
|
} else if (res.event === 'stepNext') {
|
|
19251
19304
|
this.$refs.esForm.validate(function (valid, fields, triggers) {
|
|
19252
19305
|
if (valid) {
|
|
19253
19306
|
_this7.stepActive += 1;
|
|
19254
19307
|
_this7.$emit('stepChange', _this7.stepActive);
|
|
19308
|
+
_this7.$emit('step-change', _this7.stepActive);
|
|
19255
19309
|
_this7.$emit('stepNext', res, _this7.models, _this7.getNewValue(util["a" /* default */].extend({}, _this7._value, _this7.models), res));
|
|
19310
|
+
_this7.$emit('step-next', res, _this7.models, _this7.getNewValue(util["a" /* default */].extend({}, _this7._value, _this7.models), res));
|
|
19256
19311
|
} else {
|
|
19257
19312
|
_this7.setScroll(valid, triggers, _this7.$refs.scrollbar);
|
|
19258
19313
|
}
|
|
@@ -19300,6 +19355,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
19300
19355
|
},
|
|
19301
19356
|
handleDataChange: function handleDataChange(res, data) {
|
|
19302
19357
|
this.$emit('dataChange', res, data);
|
|
19358
|
+
this.$emit('data-change', res, data);
|
|
19303
19359
|
},
|
|
19304
19360
|
handleCollapse: function handleCollapse() {},
|
|
19305
19361
|
handleChange: function handleChange(a, b, c) {
|
package/lib/handle-user.js
CHANGED
|
@@ -258,7 +258,13 @@ var ajax = function ajax(_ref) {
|
|
|
258
258
|
if (response.status === 200) {
|
|
259
259
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
260
260
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
|
|
261
|
-
|
|
261
|
+
var href = '';
|
|
262
|
+
try {
|
|
263
|
+
href = win.top.location.href;
|
|
264
|
+
} catch (error) {
|
|
265
|
+
href = win.location.href;
|
|
266
|
+
}
|
|
267
|
+
if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
|
|
262
268
|
var remind = sessionStorage.getItem('remind');
|
|
263
269
|
if (!remind) {
|
|
264
270
|
clearTimeout(loginMsg);
|
|
@@ -274,33 +280,37 @@ var ajax = function ajax(_ref) {
|
|
|
274
280
|
closeOnClickModal: false,
|
|
275
281
|
type: 'warning'
|
|
276
282
|
}).then(function () {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
pathname
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
283
|
+
try {
|
|
284
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
285
|
+
if (loginPage) {
|
|
286
|
+
var src = void 0;
|
|
287
|
+
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
288
|
+
var pathname = win.top.location.pathname;
|
|
289
|
+
if (pathname !== '/') {
|
|
290
|
+
pathname = pathname.split('/');
|
|
291
|
+
pathname.splice(pathname.length - 1);
|
|
292
|
+
pathname = pathname.join('/');
|
|
293
|
+
src = pathname + '/' + loginPage.replace('./', '');
|
|
294
|
+
} else {
|
|
295
|
+
src = pathname + loginPage.replace('./', '');
|
|
296
|
+
}
|
|
287
297
|
} else {
|
|
288
|
-
src =
|
|
298
|
+
src = loginPage;
|
|
289
299
|
}
|
|
300
|
+
win.top.location.href = src;
|
|
301
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
302
|
+
win.top.location.href = './login.html';
|
|
290
303
|
} else {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
if (hash) {
|
|
299
|
-
var len = win.top.location.href.indexOf(hash);
|
|
300
|
-
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
301
|
-
} else {
|
|
302
|
-
win.top.location.href = '/login.html';
|
|
304
|
+
var hash = win.top.location.hash;
|
|
305
|
+
if (hash) {
|
|
306
|
+
var len = win.top.location.href.indexOf(hash);
|
|
307
|
+
win.top.location.href = win.location.href.slice(0, len) + '#/login';
|
|
308
|
+
} else {
|
|
309
|
+
win.top.location.href = '/login.html';
|
|
310
|
+
}
|
|
303
311
|
}
|
|
312
|
+
} catch (error) {
|
|
313
|
+
win.postMessage({ type: 1 }, '*');
|
|
304
314
|
}
|
|
305
315
|
}).catch(function (e) {
|
|
306
316
|
sessionStorage.removeItem('remind');
|
|
@@ -738,7 +748,13 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
738
748
|
var url = _ref2.url,
|
|
739
749
|
key = _ref2.key;
|
|
740
750
|
|
|
741
|
-
var
|
|
751
|
+
var pUrl = '';
|
|
752
|
+
try {
|
|
753
|
+
pUrl = win.top.location.href;
|
|
754
|
+
} catch (error) {
|
|
755
|
+
pUrl = win.location.href;
|
|
756
|
+
}
|
|
757
|
+
var src = url ? decodeURI(url) : decodeURI(pUrl);
|
|
742
758
|
var param = getParams({ url: src });
|
|
743
759
|
if (param && key.length) {
|
|
744
760
|
if (Array.isArray(key)) {
|
|
@@ -1988,7 +2004,12 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1988
2004
|
}).catch(function () {});
|
|
1989
2005
|
return;
|
|
1990
2006
|
}
|
|
1991
|
-
var pathname =
|
|
2007
|
+
var pathname = '';
|
|
2008
|
+
try {
|
|
2009
|
+
pathname = win.top.location.pathname;
|
|
2010
|
+
} catch (error) {
|
|
2011
|
+
pathname = win.location.pathname;
|
|
2012
|
+
}
|
|
1992
2013
|
if (loginPage) {
|
|
1993
2014
|
sessionStorage.setItem('loginPage', loginPage);
|
|
1994
2015
|
if (!startWith(loginPage, ['http', '/'], true)) {
|
|
@@ -2029,22 +2050,38 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2029
2050
|
deviceUnique: results.deviceUnique
|
|
2030
2051
|
}
|
|
2031
2052
|
});
|
|
2032
|
-
|
|
2033
|
-
url
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2053
|
+
try {
|
|
2054
|
+
var url = delUrlParam({
|
|
2055
|
+
url: win.top.location.href,
|
|
2056
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
2057
|
+
});
|
|
2058
|
+
win.top.location.href = url;
|
|
2059
|
+
setTimeout(function () {
|
|
2060
|
+
win.top.location.reload();
|
|
2061
|
+
}, 200);
|
|
2062
|
+
} catch (error) {
|
|
2063
|
+
var _url2 = delUrlParam({
|
|
2064
|
+
url: win.location.href,
|
|
2065
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
2066
|
+
});
|
|
2067
|
+
win.location.href = _url2;
|
|
2068
|
+
setTimeout(function () {
|
|
2069
|
+
win.location.reload();
|
|
2070
|
+
}, 200);
|
|
2071
|
+
}
|
|
2040
2072
|
break;
|
|
2041
2073
|
case 1:
|
|
2042
2074
|
break;
|
|
2043
2075
|
case 2:
|
|
2044
2076
|
break;
|
|
2045
2077
|
case 3:
|
|
2046
|
-
|
|
2047
|
-
|
|
2078
|
+
try {
|
|
2079
|
+
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
|
|
2080
|
+
win.top.location.href = href;
|
|
2081
|
+
} catch (error) {
|
|
2082
|
+
var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
|
|
2083
|
+
win.location.href = _href;
|
|
2084
|
+
}
|
|
2048
2085
|
break;
|
|
2049
2086
|
case 4:
|
|
2050
2087
|
eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
|
|
@@ -2052,14 +2089,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2052
2089
|
type: 'error',
|
|
2053
2090
|
callback: function callback() {
|
|
2054
2091
|
sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
win.top.location.href
|
|
2061
|
-
|
|
2062
|
-
|
|
2092
|
+
try {
|
|
2093
|
+
if (loginPage) {
|
|
2094
|
+
win.top.location.replace(loginPage);
|
|
2095
|
+
} else if (document.referrer) {
|
|
2096
|
+
win.top.location.replace(document.referrer);
|
|
2097
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2098
|
+
win.top.location.href = './login.html';
|
|
2099
|
+
} else {
|
|
2100
|
+
next('/login');
|
|
2101
|
+
}
|
|
2102
|
+
} catch (error) {
|
|
2103
|
+
win.postMessage({ type: 1 }, '*');
|
|
2063
2104
|
}
|
|
2064
2105
|
}
|
|
2065
2106
|
});
|
|
@@ -2071,14 +2112,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2071
2112
|
confirmButtonText: '确定',
|
|
2072
2113
|
type: 'error',
|
|
2073
2114
|
callback: function callback() {
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
win.top.location.href
|
|
2080
|
-
|
|
2081
|
-
|
|
2115
|
+
try {
|
|
2116
|
+
if (loginPage) {
|
|
2117
|
+
win.top.location.replace(loginPage);
|
|
2118
|
+
} else if (document.referrer) {
|
|
2119
|
+
win.top.location.replace(document.referrer);
|
|
2120
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2121
|
+
win.top.location.href = './login.html';
|
|
2122
|
+
} else {
|
|
2123
|
+
next('/login');
|
|
2124
|
+
}
|
|
2125
|
+
} catch (error) {
|
|
2126
|
+
win.postMessage({ type: 1 }, '*');
|
|
2082
2127
|
}
|
|
2083
2128
|
}
|
|
2084
2129
|
});
|
|
@@ -2091,14 +2136,18 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2091
2136
|
next();
|
|
2092
2137
|
}
|
|
2093
2138
|
} else {
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
win.top.location.href
|
|
2100
|
-
|
|
2101
|
-
|
|
2139
|
+
try {
|
|
2140
|
+
if (loginPage) {
|
|
2141
|
+
win.top.location.replace(loginPage);
|
|
2142
|
+
} else if (document.referrer) {
|
|
2143
|
+
win.top.location.replace(document.referrer);
|
|
2144
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
2145
|
+
win.top.location.href = './login.html';
|
|
2146
|
+
} else {
|
|
2147
|
+
next('/login');
|
|
2148
|
+
}
|
|
2149
|
+
} catch (error) {
|
|
2150
|
+
win.postMessage({ type: 1 }, '*');
|
|
2102
2151
|
}
|
|
2103
2152
|
}
|
|
2104
2153
|
}
|
|
@@ -2528,30 +2577,30 @@ var setStorage = function setStorage(_ref14) {
|
|
|
2528
2577
|
if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
|
|
2529
2578
|
value = JSON.stringify(value);
|
|
2530
2579
|
}
|
|
2531
|
-
if (type ===
|
|
2580
|
+
if (type === 'localStorage') {
|
|
2532
2581
|
if (typeof key === 'string') {
|
|
2533
|
-
|
|
2582
|
+
localStorage.setItem(key, value);
|
|
2534
2583
|
} else if (Array.isArray(key)) {
|
|
2535
2584
|
for (var i in key) {
|
|
2536
|
-
|
|
2585
|
+
localStorage.setItem(key[i], value);
|
|
2537
2586
|
}
|
|
2538
2587
|
} else {
|
|
2539
2588
|
for (var _i6 in key) {
|
|
2540
2589
|
var val = _typeof(key[_i6]) === 'object' ? JSON.stringify(key[_i6]) : key[_i6];
|
|
2541
|
-
|
|
2590
|
+
localStorage.setItem(_i6, val);
|
|
2542
2591
|
}
|
|
2543
2592
|
}
|
|
2544
2593
|
} else {
|
|
2545
2594
|
if (typeof key === 'string') {
|
|
2546
|
-
|
|
2595
|
+
sessionStorage.setItem(key, value);
|
|
2547
2596
|
} else if (Array.isArray(key)) {
|
|
2548
2597
|
for (var _i7 in key) {
|
|
2549
|
-
|
|
2598
|
+
sessionStorage.setItem(key[_i7], value);
|
|
2550
2599
|
}
|
|
2551
2600
|
} else {
|
|
2552
2601
|
for (var _i8 in key) {
|
|
2553
2602
|
var _val = _typeof(key[_i8]) === 'object' ? JSON.stringify(key[_i8]) : key[_i8];
|
|
2554
|
-
|
|
2603
|
+
sessionStorage.setItem(_i8, _val);
|
|
2555
2604
|
}
|
|
2556
2605
|
}
|
|
2557
2606
|
}
|
|
@@ -3521,7 +3570,7 @@ module.exports = require("qs");
|
|
|
3521
3570
|
// ESM COMPAT FLAG
|
|
3522
3571
|
__webpack_require__.r(__webpack_exports__);
|
|
3523
3572
|
|
|
3524
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/handle-user/src/main.vue?vue&type=template&id=
|
|
3573
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/handle-user/src/main.vue?vue&type=template&id=0e0b2c4a&
|
|
3525
3574
|
var render = function () {
|
|
3526
3575
|
var _vm = this
|
|
3527
3576
|
var _h = _vm.$createElement
|
|
@@ -3609,7 +3658,7 @@ var staticRenderFns = []
|
|
|
3609
3658
|
render._withStripped = true
|
|
3610
3659
|
|
|
3611
3660
|
|
|
3612
|
-
// CONCATENATED MODULE: ./packages/handle-user/src/main.vue?vue&type=template&id=
|
|
3661
|
+
// CONCATENATED MODULE: ./packages/handle-user/src/main.vue?vue&type=template&id=0e0b2c4a&
|
|
3613
3662
|
|
|
3614
3663
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
3615
3664
|
var api = __webpack_require__(1);
|
|
@@ -3720,7 +3769,15 @@ var util = __webpack_require__(0);
|
|
|
3720
3769
|
duration: 500,
|
|
3721
3770
|
onClose: function onClose() {
|
|
3722
3771
|
util["a" /* default */].removeStorage(['mainConfig', 'jump']);
|
|
3723
|
-
|
|
3772
|
+
try {
|
|
3773
|
+
util["a" /* default */].win.top.location.reload();
|
|
3774
|
+
} catch (error) {
|
|
3775
|
+
try {
|
|
3776
|
+
util["a" /* default */].win.parent.location.reload();
|
|
3777
|
+
} catch (error) {
|
|
3778
|
+
util["a" /* default */].win.location.reload();
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3724
3781
|
}
|
|
3725
3782
|
});
|
|
3726
3783
|
} else {
|