Showing
3 changed files
with
4 additions
and
4 deletions
| @@ -10,8 +10,8 @@ export class PermissionUtils { | @@ -10,8 +10,8 @@ export class PermissionUtils { | ||
| 10 | //相机权限 | 10 | //相机权限 |
| 11 | static CAMERA: Permissions = 'ohos.permission.CAMERA' | 11 | static CAMERA: Permissions = 'ohos.permission.CAMERA' |
| 12 | //文件权限 | 12 | //文件权限 |
| 13 | - static READ_MEDIA: Permissions = 'ohos.permission.READ_MEDIA' | ||
| 14 | - static WRITE_MEDIA: Permissions = 'ohos.permission.WRITE_MEDIA' | 13 | + static READ_MEDIA: Permissions = 'ohos.permission.READ_IMAGEVIDEO' |
| 14 | + static WRITE_MEDIA: Permissions = 'ohos.permission.WRITE_IMAGEVIDEO' | ||
| 15 | private static tokenId: number = 0 | 15 | private static tokenId: number = 0 |
| 16 | 16 | ||
| 17 | /**检查权限是否授权*/ | 17 | /**检查权限是否授权*/ |
| @@ -168,7 +168,7 @@ export struct ImageDownloadComponent { | @@ -168,7 +168,7 @@ export struct ImageDownloadComponent { | ||
| 168 | if (!this.isGranted) { | 168 | if (!this.isGranted) { |
| 169 | //跳转权限设置 | 169 | //跳转权限设置 |
| 170 | // const permissionUtil = new PermissionUtil(); | 170 | // const permissionUtil = new PermissionUtil(); |
| 171 | - PermissionUtil.reqPermissionsFromUser(['ohos.permission.READ_MEDIA'], this).then((res) => { | 171 | + PermissionUtil.reqPermissionsFromUser(['ohos.permission.READ_IMAGEVIDEO'], this).then((res) => { |
| 172 | //console.info(`cj2024 saveImage res ${res}`) | 172 | //console.info(`cj2024 saveImage res ${res}`) |
| 173 | this.isGranted = res; | 173 | this.isGranted = res; |
| 174 | }); | 174 | }); |
| @@ -13,7 +13,7 @@ const DiyCloseTipsString = '关闭后,将不会使用你的偏好进行内容 | @@ -13,7 +13,7 @@ const DiyCloseTipsString = '关闭后,将不会使用你的偏好进行内容 | ||
| 13 | @Entry | 13 | @Entry |
| 14 | @Component | 14 | @Component |
| 15 | export struct PrivacySettingPage { | 15 | export struct PrivacySettingPage { |
| 16 | - @State listData: Array<PrivacySettingModel> = [new PrivacySettingModel(DiyString, false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_MEDIA'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.APPROXIMATELY_LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')]; | 16 | + @State listData: Array<PrivacySettingModel> = [new PrivacySettingModel(DiyString, false, 'ohos.permission.READ_IMAGEVIDEO'), new PrivacySettingModel('相册权限', false, 'ohos.permission.READ_IMAGEVIDEO'), new PrivacySettingModel('相机权限', false, 'ohos.permission.CAMERA'), new PrivacySettingModel('定位权限', false, 'ohos.permission.APPROXIMATELY_LOCATION'), new PrivacySettingModel('麦克风权限', false, 'ohos.permission.MICROPHONE')]; |
| 17 | tips: string = '设置前可查阅' | 17 | tips: string = '设置前可查阅' |
| 18 | privacyTips: string = '《隐私政策》' | 18 | privacyTips: string = '《隐私政策》' |
| 19 | tipsEnd = '中相应权限使用规则' | 19 | tipsEnd = '中相应权限使用规则' |
-
Please register or login to post a comment