登录两秒之后更新防区
This commit is contained in:
		
							parent
							
								
									3d69411481
								
							
						
					
					
						commit
						ff01490947
					
				| 
						 | 
				
			
			@ -1,3 +1,3 @@
 | 
			
		|||
NODE_ENV = 'development'
 | 
			
		||||
VUE_APP_API_URL = 'http://114.66.57.139:5002'
 | 
			
		||||
VUE_APP_API_URL = 'http://114.66.57.139:8092'
 | 
			
		||||
VUE_APP_MESSAGE_SDK_DEBUG = true
 | 
			
		||||
| 
						 | 
				
			
			@ -87,10 +87,12 @@ export default {
 | 
			
		|||
            localStorage.setItem("isAdmin", res.data.isAdmin); // 权限
 | 
			
		||||
            // localStorage.setItem("PositionIds", res.data.PositionIds); // 阵地权限
 | 
			
		||||
            this.$router.push("/");
 | 
			
		||||
            let arrParams = res.data.positionIds;
 | 
			
		||||
            loginPosition([arrParams]).then((positionRes) => {
 | 
			
		||||
            loginPosition(res.data.positionIds).then((positionRes) => {
 | 
			
		||||
              if (positionRes.code === 0) {
 | 
			
		||||
                localStorage.setItem("PositionIds", positionRes.data); // 阵地权限
 | 
			
		||||
                localStorage.setItem(
 | 
			
		||||
                  "PositionIds",
 | 
			
		||||
                  JSON.stringify(positionRes.data)
 | 
			
		||||
                ); // 阵地权限
 | 
			
		||||
                this.$message.success("登录成功");
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(positionRes.msg);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -318,7 +318,9 @@ export default {
 | 
			
		|||
      this.zoomLevel = Math.round(this.map.getView().getZoom());
 | 
			
		||||
    },
 | 
			
		||||
    onMapLoad(map) {
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        this.initPositon();
 | 
			
		||||
      }, 2000);
 | 
			
		||||
      // 地图加载完成后的处理
 | 
			
		||||
      const camera = window.mapConfig || {};
 | 
			
		||||
      if (camera.isCamera) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue