测试商品图片

This commit is contained in:
wangsongsole 2022-07-18 10:11:37 +08:00
parent 470f85e40d
commit fa2af2981e
2 changed files with 17 additions and 10 deletions

View File

@ -257,22 +257,25 @@ export default class adduserinfo extends React.Component {
let picItem = window.goods.find((item) => {
return item.id == cur_product.product_category_id
})
console.log(picItem)
const productItem = picItem.products.find(
(item) => item.id == cur_product.id
)
const obj1 = []
const obj2 = []
picItem?.describe_url.map((item, index) => {
productItem?.pic.map((item, index) => {
obj1.push({
src: item,
id: item,
type: 'add',
name: picItem.name + index
name: productItem.title + index
})
obj2.push({
url: item,
id: item,
type: 'add',
name: picItem.name + index
name: productItem.title + index
})
})
console.log(' picItem =>', picItem)

View File

@ -256,16 +256,20 @@ export default class adduserinfo extends React.Component {
const obj1 = []
const obj2 = []
picItem?.describe_url.map((item, index) => {
const productItem = picItem.products.find(
(item) => item.id == cur_product.id
)
productItem?.pic.map((item, index) => {
obj1.push({
src: item,
name: item + index,
id: item
id: item,
name: productItem.title + index
})
obj2.push({
url: item,
name: item + index,
id: item
id: item,
name: productItem.title + index
})
})
model2.describe_url = obj1