@@ -246,13 +246,13 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
246246 //SuperMap.Support.cors = false;
247247 $ ( document ) . ready ( function ( ) {
248248 $ ( "#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 ) ;
251251
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 ) ;
256256 } ) ;
257257
258258 /*登录*/
@@ -318,16 +318,9 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
318318 return ;
319319 }
320320 ol . supermap . SecurityManager . destroyToken ( serviceUrl ) ;
321+ ol . supermap . SecurityManager . destroyKey ( serviceUrl ) ;
321322 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 ) ;
331324 }
332325
333326 function getPortalTokenServiceUrl ( ) {
@@ -344,6 +337,7 @@ <h4 data-i18n="resources.title_iPortalSecurity"></h4>
344337 if ( ! checkUrl ( serviceUrl ) ) {
345338 return ;
346339 }
340+ ol . supermap . SecurityManager . destroyToken ( serviceUrl ) ;
347341 ol . supermap . SecurityManager . destroyKey ( serviceUrl ) ;
348342 ol . supermap . SecurityManager . registerKey ( serviceUrl , key ) ;
349343 requestService ( serviceUrl ) ;
0 commit comments