shuishen
2022-02-21 ed9709a6e101a7f2eca4403f93e7aa4f71a78220
leafletMapOur/grabOrdersMap/js/vueMain.js
@@ -54,7 +54,7 @@
               });
            } else if (that.data.butCT == "begin") {
               // 开始任务
               this.setUniAppMsg({
               that.setUniAppMsg({
                  type: "start",
                  data: {
                     id: that.data.id,
@@ -62,10 +62,10 @@
                  },
                  fn: function(val) {
                     if (val == "success") {
                        console.log("成功开启任务")
                        this.data.butCT = "beginUp";
                        this.data.rtype = '0';
                        this.data.type = "0";
                        // console.log("成功开启任务")
                        that.data.butCT = "beginUp";
                        that.data.rtype = '0';
                        that.data.type = "0";
                     }
                  }
               })
@@ -354,21 +354,30 @@
            this.oncePosition = new $getPositions({
               id: 1,
               fn: function(res) {
                  console.log(res);
                  // console.log(res);
                  that.mapPositionLoding = res.state;
                  if (!res.state) {
                     that.addIcon(res.intlat);
                     console.log(res)
                     if (typeof res.intlat === "string") {
                        window.parent.showTip("获取定位失败")
                     } else {
                        that.addIcon([res.intlat[1], res.intlat[0]]);
                     }
                  }
               }
            }).init();
         }
         if (!this.onPosition) {
            this.oncePosition.continuedTime();
            this.onPosition = !this.onPosition;
            this.oncePosition.once();
         } else {
            this.oncePosition.overContinued();
            this.onPosition = !this.onPosition;
            this.oncePosition.once();
         }
         // if (!this.onPosition) {
         //    this.oncePosition.continuedTime();
         //    this.onPosition = !this.onPosition;
         // } else {
         //    this.oncePosition.overContinued();
         //    this.onPosition = !this.onPosition;
         // }
      },
      //添加图标
      addIcon(intlat) {
@@ -654,12 +663,13 @@
         },
      });
      this.domMove.init();
      // console.log(window.parent.setIntLat)
      window.parent.setIntLat({
         rid: this.data.id,
         fn: (out) => {
            console.log(out);
            that.addIcon(out);
            // console.log(out,"1111");
            // that.addIcon(out);
            that.addIcon([out[1], out[0]]);
         }
      })
   },