本帖最后由 cin 于 2017-3-27 17:22 编辑
使用示例,需判断微信的内核进行不同调用,彼此之间接口不互通,比较坑:参考如下代码,应该不用加注释说明吧,有问题再跟帖吧
Model.prototype.chooseImageClick = function(event) { var me = this; image.chooseImage({ count : 1, success : function(res) { images.localId = res.localIds; if (window.__wxjs_is_wkwebview == true) { image.getLocalImgData({ localId : res.localIds[0], success : function(resimage) { var localData = resimage.localData; me.getElementByXid("image1").src = localData; } }); } else { me.getElementByXid("image1").src = res.localIds[0]; }
} }); };
|