|
|
@ -55,7 +55,7 @@ |
|
|
|
</div> |
|
|
|
<div class="border-2 w-full mt-2.5 flex justify-between p-2 text-sm"> |
|
|
|
<p style="color: #999999;">文件上传</p> |
|
|
|
<button>上传</button> |
|
|
|
<div onclick="p1432643387798069248.upload()">上传</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -126,6 +126,31 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 文件上传 |
|
|
|
upload(){ |
|
|
|
// console.log(1); |
|
|
|
// var input = document.createElement("input"); |
|
|
|
// input.type = "file"; |
|
|
|
// input.click(); |
|
|
|
// input.onchange = function(){ |
|
|
|
// var file = input.files[0]; |
|
|
|
// var form = new FormData(); |
|
|
|
// form.append("file", file); //第一个参数是后台读取的请求key值 |
|
|
|
// form.append("fileName", file.name); |
|
|
|
// form.append("other", "666666"); //实际业务的其他请求参数 |
|
|
|
// var xhr = new XMLHttpRequest(); |
|
|
|
// var action = "http://localhost:8080/upload.do"; //上传服务的接口地址 |
|
|
|
// xhr.open("POST", action); |
|
|
|
// xhr.send(form); //发送表单数据 |
|
|
|
// xhr.onreadystatechange = function(){ |
|
|
|
// if(xhr.readyState==4 && xhr.status==200){ |
|
|
|
// var resultObj = JSON.parse(xhr.responseText); |
|
|
|
// //处理返回的数据...... |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转详情 |
|
|
|
jumpDetails(that) { |
|
|
|
const pId = this.dom.parentNode.getAttribute('data-pid'); |
|
|
|