|
@@ -22,14 +22,15 @@
|
|
|
const f = new FormData()
|
|
|
f.append('username', "supershow001")
|
|
|
f.append('password', "888888" )
|
|
|
- const {data}=await login(f)
|
|
|
- setToken(data.accessToken)
|
|
|
await this.$nextTick(()=>{
|
|
|
this.initMap()
|
|
|
- this.initMqtt({
|
|
|
- mqttResponse:this.mqttResponse
|
|
|
- })
|
|
|
- })
|
|
|
+ })
|
|
|
+ const {data}=await login(f)
|
|
|
+ setToken(data.accessToken)
|
|
|
+ this.initLayers();
|
|
|
+ this.initMqtt({
|
|
|
+ mqttResponse:this.mqttResponse
|
|
|
+ })
|
|
|
},
|
|
|
initMap(){
|
|
|
const map = L.map('map', {
|
|
@@ -54,7 +55,6 @@
|
|
|
L.imageOverlay(mapUrl, bounds).addTo(map);
|
|
|
map.setMaxBounds(bounds);
|
|
|
this.map=map
|
|
|
- this.initLayers();
|
|
|
},
|
|
|
getLayers(callback){
|
|
|
request({
|