2***@qq.com
2***@qq.com
  • 发布:2019-05-28 01:13
  • 更新:2019-05-28 01:13
  • 阅读:1150

困扰很久的报错, Uncaught TypeError: Cannot read property 'addData' of null at html/meeting_add.html:228

分类:HTML5+

01:05:18.512 Uncaught TypeError: Cannot read property 'addData' of null at html/meeting_add.html:228

文件上传提示这个错误,搞了很久也找不到原因,代码如下,谢谢

var path = $("#showImg")[0].src;

alert(path);

var wt=plus.nativeUI.showWaiting();

var flag = false;

var mask = mui.createMask(function(){

return flag;

});

mask.show();//显示遮罩

var task=plus.uploader.createUpload(API.uploadMeetingImg,

{method:"POST"},

function(t,status){ //上传完成

if(status==200){

wt.close();

flag = true;

mask.close();

alert("上传成功:"+t.responseText);

}else{

mui.toast("上传失败:"+status,{ duration:'long', type:'div' });

}

}

);

task.addData("client","file");

task.addData("uid",getUid());

task.addFile(path,{key:'file'});

task.start();

2019-05-28 01:13 负责人:无 分享
已邀请:

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