|
@@ -39,16 +39,15 @@ const UploadModal:React.FC<iUploadModalProps> = (props) => {
|
|
|
// console.log(info)
|
|
|
|
|
|
const { status } = info.file
|
|
|
- if (status !== 'uploading') {
|
|
|
- // console.log(info.file, info.fileList)
|
|
|
- }
|
|
|
+ // if (status !== 'uploading') {
|
|
|
+ // }
|
|
|
if (status === 'done') {
|
|
|
// console.log(fileList)
|
|
|
|
|
|
// const newFileList = [ ...fileList, info.file ]
|
|
|
- console.log(fileList)
|
|
|
+ // console.log(fileList)
|
|
|
// newFileList.push(info.file)
|
|
|
- setFileList(info.fileList)
|
|
|
+ setFileList(info.fileList.map(item => ({ ...item, url: consts.OSS_PATH.REVIEW + item.url })))
|
|
|
// const newFiles = [ ...files, { createTime: new Date(), filepath: info.file.url,filename: info.file.name } ]
|
|
|
setFiles(info.fileList.map(item => ({ createTime: new Date(), filepath: item.url,filename: item.name })))
|
|
|
} else if (status === 'error') {
|