以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  微信SDK图片接口,拍照的能不能限制为前置摄像头  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=110275)

--  作者:fubblyc
--  发布时间:2017/11/30 10:36:00
--  微信SDK图片接口,拍照的能不能限制为前置摄像头
老师,
微信SDK选择图片接口没有看到可以设置 限制前置或者后置摄像头拍照的说明,是不是就没有办法限制呢?
看了微信小程序的组件有,但是他的接口也是没有。
是不是sdk也有所谓的组件可以限制。

wx.ready(function () {
    document.getElementById(\'paizhao\').onclick = function () {
            wx.chooseImage({
            count: 9, // 默认9
            sizeType: [\'compressed\'], // 可以指定是原图还是压缩图,默认二者都有
            sourceType: [\'camera\'], // 可以指定来源是相册还是相机,默认二者都有
            success: function (res) {
                var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
                document.getElementById(\'lujing\').value = localids
            }
        });        
    };
});
wx.error(function (res) {
    //alert(res.errMsg);
});


--  作者:有点甜
--  发布时间:2017/11/30 10:43:00
--  
不可以。