|
|
@@ -1,6 +1,10 @@
|
|
|
const deleteMark = require("../../utils/deleteMark"),
|
|
|
getTime = require("../../utils/getTime"),
|
|
|
- _Http = getApp().globalData.http;
|
|
|
+ _Http = getApp().globalData.http,
|
|
|
+ QQMapWX = require('../../utils/qqmap-wx-jssdk.min'),
|
|
|
+ qqmapsdk = new QQMapWX({
|
|
|
+ key: 'QF6BZ-4IQC5-SN2IH-QL5BW-U4IJO-R3BY4' // 必填
|
|
|
+ });
|
|
|
Page({
|
|
|
data: {
|
|
|
sat_orderclueid: null,
|
|
|
@@ -22,6 +26,7 @@ Page({
|
|
|
},
|
|
|
/* 跟进初始化 */
|
|
|
init() {
|
|
|
+ let that = this;
|
|
|
_Http.basic({
|
|
|
id: "20221208100602",
|
|
|
"content": {
|
|
|
@@ -56,16 +61,28 @@ Page({
|
|
|
type: 'wgs84',
|
|
|
altitude: true,
|
|
|
isHighAccuracy: true,
|
|
|
+ highAccuracyExpireTime: 5000,
|
|
|
success({
|
|
|
latitude,
|
|
|
longitude
|
|
|
}) {
|
|
|
- console.log("获取经纬度", latitude,
|
|
|
- longitude)
|
|
|
- this.setData({
|
|
|
+ that.setData({
|
|
|
"content.latitude": latitude,
|
|
|
"content.longitude": longitude
|
|
|
})
|
|
|
+ qqmapsdk.reverseGeocoder({
|
|
|
+ location: {
|
|
|
+ latitude,
|
|
|
+ longitude
|
|
|
+ },
|
|
|
+ success(s) {
|
|
|
+ console.log("逆解析", s)
|
|
|
+ that.setData({
|
|
|
+ "content.address": s.result.address,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
fail(err) {
|
|
|
console.log(err)
|