Browse Source

完成地图接口优化

wzz 2 năm trước cách đây
mục cha
commit
ab5de12ef4
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      code/h5client-app/src/main/resources/view/h5/index.html

+ 5 - 4
code/h5client-app/src/main/resources/view/h5/index.html

@@ -168,6 +168,7 @@
             line-height: 0.2rem;
             background: #2175F2;
             text-align: center;
+            margin-bottom: 2px;
         }
         .h5-go-task i{
             color: #1890FF;
@@ -754,16 +755,16 @@
             },
             showMap:function(){
                 var that = this;
-                if(this.mapData.drawnImg == null){
+                if(this.mapData.mapImg == null){
                     this.normalmapimg = "";
                     $("#areaimg").attr("src","");
                 }else {
-                    this.normalmapimg = "data:image/png;base64," + this.mapData.drawnImg;
-                    $("#areaimg").attr("src","data:image/png;base64," + this.mapData.drawnImg);
+                    this.normalmapimg = "data:image/png;base64," + this.mapData.mapImg;
+                    $("#areaimg").attr("src","data:image/png;base64," + this.mapData.mapImg);
                 }
                 this.$nextTick(function()  {
                     that.imgscale = parseInt($("#areaimg").css("height"))/that.mapData.height;
-                    if(that.robotData.mapX==null||that.robotData.mapY==null||that.mapData.drawnImg == null){
+                    if(that.robotData.mapX==null||that.robotData.mapY==null||that.mapData.mapImg == null){
                         that.pgrobotl = []; //机器人实时位置
                     }else{
                         that.pgrobotl = [that.robotData.mapX,that.robotData.mapY]; //机器人实时位置