1***@qq.com
1***@qq.com
  • 发布:2020-12-22 17:00
  • 更新:2023-01-09 10:17
  • 阅读:1787

uni.chooseImage在 h5页面手机端调用相机

分类:uni-app

你好!
安卓手机:调用服务器上UNIAPP打包的H5 页面:

    uni.chooseImage({  
        count: 1, //默认9  
        sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有  
        sourceType: ['album','camera'], //从相册选择  
            success: (res) => {  
                if (this.imgList.length != 0) {  
                        this.imgList = this.imgList.concat(res.tempFilePaths)  
                    } else {  
                        this.imgList = res.tempFilePaths  
                    }  
                }  
});  

在安卓webview中 WebChromeClient.FileChooserParams
acceptTypes = fileChooserParams.getAcceptTypes();
总是返回 image/,好像sourceType: ['album','camera'], 设置无效,并且单独设置为camera,也返回image/

2020-12-22 17:00 负责人:无 分享
已邀请:
前端找bug

前端找bug

大佬 解决了吗 我这边也遇到了

是需要原生判断吗

要回复问题请先登录注册