Skip to content

Commit b64172c

Browse files
committed
fix 请求未携带cookie的问题
1 parent 7c506d5 commit b64172c

15 files changed

+58638
-58584
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
- 修改 `L.supermap.tiandituLayer` 显示级别多一级的问题
208208
- 修改 `L.supermap.mapVLayer` 在高分屏时无法选中要素的问题
209209
- 修改 `L.supermap.echartsLayer` 删除其他图层 `zoomend` `moveend` 事件的问题
210+
- 修复请求无法携带cookie问题
210211

211212
### for OpenLayers
212213

@@ -215,16 +216,20 @@
215216
- 修复 `ol.source.Graphic` 在高分辨率屏下显示错位的问题
216217
- 修改 `ol.source.TileSuperMapRest` `ol.source.ImageSuperMapRest` 通过 `key` `token` 授权失败的问题
217218
- 修复 `ol.source.TileSuperMapRest``redirect` 参数默认为 `false` 但运行为 `true` 的问题
219+
- 修复请求无法携带cookie问题
218220

219221
### for MapboxGL
220222

221223
- 修复多个客户端专题图叠加偏移的问题
222224
- 修复 `mapboxgl.supermap.MapvLayer``clearData` 失败的问题
223225
- 修复客户端3D专题图高亮时底色穿透问题
224226
- 修复移除客户端3D专题图图层报错问题
227+
- 修复请求无法携带cookie问题
225228

226229
### Classic
227230

231+
- 修复请求无法携带cookie问题
232+
228233
## Examples
229234

230235
### for Leaflet

dist/iclient-classic.js

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ _SuperMap.SuperMap.Util.getTextBounds = function (style, text, element) {
11621162
Object.defineProperty(exports, "__esModule", {
11631163
value: true
11641164
});
1165-
exports.TopologyValidatorRule = exports.SummaryType = exports.StatisticAnalystMode = exports.AnalystSizeUnit = exports.AnalystAreaUnit = exports.ClipAnalystMode = exports.ChartType = exports.ClientType = exports.Exponent = exports.VariogramMode = exports.InterpolationAlgorithmType = exports.SearchMode = exports.PixelFormat = exports.StatisticMode = exports.UGCLayerType = exports.LayerType = exports.ColorSpaceType = exports.GridType = exports.TransferPreference = exports.TransferTactic = exports.EditType = exports.DataReturnMode = exports.SurfaceAnalystMethod = exports.SmoothMethod = exports.OutputType = exports.OverlayOperationType = exports.BufferEndType = exports.TurnType = exports.SupplyCenterType = exports.SideType = exports.DirectionType = exports.LabelOverLengthMode = exports.LabelBackShape = exports.AlongLineDirection = exports.FillGradientMode = exports.TextAlignment = exports.ColorGradientType = exports.ThemeType = exports.RangeMode = exports.GraduatedMode = exports.GraphAxesTextDisplayMode = exports.ThemeGraphType = exports.ThemeGraphTextFormat = exports.EngineType = exports.BufferRadiusUnit = exports.Unit = exports.MeasureMode = exports.SpatialRelationType = exports.SpatialQueryMode = exports.JoinType = exports.QueryOption = exports.GeometryType = exports.ServerType = exports.DataFormat = undefined;
1165+
exports.AggregationQueryBuilderType = exports.AggregationType = exports.TopologyValidatorRule = exports.SummaryType = exports.StatisticAnalystMode = exports.AnalystSizeUnit = exports.AnalystAreaUnit = exports.ClipAnalystMode = exports.ChartType = exports.ClientType = exports.Exponent = exports.VariogramMode = exports.InterpolationAlgorithmType = exports.SearchMode = exports.PixelFormat = exports.StatisticMode = exports.UGCLayerType = exports.LayerType = exports.ColorSpaceType = exports.GridType = exports.TransferPreference = exports.TransferTactic = exports.EditType = exports.DataReturnMode = exports.SurfaceAnalystMethod = exports.SmoothMethod = exports.OutputType = exports.OverlayOperationType = exports.BufferEndType = exports.TurnType = exports.SupplyCenterType = exports.SideType = exports.DirectionType = exports.LabelOverLengthMode = exports.LabelBackShape = exports.AlongLineDirection = exports.FillGradientMode = exports.TextAlignment = exports.ColorGradientType = exports.ThemeType = exports.RangeMode = exports.GraduatedMode = exports.GraphAxesTextDisplayMode = exports.ThemeGraphType = exports.ThemeGraphTextFormat = exports.EngineType = exports.BufferRadiusUnit = exports.Unit = exports.MeasureMode = exports.SpatialRelationType = exports.SpatialQueryMode = exports.JoinType = exports.QueryOption = exports.GeometryType = exports.ServerType = exports.DataFormat = undefined;
11661166

11671167
var _SuperMap = __webpack_require__(0);
11681168

@@ -2246,6 +2246,30 @@ var TopologyValidatorRule = exports.TopologyValidatorRule = _SuperMap.SuperMap.T
22462246
POINTNOIDENTICAL: "POINTNOIDENTICAL"
22472247
};
22482248

