Browse Source

完善图片上传

dev
dengyinhuan 1 year ago
parent
commit
bf7f9cffaa
  1. 8
      web/client/src/sections/fillion/components/uploads.js

8
web/client/src/sections/fillion/components/uploads.js

@ -20,7 +20,7 @@ class Uploads extends Component {
} }
dealName = (uploaded) => { dealName = (uploaded) => {
console.log(uploaded)
let realName = uploaded.split('/')[2] let realName = uploaded.split('/')[2]
let x1 = realName.split('.') let x1 = realName.split('.')
let x2 = x1[0].split('_') let x2 = x1[0].split('_')
@ -31,6 +31,7 @@ class Uploads extends Component {
setFileList = (value) => { setFileList = (value) => {
let defaultFileList = []; let defaultFileList = [];
defaultFileList = value.map((u, index) => { defaultFileList = value.map((u, index) => {
// let fileUrl = `${this.ApiRoot}/${u.url}`;
let fileUrl = `${u.url}`; let fileUrl = `${u.url}`;
return { return {
uid: -index - 1, uid: -index - 1,
@ -60,7 +61,8 @@ class Uploads extends Component {
const setFileList = () => { const setFileList = () => {
let defaultFileList = []; let defaultFileList = [];
defaultFileList = nextEditData.map((u, index) => { defaultFileList = nextEditData.map((u, index) => {
let fileUrl = `${this.ApiRoot}/${u.storageUrl}`; // let fileUrl = `${this.ApiRoot}/${u.storageUrl}`;
let fileUrl = `${u.storageUrl}`;
return { return {
uid: -index - 1, uid: -index - 1,
name: this.dealName(u.storageUrl), name: this.dealName(u.storageUrl),
@ -268,7 +270,7 @@ class Uploads extends Component {
// } // }
// return f // return f
// }) // })
console.log('fileList_:', fileList_);
return ( return (
<div> <div>
<Spin spinning={delPicIng}> <Spin spinning={delPicIng}>

Loading…
Cancel
Save