2***@qq.com
2***@qq.com
  • 发布:2024-03-25 14:28
  • 更新:2024-03-25 14:32
  • 阅读:54

【报Bug】掌玩mini平板uni.chooseVideo一直返回fail

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: Alpha

HBuilderX版本号: 4.06

手机系统: Android

手机系统版本号: Android 13

手机厂商: 酷比

手机机型: Zhangwanmini

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

let obj = {
sourceType: ['album', 'camera']
}
console.log("this.maxDuration == null ||this.maxDuration == undefined: ", this.maxDuration ==
null ||
this.maxDuration == undefined);

                    let maxDuration = this.maxDuration ? this.maxDuration : 60  
                    let minDuration = this.minDuration ? this.minDuration : 1  

                    if (maxDuration && maxDuration <= 60 && minDuration <= 60) {  
                        obj.maxDuration = maxDuration  
                    }  
                    if (minDuration && minDuration > 60) {  
                        obj.sourceType = ['album']  
                    }  
                    console.log('obj: ',obj);  
                    uni.chooseVideo({  
                        ...obj,  
                        compressed: this.compressVideo,  
                        success: async (res) => {  
                            console.log(res);  
                            console.log("this.maxDuration: ", this.maxDuration);  
                            if (maxDuration && (res.duration > parseInt(maxDuration + 1) || res  
                                    .duration <= parseInt(minDuration))) {  
                                if (this.minDuration > 0) {  
                                    _this.$tip.toast('视频时长最小' + minDuration + 's,视频时长最大' + maxDuration +  
                                        's')  
                                } else {  
                                    _this.$tip.toast('视频时长最大' + maxDuration + 's')  
                                }  
                                return  
                            }  
                            // uni.showLoading({  
                            //  title: '正在上传视频'  
                            // })  
                            let result = ''  
                            result = await _this.uploadFile(res.tempFilePath)  
                            _this.fileList.push(result)  
                            uni.hideLoading()  
                        },  
                        fail(e) {  
                            console.log(e);  
                            // _this.$tip.toast(e.errMsg)  
                        }  
                    })

操作步骤:

拍摄完,点确定就进入fail

预期结果:

拍摄完,点确定就进入success

实际结果:

拍摄完,点确定就进入fail

bug描述:

拍摄完,点确定就进入fail

2024-03-25 14:28 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com (作者)

{
"errMsg": "chooseVideo:fail null",
"errCode": -99,
"code": -99
}

要回复问题请先登录注册