eoss-ui 0.4.94 → 0.4.96
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/button-group.js +32 -25
- package/lib/button.js +32 -25
- package/lib/checkbox-group.js +32 -25
- package/lib/data-table-form.js +32 -25
- package/lib/data-table.js +32 -25
- package/lib/date-picker.js +32 -25
- package/lib/dialog.js +32 -25
- package/lib/eoss-ui.common.js +106 -107
- package/lib/flow-group.js +32 -25
- package/lib/flow-list.js +32 -25
- package/lib/flow.js +41 -29
- package/lib/form.js +32 -25
- package/lib/handle-user.js +32 -25
- package/lib/handler.js +32 -25
- package/lib/index.js +1 -1
- package/lib/input-number.js +32 -25
- package/lib/input.js +32 -25
- package/lib/login.js +32 -25
- package/lib/main.js +86 -92
- package/lib/nav.js +32 -25
- package/lib/page.js +32 -25
- package/lib/player.js +32 -25
- package/lib/qr-code.js +32 -25
- package/lib/radio-group.js +32 -25
- package/lib/retrial-auth.js +32 -25
- package/lib/select-ganged.js +32 -25
- package/lib/select.js +32 -25
- package/lib/selector-panel.js +32 -25
- package/lib/selector.js +32 -25
- package/lib/sizer.js +32 -25
- package/lib/steps.js +32 -25
- package/lib/switch.js +32 -25
- package/lib/table-form.js +32 -25
- package/lib/tabs.js +32 -25
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/tips.js +32 -25
- package/lib/tree-group.js +32 -25
- package/lib/tree.js +32 -25
- package/lib/upload.js +32 -25
- package/lib/utils/util.js +32 -25
- package/lib/wujie.js +32 -25
- package/lib/wxlogin.js +32 -25
- package/package.json +1 -1
- package/packages/flow/src/main.vue +58 -51
- package/packages/main/src/main.vue +36 -39
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/toolbar.css +1 -1
- package/packages/theme-chalk/src/toolbar.scss +7 -0
- package/src/index.js +1 -1
- package/src/utils/util.js +64 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:12px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}.es-toolbar .el-form-item__content,.es-toolbar .el-form-item__label{line-height:32px!important}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}
|
|
1
|
+
@charset "UTF-8";.es-toolbar{padding:6px 12px;border-bottom:1px solid #d9d9d9;position:relative;background-color:#fff}.es-toolbar .es-toolbar-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.es-toolbar .es-toolbar-content .es-button-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.es-toolbar .es-toolbar-content .es-form{background:0 0}.es-toolbar .es-toolbar-content .es-form .es-form-content{padding:0}.es-toolbar .es-toolbar-content .es-form .el-form-item{margin-bottom:0}.es-toolbar .es-toolbar-content .es-advanced-btn{margin-left:12px}.es-toolbar .es-toolbar-content .es-toolbar-text{line-height:32px}.es-toolbar .es-toolbar-content .es-toolbar-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.es-toolbar .es-toolbar-content .es-toolbar-info .es-info{font-size:13px;margin-left:20px}.es-toolbar .es-toolbar-content .el-menu--horizontal{border-bottom:0;position:relative;bottom:-6px}.es-toolbar .es-toolbar-content .el-menu-item{height:32px;line-height:24px}.es-toolbar .es-toolbar-content .el-input__inner,.es-toolbar .es-toolbar-content .es-checkbox-group{height:32px;line-height:32px}.es-toolbar .es-toolbar-content .es-radio-group,.es-toolbar .es-toolbar-content .es-switch-content{line-height:32px}.es-toolbar .es-toolbar-content .el-switch{top:-2px}.es-toolbar .es-toolbar-content .el-button span{line-height:14px}.es-toolbar .es-toolbar-content .el-checkbox:not(:last-child),.es-toolbar .es-toolbar-content .el-radio:not(:last-child){margin-right:8px}.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-checkbox+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-radio+.el-form-item,.es-toolbar .es-toolbar-content .el-form-item.es-toolbar-item-switch+.el-form-item{margin-left:16px}.es-toolbar .es-toolbar-content .el-form-item .el-input__icon{line-height:32px;vertical-align:top}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner{width:100%;max-width:156px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange{max-width:300px}.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-input__icon,.es-toolbar .es-toolbar-content .es-form-search-small .el-input__inner.el-date-editor--daterange .el-range-separator{line-height:24px}.es-toolbar .es-advanced-filter{margin-top:20px;z-index:9}.es-toolbar .es-advanced-filter.es-absolute{position:absolute;left:0;top:45px;right:0;margin-top:0;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);box-shadow:0 1px 10px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.08),0 2px 4px -1px rgba(0,0,0,.12);border-bottom-left-radius:6px;border-bottom-right-radius:6px}.es-toolbar .es-advanced-filter.es-absolute .es-form{background-color:#fff;border:1px solid #d9d9d9;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:0;padding:20px 20px 20px 10px}.es-toolbar .el-form-item__content,.es-toolbar .el-form-item__label{line-height:32px!important}.es-toolbar .el-button.es-upload{padding:0!important;border:0!important}
|
package/lib/tips.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|
package/lib/tree-group.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|
package/lib/tree.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|
package/lib/upload.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|
package/lib/utils/util.js
CHANGED
|
@@ -640,7 +640,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
640
640
|
* @author huangbo
|
|
641
641
|
* @date 2022年5月7日
|
|
642
642
|
* @param {String} [url] - url地址
|
|
643
|
-
* @param {String} [key] - 参数名
|
|
643
|
+
* @param {String,Array} [key] - 参数名
|
|
644
644
|
**/
|
|
645
645
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
646
646
|
var url = _ref2.url,
|
|
@@ -648,17 +648,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
648
648
|
|
|
649
649
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
650
650
|
var param = getParams({ url: src });
|
|
651
|
-
if (param &&
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
651
|
+
if (param && key.length) {
|
|
652
|
+
if (Array.isArray(key)) {
|
|
653
|
+
key.forEach(function (item) {
|
|
654
|
+
if (param.hasOwnProperty(item)) {
|
|
655
|
+
var reg = item + '=' + param[item];
|
|
656
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
657
|
+
src = src.replace(reg + '&', '');
|
|
658
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
659
|
+
src = src.replace('&' + reg, '');
|
|
660
|
+
} else {
|
|
661
|
+
src = src.replace(reg, '');
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (Object.keys(param).length === key.length) {
|
|
665
|
+
src = src.replace('?', '');
|
|
666
|
+
}
|
|
667
|
+
});
|
|
660
668
|
} else {
|
|
661
|
-
|
|
669
|
+
if (param.hasOwnProperty(key)) {
|
|
670
|
+
var reg = key + '=' + param[key];
|
|
671
|
+
if (Object.keys(param).length > 1) {
|
|
672
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
673
|
+
src = src.replace(reg + '&', '');
|
|
674
|
+
}
|
|
675
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
676
|
+
src = src.replace('&' + reg, '');
|
|
677
|
+
}
|
|
678
|
+
} else {
|
|
679
|
+
src = src.replace('?' + reg, '');
|
|
680
|
+
}
|
|
681
|
+
}
|
|
662
682
|
}
|
|
663
683
|
}
|
|
664
684
|
return src;
|
|
@@ -1858,20 +1878,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1858
1878
|
} else {
|
|
1859
1879
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1860
1880
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1861
|
-
var url = win.top.location.href;
|
|
1862
|
-
if (to.query.openType) {
|
|
1863
|
-
switch (to.query.openType) {
|
|
1864
|
-
case 'self':
|
|
1865
|
-
url = win.location.href;
|
|
1866
|
-
break;
|
|
1867
|
-
case 'blank':
|
|
1868
|
-
url = win.open(url);
|
|
1869
|
-
break;
|
|
1870
|
-
case 'parent':
|
|
1871
|
-
url = win.parent.location.href;
|
|
1872
|
-
break;
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
1881
|
ajax({
|
|
1876
1882
|
method: 'post',
|
|
1877
1883
|
url: _api.authCenter,
|
|
@@ -1899,6 +1905,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1899
1905
|
case 2:
|
|
1900
1906
|
break;
|
|
1901
1907
|
case 3:
|
|
1908
|
+
var url = win.top.location.href;
|
|
1902
1909
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1903
1910
|
if (to.query.openType) {
|
|
1904
1911
|
switch (to.query.openType) {
|
package/lib/wujie.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|
package/lib/wxlogin.js
CHANGED
|
@@ -725,7 +725,7 @@ var debounce = function debounce(callback, delay) {
|
|
|
725
725
|
* @author huangbo
|
|
726
726
|
* @date 2022年5月7日
|
|
727
727
|
* @param {String} [url] - url地址
|
|
728
|
-
* @param {String} [key] - 参数名
|
|
728
|
+
* @param {String,Array} [key] - 参数名
|
|
729
729
|
**/
|
|
730
730
|
var delUrlParam = function delUrlParam(_ref2) {
|
|
731
731
|
var url = _ref2.url,
|
|
@@ -733,17 +733,37 @@ var delUrlParam = function delUrlParam(_ref2) {
|
|
|
733
733
|
|
|
734
734
|
var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
|
|
735
735
|
var param = getParams({ url: src });
|
|
736
|
-
if (param &&
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
736
|
+
if (param && key.length) {
|
|
737
|
+
if (Array.isArray(key)) {
|
|
738
|
+
key.forEach(function (item) {
|
|
739
|
+
if (param.hasOwnProperty(item)) {
|
|
740
|
+
var reg = item + '=' + param[item];
|
|
741
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
742
|
+
src = src.replace(reg + '&', '');
|
|
743
|
+
} else if (src.indexOf('&' + reg) > -1) {
|
|
744
|
+
src = src.replace('&' + reg, '');
|
|
745
|
+
} else {
|
|
746
|
+
src = src.replace(reg, '');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
if (Object.keys(param).length === key.length) {
|
|
750
|
+
src = src.replace('?', '');
|
|
751
|
+
}
|
|
752
|
+
});
|
|
745
753
|
} else {
|
|
746
|
-
|
|
754
|
+
if (param.hasOwnProperty(key)) {
|
|
755
|
+
var reg = key + '=' + param[key];
|
|
756
|
+
if (Object.keys(param).length > 1) {
|
|
757
|
+
if (src.indexOf(reg + '&') > -1) {
|
|
758
|
+
src = src.replace(reg + '&', '');
|
|
759
|
+
}
|
|
760
|
+
if (src.indexOf('&' + reg) > -1) {
|
|
761
|
+
src = src.replace('&' + reg, '');
|
|
762
|
+
}
|
|
763
|
+
} else {
|
|
764
|
+
src = src.replace('?' + reg, '');
|
|
765
|
+
}
|
|
766
|
+
}
|
|
747
767
|
}
|
|
748
768
|
}
|
|
749
769
|
return src;
|
|
@@ -1943,20 +1963,6 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1943
1963
|
} else {
|
|
1944
1964
|
var token = getStorage('token') || getStorage('Authorization');
|
|
1945
1965
|
if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
|
|
1946
|
-
var url = win.top.location.href;
|
|
1947
|
-
if (to.query.openType) {
|
|
1948
|
-
switch (to.query.openType) {
|
|
1949
|
-
case 'self':
|
|
1950
|
-
url = win.location.href;
|
|
1951
|
-
break;
|
|
1952
|
-
case 'blank':
|
|
1953
|
-
url = win.open(url);
|
|
1954
|
-
break;
|
|
1955
|
-
case 'parent':
|
|
1956
|
-
url = win.parent.location.href;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
1966
|
ajax({
|
|
1961
1967
|
method: 'post',
|
|
1962
1968
|
url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
|
|
@@ -1984,6 +1990,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
1984
1990
|
case 2:
|
|
1985
1991
|
break;
|
|
1986
1992
|
case 3:
|
|
1993
|
+
var url = win.top.location.href;
|
|
1987
1994
|
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
|
|
1988
1995
|
if (to.query.openType) {
|
|
1989
1996
|
switch (to.query.openType) {
|