function createUpload(headimg, name, sex, birthday, idcard, telphone, showCityPicker3, email, detail, extramsg) {
var wt = plus.nativeUI.showWaiting("正在添加...");
var task = plus.uploader.createUpload("http://192.168.23.1:8080/PosServer/addkuhu", {}, function(t, status) {
// 上传完成
plus.nativeUI.toast("测试成功!");
if (status == 200) {
wt.close();
console.log("Upload success: " + t.responseText);
//切换到上一个页面
//backPrePage();
plus.nativeUI.toast("提交成功!");
} else {
wt.close();
console.log("Upload failed: " + status);
plus.nativeUI.toast("提交失败!");
}
});
task.addFile(headimg, {
key: "picture"
});
task.addData("name", name);
task.addData("sex", sex);
task.addData("birthday", birthday);
task.addData("idcard", idcard);
task.addData("telphone", telphone);
//task.addData("messagecheck", messagecheck);
task.addData("showCityPicker3", showCityPicker3);
task.addData("email", email);
task.addData("detail", detail);
task.addData("extramsg", extramsg);
//task.addEventListener( "statechanged", onStateChanged, false );
task.start();
}
是plus封装的方法有问题吗?有问题请速度更新hbuilder
傻吊
- 发布:2016-03-04 17:22
- 更新:2016-04-13 08:50
- 阅读:4031
傻吊 (作者)
额 这跟后台接受没关系吧,第一次能进回调方法,有时候并不能进回调方法
2016-04-13 10:39
文
回复 傻吊:我倒没出现这个问题
2016-04-15 23:56