wx.chooseImage拍照功能问题?

小程序 文章 2021-02-07 16:21 577 0 全屏看文

AI助手支持GPT4.0

wx.chooseImage拍照功能问题?Wx.chooseImage camera function problem?

wx.chooseImage拍照功能问题?

 wx.chooseImage可设置从相册或拍照方式,原本是设置了只能拍照获取实时的相片的。但是用户可以在PC微信端打开时是选择图片功能,所以达不到限定用户只能拍照获取实时相片的目的。

wx.chooseImage You can set the way to take pictures from the album. Originally, you can only take pictures to get real-time photos. However, the user can select the picture function when opening the PC wechat terminal, so it can't achieve the purpose of limiting the user to take photos and get real-time photos.

回答:

重庆安逸软件:

再判断一下客户端类型就可以

刘栋:

试了下,chooseImage 即使限制 sourceType: ['camera'],PC上也是会打开文件浏览器的,或许你可以试试 camera组件

https://developers.weixin.qq.com/miniprogram/dev/component/camera.html

Brother斌🎈:

判断是pc端的时候弹框提示用户去手机操作

-EOF-

AI助手支持GPT4.0