2249+
/**
2250+
* @name AggregationType
2251+
* @memberOf SuperMap
2252+
* @description 聚合查询枚举类,该类定义了Es数据服务中聚合查询模式常量
2253+
*
2254+
* @property {string} GEOHASH_GRID geohash_grid
2255+
* @property {string} FILTER filter
2256+
*/
2257+
var AggregationType = exports.AggregationType = _SuperMap.SuperMap.AggregationType = {
2258+
GEOHASH_GRID: "geohash_grid",
2259+
FILTER: "filter"
2260+
};
2261+
2262+
/**
2263+
* @name AggregationType
2264+
* @memberOf SuperMap
2265+
* @description 聚合查询中filter查询枚举类
2266+
*
2267+
* @property {string} GEO_BOUNDING_BOX geo_bounding_box
2268+
*/
2269+
var AggregationQueryBuilderType = exports.AggregationQueryBuilderType = _SuperMap.SuperMap.AggregationQueryBuilderType = {
2270+
GEO_BOUNDING_BOX: "geo_bounding_box"
2271+
};
2272+
22492273
/***/ }),
22502274
/* 3 */
22512275
/***/ (function(module, exports, __webpack_require__) {
@@ -2573,13 +2597,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
25732597

25742598
/**
25752599
* @class SuperMap.CommonServiceBase
2576-
* @category iServer
2600+
* @category iServer
25772601
* @classdesc 对接iServer各种服务的Service的基类。
25782602
* @param url - {string} 服务地址。
25792603
* @param options - {Object} 可选参数。如:<br>
25802604
* eventListeners - {Object} 事件监听器对象。有processCompleted属性可传入处理完成后的回调函数。processFailed属性传入处理失败后的回调函数。<br>
25812605
* proxy - {string} 服务代理地址<br>
25822606
* serverType - {SuperMap.ServerType} 服务器类型,iServer|iPortal|Online。<br>
2607+
* withCredentials - {boolean} 请求是否携带cookie,默认为true。<br>
25832608
* format -{SuperMap.DataFormat} 查询结果返回格式,目前支持iServerJSON 和GeoJSON两种格式。参数格式为"ISERVER","GEOJSON"。
25842609
*/
25852610
var CommonServiceBase = exports.CommonServiceBase = function () {
@@ -2618,6 +2643,8 @@ var CommonServiceBase = exports.CommonServiceBase = function () {
26182643

26192644
this.isInTheSameDomain = null;
26202645

2646+
this.withCredentials = true;
2647+
26212648
if (_Util.Util.isArray(url)) {
26222649
me.urls = url;
26232650
me.length = url.length;
@@ -2700,6 +2727,7 @@ var CommonServiceBase = exports.CommonServiceBase = function () {
27002727
* failure - {function} 请求失败后的回调函数。<br>
27012728
* scope - {Object} 如果回调函数是对象的一个公共方法,设定该对象的范围。<br>
27022729
* isInTheSameDomain - {boolean} 请求是否在当前域中。<br>
2730+
* withCredentials - {boolean} 请求是否携带cookie。<br>
27032731
*/
27042732

27052733
}, {
@@ -2708,6 +2736,7 @@ var CommonServiceBase = exports.CommonServiceBase = function () {
27082736
var me = this;
27092737
options.url = options.url || me.url;
27102738
options.proxy = options.proxy || me.proxy;
2739+
options.withCredentials = options.withCredentials != undefined ? options.withCredentials : me.withCredentials;
27112740
options.isInTheSameDomain = me.isInTheSameDomain;
27122741
//为url添加安全认证信息片段
27132742
var credential = this.getCredential(options.url);

dist/iclient-classic.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-leaflet.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)