二开时增加了批量上传导入商品,上传excel时获取不到文件
$_FILES 同样是空的
前端代码
postfile() {
if (this.file === ''){
this.$notify.error({
title: "错误",
message: "上传文件不能为空"
})
return false
} else {
console.log(this.file)
let formData = new FormData()
formData.append('file',this.file)
this.btn.disable = true
this.btn.message = "正在导入,请等待"
importExcelApi(formData).then(res => {
console.log(res.message)
})
}
},
这里打印file是正确的值
我在接收文件代码里直接
return app('json')->success($_FILES);
返回值是空的,用框架的 $this->request->file()同样获取不到
求助支个招
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}