修复商品图片编辑不能删除
This commit is contained in:
parent
c81a0e4683
commit
470f85e40d
|
@ -112,15 +112,16 @@ export default class adduserinfo extends React.Component {
|
||||||
for (let i = 0; i < pics.length; i++) {
|
for (let i = 0; i < pics.length; i++) {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
let nameArr = pics[i].split('/')
|
let nameArr = pics[i].split('/')
|
||||||
obj.name = nameArr[5] || nameArr[2]
|
obj.name = nameArr[5] + i || nameArr[2] + i
|
||||||
obj.src = pics[i]
|
obj.src = pics[i]
|
||||||
defaultPic.push(obj)
|
defaultPic.push(obj)
|
||||||
let obj2 = {
|
let obj2 = {
|
||||||
name: nameArr[5] || nameArr[2],
|
name: nameArr[5] + i || nameArr[2] + i,
|
||||||
url: pics[i]
|
url: pics[i]
|
||||||
}
|
}
|
||||||
temp_productpic.push(obj2)
|
temp_productpic.push(obj2)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ temp_productpic })
|
this.setState({ temp_productpic })
|
||||||
model.describe_url = defaultPic
|
model.describe_url = defaultPic
|
||||||
model.stock = model_temp.stock
|
model.stock = model_temp.stock
|
||||||
|
|
|
@ -104,11 +104,11 @@ export default class adduserinfo extends React.Component {
|
||||||
for (let i = 0; i < pics.length; i++) {
|
for (let i = 0; i < pics.length; i++) {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
let nameArr = pics[i].split('/')
|
let nameArr = pics[i].split('/')
|
||||||
obj.name = nameArr[5] || nameArr[2]
|
obj.name = nameArr[5] + i || nameArr[2] + i
|
||||||
obj.src = pics[i]
|
obj.src = pics[i]
|
||||||
defaultPic.push(obj)
|
defaultPic.push(obj)
|
||||||
let obj2 = {
|
let obj2 = {
|
||||||
name: nameArr[5] || nameArr[2],
|
name: nameArr[5] + i || nameArr[2] + i,
|
||||||
url: pics[i]
|
url: pics[i]
|
||||||
}
|
}
|
||||||
temp_productpic.push(obj2)
|
temp_productpic.push(obj2)
|
||||||
|
|
Loading…
Reference in New Issue