商品编辑

This commit is contained in:
姜棚 2022-01-22 14:20:37 +08:00
parent 9c55e41333
commit 77f9accc64
2 changed files with 26 additions and 8 deletions

View File

@ -515,7 +515,6 @@ export default class acclist extends React.Component{
Notify.success("成功发起审批");
setTimeout(()=>{
this.props.history.push('/home/key-list/');
},2000)
@ -1182,7 +1181,7 @@ export default class acclist extends React.Component{
</Drawer>
<Drawer
className="draw"
width={"60%"}
width={"80%"}
title={"新建商品"}
footer={
<div style={{ textAlign: 'center' }}>

View File

@ -80,16 +80,35 @@ export default class adduserinfo extends React.Component{
let temp_productpic = this.state.productpic
for(let i = 0;i < model_temp.describe_url.length;i++)
let pics = ""
console.log("描述图",model_temp.describe_url)
if(Array.isArray(model_temp.describe_url))
{
pics = model_temp.describe_url
}
else{
if(model_temp.describe_url !="" && model_temp.describe_url!=undefined)
{
pics = model_temp.describe_url.split(',')
}
else{
pics = []
}
}
for(let i = 0;i < pics.length;i++)
{
let obj = {}
let nameArr = model_temp.describe_url[i].split('/');
let nameArr = pics[i].split('/');
obj.name = nameArr[5]
obj.src = model_temp.describe_url[i];
obj.src = pics[i];
defaultPic.push(obj)
let obj2={
name:nameArr[5],
url:model_temp.describe_url[i]
url:pics[i]
}
temp_productpic.push(obj2)
}