gis-common 1.1.20 → 1.1.21
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/dist/resource.min.js +49 -40
- package/package.json +1 -1
package/dist/resource.min.js
CHANGED
|
@@ -229,24 +229,24 @@ __webpack_require__.d(__webpack_exports__, "DevicePixelRatio", function() { retu
|
|
|
229
229
|
});
|
|
230
230
|
// CONCATENATED MODULE: ./src/constant/ErrorTypeConstant.js
|
|
231
231
|
/* harmony default export */ var ErrorTypeConstant = ({
|
|
232
|
-
LOGIN_EXPIRED:
|
|
233
|
-
CROSS_ERROR:
|
|
234
|
-
UNEXIST_RESOURCE:
|
|
235
|
-
TIMEOUT:
|
|
236
|
-
INTERNAL_ERROR:
|
|
237
|
-
NETWORK_ERROR:
|
|
238
|
-
PROCESS_FAIL:
|
|
239
|
-
AUTH_VERIFY_ERROR:
|
|
240
|
-
NO_DATA_FOUND:
|
|
241
|
-
DUPLICATE_INSTANCE:
|
|
242
|
-
COORDINATE_ERROR:
|
|
243
|
-
JSON_PARSE_ERROR:
|
|
244
|
-
JSON_VALUE_ERROR:
|
|
245
|
-
PARAMETER_ERROR:
|
|
246
|
-
PARAMETER_ERROR_ARRAY:
|
|
247
|
-
PARAMETER_ERROR_STRING:
|
|
248
|
-
PARAMETER_ERROR_FUNCTION:
|
|
249
|
-
PARAMETER_ERROR_LACK:
|
|
232
|
+
LOGIN_EXPIRED: '登录信息过期,请重新登录',
|
|
233
|
+
CROSS_ERROR: '跨域访问',
|
|
234
|
+
UNEXIST_RESOURCE: '资源不存在',
|
|
235
|
+
TIMEOUT: '请求超时',
|
|
236
|
+
INTERNAL_ERROR: '内部错误',
|
|
237
|
+
NETWORK_ERROR: '请求失败,请检查网络是否已连接',
|
|
238
|
+
PROCESS_FAIL: '处理失败',
|
|
239
|
+
AUTH_VERIFY_ERROR: '权限验证失败',
|
|
240
|
+
NO_DATA_FOUND: '未找到数据',
|
|
241
|
+
DUPLICATE_INSTANCE: '实例为单例模式,不允许重复构建',
|
|
242
|
+
COORDINATE_ERROR: '坐标验证失败',
|
|
243
|
+
JSON_PARSE_ERROR: 'JSON解析失败,格式有误',
|
|
244
|
+
JSON_VALUE_ERROR: 'JSON无此键',
|
|
245
|
+
PARAMETER_ERROR: '参数验证失败',
|
|
246
|
+
PARAMETER_ERROR_ARRAY: '参数格式验证失败:必须是数组',
|
|
247
|
+
PARAMETER_ERROR_STRING: '参数格式验证失败:必须是字符',
|
|
248
|
+
PARAMETER_ERROR_FUNCTION: '参数格式验证失败:必须是函数',
|
|
249
|
+
PARAMETER_ERROR_LACK: '参数缺失'
|
|
250
250
|
});
|
|
251
251
|
// CONCATENATED MODULE: ./src/constant/LayerType.js
|
|
252
252
|
/* harmony default export */ var LayerType = ({
|
|
@@ -654,8 +654,8 @@ Array.prototype.clear = function () {
|
|
|
654
654
|
for (var i = 0; i < args.length; i++) {
|
|
655
655
|
var str = args[i];
|
|
656
656
|
if (str) {
|
|
657
|
-
var s = str.replace(/#|\//g,
|
|
658
|
-
var arr = s.split(
|
|
657
|
+
var s = str.replace(/#|\//g, '');
|
|
658
|
+
var arr = s.split('?');
|
|
659
659
|
if (arr.length > 1) {
|
|
660
660
|
for (var _i = 1; _i < arr.length; _i++) {
|
|
661
661
|
var res = void 0;
|
|
@@ -670,26 +670,35 @@ Array.prototype.clear = function () {
|
|
|
670
670
|
},
|
|
671
671
|
getExplorer: function getExplorer() {
|
|
672
672
|
var explorer = window.navigator.userAgent;
|
|
673
|
-
if (explorer.indexOf(
|
|
674
|
-
return
|
|
673
|
+
if (explorer.indexOf('MSIE') >= 0) {
|
|
674
|
+
return 'IE';
|
|
675
675
|
}
|
|
676
|
-
if (!!window.ActiveXObject ||
|
|
676
|
+
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
|
677
677
|
// IE
|
|
678
|
-
return
|
|
679
|
-
} else if (explorer.indexOf(
|
|
678
|
+
return 'IE';
|
|
679
|
+
} else if (explorer.indexOf('Firefox') >= 0) {
|
|
680
680
|
// Firefox
|
|
681
|
-
return
|
|
682
|
-
} else if (explorer.indexOf(
|
|
681
|
+
return 'Firefox';
|
|
682
|
+
} else if (explorer.indexOf('Chrome') >= 0) {
|
|
683
683
|
// Chrome
|
|
684
|
-
return
|
|
685
|
-
} else if (explorer.indexOf(
|
|
684
|
+
return 'Chrome';
|
|
685
|
+
} else if (explorer.indexOf('Opera') >= 0) {
|
|
686
686
|
// Opera
|
|
687
|
-
return
|
|
688
|
-
} else if (explorer.indexOf(
|
|
687
|
+
return 'Opera';
|
|
688
|
+
} else if (explorer.indexOf('Safari') >= 0) {
|
|
689
689
|
// Safari
|
|
690
|
-
return
|
|
690
|
+
return 'Safari';
|
|
691
691
|
}
|
|
692
692
|
},
|
|
693
|
+
detectOS: function detectOS() {
|
|
694
|
+
var os_type = '';
|
|
695
|
+
var windows = navigator.userAgent.indexOf('Windows', 0) != -1 ? 1 : 0;
|
|
696
|
+
var mac = navigator.userAgent.indexOf('mac', 0) != -1 ? 1 : 0;
|
|
697
|
+
var linux = navigator.userAgent.indexOf('Linux', 0) != -1 ? 1 : 0;
|
|
698
|
+
var unix = navigator.userAgent.indexOf('X11', 0) != -1 ? 1 : 0;
|
|
699
|
+
if (windows) os_type = 'MS Windows';else if (mac) os_type = 'Apple mac';else if (linux) os_type = 'Linux';else if (unix) os_type = 'Unix';
|
|
700
|
+
return os_type;
|
|
701
|
+
},
|
|
693
702
|
switchFullScreen: function switchFullScreen(status) {
|
|
694
703
|
if (status) {
|
|
695
704
|
var element = document.documentElement;
|
|
@@ -721,16 +730,16 @@ Array.prototype.clear = function () {
|
|
|
721
730
|
refreshScale: function refreshScale() {
|
|
722
731
|
var baseWidth = document.documentElement.clientWidth;
|
|
723
732
|
var baseHeight = document.documentElement.clientHeight;
|
|
724
|
-
var appStyle = document.getElementById(
|
|
733
|
+
var appStyle = document.getElementById('app').style;
|
|
725
734
|
var realRatio = baseWidth / baseHeight;
|
|
726
735
|
var designRatio = 16 / 9;
|
|
727
736
|
var scaleRate = baseWidth / 1920;
|
|
728
737
|
if (realRatio > designRatio) {
|
|
729
738
|
scaleRate = baseHeight / 1080;
|
|
730
739
|
}
|
|
731
|
-
appStyle.transformOrigin =
|
|
732
|
-
appStyle.transform =
|
|
733
|
-
appStyle.width = baseWidth / scaleRate +
|
|
740
|
+
appStyle.transformOrigin = 'left top';
|
|
741
|
+
appStyle.transform = 'scale(' + scaleRate + ') translateX(-49.99%)';
|
|
742
|
+
appStyle.width = baseWidth / scaleRate + 'px';
|
|
734
743
|
},
|
|
735
744
|
|
|
736
745
|
/**
|
|
@@ -738,8 +747,8 @@ Array.prototype.clear = function () {
|
|
|
738
747
|
*/
|
|
739
748
|
getHtmlFontSize: function getHtmlFontSize() {
|
|
740
749
|
var htmlwidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
741
|
-
var htmlDom = document.querySelector(
|
|
742
|
-
htmlDom.style.fontSize = htmlwidth / 192 +
|
|
750
|
+
var htmlDom = document.querySelector('html');
|
|
751
|
+
htmlDom.style.fontSize = htmlwidth / 192 + 'px';
|
|
743
752
|
}
|
|
744
753
|
});
|
|
745
754
|
// CONCATENATED MODULE: ./src/utils/Cookie.js
|
|
@@ -1211,8 +1220,8 @@ function splitWords(str) {
|
|
|
1211
1220
|
var a = parseFloat(value);
|
|
1212
1221
|
var degree = parseInt(a);
|
|
1213
1222
|
var min = parseInt((a - degree) * 60);
|
|
1214
|
-
var sec =
|
|
1215
|
-
return degree + '°' + min + '′' + sec + '″';
|
|
1223
|
+
var sec = (a - degree) * 3600 - min * 60;
|
|
1224
|
+
return degree + '°' + min + '′' + sec.toFixed(2) + '″';
|
|
1216
1225
|
}
|
|
1217
1226
|
if (lng && lat) {
|
|
1218
1227
|
res = format(lng) + ',' + format(lat);
|