提交 上传华为app问题整改

This commit is contained in:
GGJ
2024-09-05 09:01:16 +08:00
parent fd55306d1a
commit d5cfe35b58
31 changed files with 5034 additions and 618 deletions

View File

@@ -24,17 +24,24 @@
</view>
</view>
</Cn-page>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog
type="info"
cancelText="禁止"
confirmText="允许"
title="权限说明"
content='是否允许"灿能物联"使用相机?'
@confirm="handleScon"
@close="dialogClose"
></uni-popup-dialog>
</uni-popup>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog
style="width: 90%; margin: 5%"
type="info"
cancelText="禁止"
confirmText="允许"
title="权限说明"
content='是否允许"灿能物联"使用相机?'
@confirm="handleScon('camera')"
@close="dialogClose"
></uni-popup-dialog>
</uni-popup>
<uni-popup ref="message" type="message">
<uni-popup-message type="info" :duration="0" style="width: 90%; margin: 5%">
<view style="color: #909399; font-style: 16px">相机权限使用说明:</view>
<view style="color: #6c6c6c; margin-top: 3rpx; "> 用于相机扫描二维码!</view>
</uni-popup-message>
</uni-popup>
</view>
</template>
<script>
@@ -75,14 +82,15 @@ export default {
plus.os.name == 'Android' &&
plus.navigator.checkPermission('android.permission.CAMERA') === 'undetermined'
) {
//未授权
this.$refs.alertDialog.open()
//未授权
this.$refs.message.open()
this.$refs.alertDialog.open('bottom')
} else {
this.handleScon()
}
},
handleScon() {
this.$refs.message.close()
uni.scanCode({
success: (res) => {
console.log(res)
@@ -98,7 +106,7 @@ export default {
},
})
},
dialogClose() {},
dialogClose() {this.$refs.message.close()},
},
onLoad(options) {
this.options = options