lilei 4 éve
szülő
commit
223f4dfa4f
1 módosított fájl, 16 hozzáadás és 1 törlés
  1. 16 1
      pages/index/index.vue

+ 16 - 1
pages/index/index.vue

@@ -70,6 +70,21 @@
 			// 获取订单状态数据字典
 			// 获取订单状态数据字典
 			// this.getCodeList('RUBBISH_TYPE','vuex_rubbishType')
 			// this.getCodeList('RUBBISH_TYPE','vuex_rubbishType')
 			this.getUserInfo()
 			this.getUserInfo()
+			uni.getSetting({
+				success(res) {
+					if(!res.authSetting['scope.userLocation']){
+						uni.authorize({
+						    scope: 'scope.userLocation',
+						    success() {
+								console.log('scope.userLocation success')
+						    },
+							fail(res) {
+								console.log('scope.userLocation fail')
+							}
+						})
+					}
+				}
+			})
 		},
 		},
 		onUnload() {
 		onUnload() {
 			uni.$off('blueReConnect')
 			uni.$off('blueReConnect')
@@ -177,7 +192,7 @@
 					  _this.loading = false
 					  _this.loading = false
 					  uni.showModal({
 					  uni.showModal({
 					  	title:'提示',
 					  	title:'提示',
-					  	content:'请开启手机蓝牙',
+					  	content: _this.platform == 'ios' ? '请开启蓝牙(如果已开启,还是无法使用,请打开系统设置->微信->蓝牙开关再试)' : '请开启手机蓝牙',
 					  	showCancel: false,
 					  	showCancel: false,
 					  	complete(e) {
 					  	complete(e) {
 					  		console.log(e)
 					  		console.log(e)