在Vue项目中,使用h5+访问手机相册和拍照功能,编译后打zip包,通过手机浏览器访问,为何不能访问摄像头和相册?求教各位?
3***@qq.com
- 发布:2020-08-10 08:51
- 更新:2020-08-10 10:34
- 阅读:421
3***@qq.com (作者)
new Vue({
methods: {
plusReady() {
alert(3);
var wv = plus.webview.currentWebview();
}
},
mounted() {
if (window.plus) {
alert(1);
this.plusRead();
} else {
alert(2);
document.addEventListener('plusready', this.plusReady, false);
}
},
router,
render: h => h(App),
}).$mount('#app')
2020-08-10 15:06
3***@qq.com (作者)
然后在页面中使用mui.plusReady(function() {//调用摄像头处理逻辑});
2020-08-10 15:08