guhongwei 2 years ago
parent
commit
7a6b315bd6
2 changed files with 28 additions and 5 deletions
  1. 14 2
      manifest.json
  2. 14 3
      pages/my/index.vue

+ 14 - 2
manifest.json

@@ -17,7 +17,9 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "Geolocation" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
@@ -46,7 +48,12 @@
             },
             /* SDK配置 */
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "geolocation" : {
+                    "system" : {
+                        "__platform__" : [ "ios", "android" ]
+                    }
+                }
             },
             "icons" : {
                 "android" : {
@@ -95,6 +102,11 @@
         "usingComponents" : true,
         "optimization" : {
             "subPackages" : true
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "定位当前位置,选在收获地址"
+            }
         }
     },
     "mp-alipay" : {

+ 14 - 3
pages/my/index.vue

@@ -131,9 +131,20 @@
 			},
 			// 公共跳转
 			toCommon(e) {
-				uni.navigateTo({
-					url: `/${e}`
-				})
+				// uni.getStorage({
+				// 	key: 'token',
+				// 	success: function(res) {
+				// 		console.log(res);
+				// 	},
+				// 	fail: function(err) {
+				// 		uni.navigateTo({
+				// 			url: `/pages/login/index`
+				// 		})
+				// 	}
+				// });
+				// uni.navigateTo({
+				// 	url: `/${e}`
+				// })
 			},
 			// 跳转页面
 			toOrrder(e) {