@@ -246,13 +246,13 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
246
246
//SuperMap.Support.cors = false;
247
247
$ ( document ) . ready ( function ( ) {
248
248
$ ( "#loginUrl_iportal" ) . val ( "http://localhost:8090/iportal" ) ;
249
- $ ( "#tokenServiceUrl_iportal" ) . val ( "https://iportal.supermap.io/iportal/web/services/707656630 " ) ;
250
- $ ( "#token_iportal" ) . val ( "_Bo_ksR9DC56MvnAXc6liuhAdWmmt1SuoLX758QIeBJUvteLqHqUeeHnQ6OU0i0VBoN5FjNP_SOQ2o1xyudBjA.." ) ;
249
+ $ ( "#tokenServiceUrl_iportal" ) . val( "https://iportal.supermap.io/iportal/web/services/925052030 " ) ;
250
+ $ ( "#token_iportal" ) . val ( window . iportalToken ) ;
251
251
252
- $ ( "#serviceUrl_iportal" ) . val ( "http ://support .supermap.com.cn:8099/ywutslmu/ iserver/services/map-china400 /rest/maps/China_4326 " ) ;
253
- $ ( '#key_iportal' ) . val ( "CBIrkfXEAjydLrfp364qgM3P" ) ;
254
- $ ( "#serviceUrlMap_iportal" ) . val ( "http ://support .supermap.com.cn:8099/ywutslmu/ iserver/services/map-china400 /rest/maps/China_4326 " ) ;
255
- $ ( '#mapKey_iportal' ) . val ( "CBIrkfXEAjydLrfp364qgM3P" ) ;
252
+ $ ( "#serviceUrl_iportal" ) . val ( "https ://iportal .supermap.io/portalproxy/rz0fn8kv/ iserver/services/map-ChinaProvinces /rest/maps/ChinaProvinces " ) ;
253
+ $ ( '#key_iportal' ) . val ( window . iportalKey ) ;
254
+ $ ( "#serviceUrlMap_iportal" ) . val ( "https ://iportal .supermap.io/portalproxy/rz0fn8kv/ iserver/services/map-ChinaProvinces /rest/maps/ChinaProvinces " ) ;
255
+ $ ( '#mapKey_iportal' ) . val ( window . iportalKey ) ;
256
256
} ) ;
257
257
258
258
/*登录*/
@@ -318,16 +318,9 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
318
318
return ;
319
319
}
320
320
ol . supermap . SecurityManager . destroyToken ( serviceUrl ) ;
321
+ ol . supermap . SecurityManager . destroyKey ( serviceUrl ) ;
321
322
ol . supermap . SecurityManager . registerToken ( serviceUrl , key ) ;
322
- var iPortalService = new ol . supermap . iPortalService ( serviceUrl ) ;
323
- iPortalService . load ( ) . then ( function ( json ) {
324
- if ( json && json . error ) {
325
- widgets . alert . showAlert ( JSON . stringify ( json . error ) , false ) ;
326
- } else {
327
- widgets . alert . showAlert ( "proxiedUrl:" + iPortalService . proxiedUrl , true ) ;
328
- }
329
-
330
- } ) ;
323
+ requestService ( serviceUrl ) ;
331
324
}
332
325
333
326
function getPortalTokenServiceUrl ( ) {
@@ -344,6 +337,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
344
337
if ( ! checkUrl ( serviceUrl ) ) {
345
338
return ;
346
339
}
340
+ ol . supermap . SecurityManager . destroyToken ( serviceUrl ) ;
347
341
ol . supermap . SecurityManager . destroyKey ( serviceUrl ) ;
348
342
ol . supermap . SecurityManager . registerKey ( serviceUrl , key ) ;
349
343
requestService ( serviceUrl ) ;
0 commit comments