ソースを参照

获取经纬度方法修改

chengjunhui 2 ヶ月 前
コミット
67812d564b
共有8 個のファイルを変更した8 個の追加8 個の削除を含む
  1. 1 1
      activity/activity/activity.js
  2. 1 1
      activity/map/map.js
  3. 1 1
      app.js
  4. 1 1
      app.json
  5. 1 1
      components/location/index.js
  6. 1 1
      job/postJob/postJob.js
  7. 1 1
      pages/home/index/index.js
  8. 1 1
      utils/qqmap-wx-jssdk.js

+ 1 - 1
activity/activity/activity.js

@@ -109,7 +109,7 @@ Page({
 
   // 获取经纬度
   getCoord() {
-    wx.getLocation({
+    wx.getFuzzyLocation({
       type: "gcj02",
       success: (res) => {
         const latitude = res.latitude;

+ 1 - 1
activity/map/map.js

@@ -46,7 +46,7 @@ Page({
 
   // 获取经纬度
   getCoord() {
-    wx.getLocation({
+    wx.getFuzzyLocation({
       type: 'gcj02',
       success: (res) => {
         const latitude = res.latitude

+ 1 - 1
app.js

@@ -144,7 +144,7 @@ App({
   },
   getLocal () {
     const _this = this;
-    wx.getLocation({
+    wx.getFuzzyLocation({
       type: "gcj02",
       success (res) {
         const latitude = res.latitude;

+ 1 - 1
app.json

@@ -147,7 +147,7 @@
     "independent": true
   },
   "requiredPrivateInfos": [
-    "getLocation",
+    "getFuzzyLocation",
     "chooseLocation"
   ],
   "__usePrivacyCheck__": true,

+ 1 - 1
components/location/index.js

@@ -52,7 +52,7 @@ Component({
             })
         },
         getCity() {
-            wx.getLocation({
+            wx.getFuzzyLocation({
                 type: 'wgs84',
                 success: function (res) {
                     this.latitude = res.latitude;

+ 1 - 1
job/postJob/postJob.js

@@ -317,7 +317,7 @@ Page({
 
   // 获取经纬度
   getCoord() {
-    wx.getLocation({
+    wx.getFuzzyLocation({
       type: "gcj02",
       success: (res) => {
         const latitude = res.latitude;

+ 1 - 1
pages/home/index/index.js

@@ -428,7 +428,7 @@ Page({
   //获取城市信息
   getLocal() {
     const _this = this;
-    wx.getLocation({
+    wx.getFuzzyLocation({
       type: "gcj02",
       isHighAccuracy: true,
       success(res) {

+ 1 - 1
utils/qqmap-wx-jssdk.js

@@ -340,7 +340,7 @@ var Utils = {
      * 使用微信接口进行定位
      */
     getWXLocation(success, fail, complete) {
-        wx.getLocation({
+      wx.getFuzzyLocation({
             type: 'gcj02',
             success: success,
             fail: fail,