浏览代码

取消精准定位

xiaohaizhao 1 年之前
父节点
当前提交
f44bff9d84
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      utils/tool.js

+ 5 - 3
utils/tool.js

@@ -7,10 +7,11 @@ function mount() {
             handle()
             handle()
 
 
             function handle() {
             function handle() {
-                uni.getLocation({
-                    altitude: true,
+                /*     altitude: true,
                     highAccuracyExpireTime: 8000,
                     highAccuracyExpireTime: 8000,
-                    isHighAccuracy: true,
+                    isHighAccuracy: true, */
+                uni.getLocation({
+
                     success: res => {
                     success: res => {
                         console.log("获取定位", res)
                         console.log("获取定位", res)
                         if (isReverseGeocoder) {
                         if (isReverseGeocoder) {
@@ -98,6 +99,7 @@ function mount() {
         }
         }
     }
     }
     Vue.prototype.tovw = (num) => (num * 100 / 375).toFixed(3) + "vw";
     Vue.prototype.tovw = (num) => (num * 100 / 375).toFixed(3) + "vw";
+    Vue.prototype.getCity = (obj, isAll = true) => (obj.province || '') + (obj.city || '') + (obj.county || '') + isAll ? (obj.address || '') : '';
     Vue.prototype.getApps = (appRemark, route) => {
     Vue.prototype.getApps = (appRemark, route) => {
         const list = Object.values(uni.getStorageSync('authList')[appRemark])
         const list = Object.values(uni.getStorageSync('authList')[appRemark])
         return route ? list.find(v => v.path == route || v.pathDetail == route) : list
         return route ? list.find(v => v.path == route || v.pathDetail == route) : list