2***@qq.com
2***@qq.com
  • 发布:2021-12-27 14:29
  • 更新:2021-12-27 20:51
  • 阅读:752

【报Bug】iphone12 uni-app微信小程序 选择图片,会出现白屏问题

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 版本 Windows 10 家庭中文版 版本号 20H2 安装日期 ‎2021/‎5/‎9 操作系统内部版本 19042.1415 体验 Windows Feature Experience Pack 120.2212.3920.0

HBuilderX类型: 正式

HBuilderX版本号: 3.3.3

第三方开发者工具版本号: 1.05.2112242

基础库版本号: 2.21.2

项目创建方式: HBuilderX

示例代码:
chooseImg() {  
        uni.chooseImage({  
            count: 1,  
            sizeType: ["compressed"],  
            sourceType: this.onlyCamera ? ["camera"]:["album"],  
            success: res => {  
                let img = res.tempFilePaths[0];  
                uni.showLoading({title:'正在提交...',mask:true});  
                this.countNum++;  
                let _photoName =  
                    this.typeNameImg +  
                    "_" +  
                    this.typeNameImg +  
                    "_" +  
                    this.$functionPub.getSubLastYxWx(img) +  
                    this.$functionPub.getSubLastYx(img);  
                this.$api.uploadeFilesFormal(img,'/uploadFile/ftpUploadFile','file',{photoName:_photoName,imageNum:uni.getStorageSync('customer_listdata').imageNum}).then(res => {  
                    if(res.code === "200"){  
                        this.imgList.push({  
                            src: img,  
                            name: this.typeNameImg,  
                            type: this.$functionPub.getSubLastYx(img),  
                            typeName: this.$functionPub.getSubLastYxWx(img),  
                            photoName: _photoName  
                        });  
                        let that = this;  
                        setTimeout(function () {  
                            that.$emit('onSrc',{  
                                value:that.imgList,  
                                type:that.typeNameImg,  
                                index:that.Index,  
                            })  
                            uni.hideLoading();  
                        }, 1200);  
                        // this.$emit('onSrc',{value:this.imgList,type:this.typeNameImg,index:this.Index})  
                        // uni.hideLoading();  
                        // this.$emit('onSrc',{value:this.imgList,type:this.typeNameImg,index:this.Index})  
                    }else{  
                        uni.hideLoading();  
                        uni.showToast({  
                            icon:'none',  
                            title:'上传失败,请重新检查重新上传!'  
                        })  
                    }  
                });  
            },  
            fail: err => {  
                console.log(err);  
            }  
        });  
    },

操作步骤:

使用iphone12 ,使用手机选择相册图片,快速重复选择

预期结果:

选择完成返回原页面,并显示

实际结果:

返回页面,绿屏,我们设置背景是绿色

bug描述:

在iphone12 手机中,选择图片,快速多次选择,会出现页面白屏问题

2021-12-27 14:29 负责人:无 分享
已邀请:
DCloud_UNI_Anne

DCloud_UNI_Anne

直接使用微信小程序(不使用 uni-app )测试一下,如果仍然有问题,反馈到微信小程序社区

该问题目前已经被锁定, 无法添加新回复