Jelajahi Sumber

Merge branch 'master' of https://git.nanodreamtech.com/Boss/yizhizan-h5

jianghaili 7 bulan lalu
induk
melakukan
ad1f92da08
4 mengubah file dengan 38 tambahan dan 18 penghapusan
  1. 27 15
      common/queue.js
  2. 5 2
      package/jobIntention/city.vue
  3. 5 0
      pages/index/index.vue
  4. 1 1
      pages/my/setup.vue

+ 27 - 15
common/queue.js

@@ -475,26 +475,39 @@ module.exports = {
 	    // 权限映射配置
 	    let permisionID = '';
 	    let permisionIosID = '';
-	    
-	    if (permission == 'location') {
-	        permisionID = 'android.permission.ACCESS_FINE_LOCATION';
-	        permisionIosID = 'location';
-	    }
-	    if (permission == 'camera') {
-	        permisionID = 'android.permission.CAMERA,android.permission.READ_EXTERNAL_STORAGE';
-	        permisionIosID = 'camera,photoLibrary';
-	    }
-	    if (permission == 'microphone') {
-	        permisionID = 'android.permission.RECORD_AUDIO';
-	        permisionIosID = 'record';
-	    }
 	
 	    return new Promise(async (resolve) => {
 	        // #ifdef H5
 	        resolve(true);
 	        return;
 	        // #endif
-	
+			
+			const appAuthorizeSetting = uni.getAppAuthorizeSetting()
+			if (permission == 'location') {
+			    permisionID = 'android.permission.ACCESS_FINE_LOCATION';
+			    permisionIosID = 'location';
+				if(appAuthorizeSetting.locationAuthorized=='authorized'){
+					resolve(true);
+					return
+				}
+			}
+			if (permission == 'camera') {
+			    permisionID = 'android.permission.CAMERA,android.permission.READ_EXTERNAL_STORAGE';
+			    permisionIosID = 'camera,photoLibrary';
+				if(appAuthorizeSetting.cameraAuthorized=='authorized'){
+					resolve(true);
+					return
+				}
+			}
+			if (permission == 'microphone') {
+			    permisionID = 'android.permission.RECORD_AUDIO';
+			    permisionIosID = 'record';
+				if(appAuthorizeSetting.microphoneAuthorized=='authorized'){
+					resolve(true);
+					return
+				}
+			}
+			
 	        // 特殊处理:相机权限在非iOS平台显示自定义弹窗
 	        if (uni.getSystemInfoSync().platform != 'ios') {
 				switch(perpop){
@@ -512,7 +525,6 @@ module.exports = {
 				}
 	            
 	        }
-	
 	        // Android 平台处理
 	        if (uni.getSystemInfoSync().platform === 'android') {
 	            if (permisionID == '') {

+ 5 - 2
package/jobIntention/city.vue

@@ -85,10 +85,14 @@
 			navBar,
 		},
 		onLoad(options) {
+			//#ifdef H5
 			this.getLatOrLng(); //获取经纬度
+			//#endif
 			this.getRmCityList(); //热门城市
 			this.getCitysList();
 			this.type=options&&options.type
+			if(this.$queue.getData('city'))
+				this.city=this.$queue.getData('city')
 		},
 		methods: {
 			/**
@@ -141,14 +145,13 @@
 				    '获取您的位置用于推荐附近的求职岗位', // 提示文案也无需区分系统(统一表述即可)
 					this
 				  );
-				
+				console.log(hasPermission)
 				  if (!hasPermission) {
 				    uni.showToast({ title: '未获取定位权限,无法推荐附近岗位', icon: 'none' });
 				    return;
 				  }
 				// #endif
 				
-				
 				uni.getLocation({
 					type: "wgs84", //wgs84  gcj02
 					success: function(res) {

+ 5 - 0
pages/index/index.vue

@@ -705,11 +705,16 @@
 				this.page = 1
 				that.getUserList();
 			})
+			uni.$on('updateIndexType', data => {
+				this.page = 1
+				this.getPostType()
+			})
 		},
 		onUnload() {
 			uni.$off('filterCity');
 			uni.$off('preferenceUpdated')
 			uni.$off('updateScreenFilterRecord')
+			uni.$off('updateIndexType')
 			// uni.$off('city')
 		},
 		//下拉刷新

+ 1 - 1
pages/my/setup.vue

@@ -40,7 +40,7 @@
 					注销后无法恢复,请谨慎操作 <u-icon name="arrow-right"></u-icon>
 				</view>
 			</view>
-			<view class="usermain-item item-padding" @click="clear">
+			<view v-if="false" class="usermain-item item-padding" @click="clear">
 				<view class="usermain-item-title">清除缓存</view>
 				<view>
 					{{ storageSize }} <u-icon name="arrow-right"></u-icon>