From ed9709a6e101a7f2eca4403f93e7aa4f71a78220 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 21 Feb 2022 16:25:33 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
---
leafletMapOur/grabOrdersMap/js/vueMain.js | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/leafletMapOur/grabOrdersMap/js/vueMain.js b/leafletMapOur/grabOrdersMap/js/vueMain.js
index ff22c89..414c977 100644
--- a/leafletMapOur/grabOrdersMap/js/vueMain.js
+++ b/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]]);
}
})
},
--
Gitblit v1.9.3