微风需要竹林
微风需要竹林
  • 发布:2023-12-13 15:50
  • 更新:2023-12-18 15:39
  • 阅读:378

【报Bug】barcode卡死和uni.scanCode首次获取相册权限后返回扫码页面卡死

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win11

HBuilderX类型: 正式

HBuilderX版本号: 3.98

手机系统: Android

手机系统版本号: Android 14

手机厂商: 华为

手机机型: iphone se

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
        <barcode id='1' autostart='true' class="barcode" ref="barcode" background="rgb(0,0,0)" frameColor="#1C86EE"  
            scanbarColor="#1C86EE" @marked="success1" @error="fail1"></barcode>  

setPhoto() {
let _this = this;
if (!_this.fils) {
_this.fils = true
} else {
_this.fils = false
}
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
},
complete: function(res) {
_this.fils = false;

                    // _this.toStart();  
                }  
            });  
        },

操作步骤:

使用barcode选择autostart自动扫码

预期结果:

跳转页面返回不卡死,相册返回不卡死

实际结果:

全部都卡死,除非退出扫码页面重新进入

bug描述:

barcode使用autostart后进入扫码页面是可以正常扫码的,如果使用uni.navigateTo跳转页面后返回将会卡死,使用相册在相册选择其中一张图片后返回页面也会卡死

2023-12-13 15:50 负责人:YUANRJ 分享
已邀请:
微风需要竹林

微风需要竹林 (作者)

每次返回都没有调用到相机权限应该是这个问题

微风需要竹林

微风需要竹林 (作者)

这个问题我新建一个hello uniapp的项目也是一样可以复现,每次都将hbuilderx的缓存给清除就都可以复现

要回复问题请先登录注册