|
@@ -42,18 +42,24 @@ export default {
|
|
|
},
|
|
|
watch: {},
|
|
|
created() {
|
|
|
- // this.superMapRootUrl = Cookies.get('superMap.iServer');
|
|
|
+ this.superMapRootUrl = Cookies.get('superMap.iServer');
|
|
|
//进入主页时就获取超图地址并存入cookie
|
|
|
-
|
|
|
+ if(this.superMapRootUrl != null && this.superMapRootUrl != '' && this.superMapRootUrl != undefined && this.superMapRootUrl != 'undefined'){
|
|
|
+ this.onload();
|
|
|
+ }else{
|
|
|
+ this.superMapInfo();
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.superMapInfo();
|
|
|
},
|
|
|
props: {},
|
|
|
methods: {
|
|
|
superMapInfo(){
|
|
|
getConfigKey('superMap.iServer').then(response => {
|
|
|
this.superMapRootUrl = response.msg;
|
|
|
+ Cookies.set('superMap.iServer', response.msg, {
|
|
|
+ expires: 300
|
|
|
+ })
|
|
|
this.onload();
|
|
|
})
|
|
|
},
|