// js上传world
var fileM=document.querySelector("#uploadFile");
$("input[name=world]").change(function(){
// console.log($("input[name=world]")[0].files);
var formData = new FormData();
// console.log($("#uploadFile")[0].files);
var fileObj = fileM.files[0];
formData.append('file',fileObj);
// console.log(formData);
$.ajax({
url: "/admin/question/move_files.html",
type: "POST",
data: formData,
dataType:"json",
cache: false,
contentType: false,
processData: false,
success: function(data) {
console.log(data);
if(data.status == 1){
$("input[name=world_info]").val(data.info);
}
layer.msg(data.msg,{time:1500});
},
error: function(data) {
layer.msg("网络错误",{time:1500});
}
})
})