//上传视频
async videoRead(file, detail){
let that = this;
var formData = new FormData();
formData.append('file', file.file);
fetch("{:url('upload')}",{
method:'post',
body: formData,
}).then(response=>{
return response.json();
}).then(data=>{
if(data.code==1){
that.form.video = data.url
}else{
that.$toast(data.info)
}
})
},
H5 使用fetch 上传 file 文件。
最新推荐文章于 2024-07-26 12:28:02 发布