8***@qq.com
8***@qq.com
  • 发布:2017-02-25 15:37
  • 更新:2017-02-25 15:37
  • 阅读:2765

Uncaught ReferenceError: plus is not defined

分类:5+ SDK

使用安卓原生webview打开mui界面,报:Uncaught ReferenceError: plus is not defined的错误 使用5+的api调用手机摄像头
function makePhoto2(){
var cmr = plus.camera.getCamera();
cmr.captureImage(function(p) {
plus.gallery.save(p);
plus.io.resolveLocalFileSystemURL(p, function(entry) {
var path = entry.toLocalURL();
appendFile(path);
upload('image');

            }, function(e) {  
                mui.toast("读取拍照文件错误:" + e.message);  
            });  
            },  
            function(e) {}, {  
                filename: "_doc/gallery/",  
                index: 1  
            });  

}

function makePhoto() {
hideSelectImage();
if(window.plus){
makePhoto2();
}else{
mui.toast("plus not init");
document.addEventListener('plusready',makePhoto2,false);
}

现在执行的是mui.toast("plus not init"); 一直不知道哪里出了问题,谁能帮忙回答一下 谢谢

2017-02-25 15:37 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复