zhaoyun 1 月之前
父節點
當前提交
7f7410ed38
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 1 1
      mer_uniapp/pages/index/index.vue
  2. 3 1
      mer_uniapp/utils/util.js

+ 1 - 1
mer_uniapp/pages/index/index.vue

@@ -219,7 +219,7 @@
 			this.navigationBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
 			// console.log("导航栏高度:"+this.globalData.navigationBarHeight)
 			// #endif
-			this.initLocation();
+			this.initLocation();   
 		},
 		methods: {
 			initLocation() {

+ 3 - 1
mer_uniapp/utils/util.js

@@ -1133,7 +1133,9 @@ export default {
 		doGetLocation() {
 			return new Promise((resolve, reject) => {
 				uni.getLocation({
-					type: 'wgs84',
+					//type: 'wgs84',
+					type: 'gcj02',
+				    isHighAccuracy: true,
 					success: (res) => {
 						uni.setStorageSync('user_latitude', res.latitude);
 						uni.setStorageSync('user_longitude', res.longitude);