测试商品图片

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) => { let picItem = window.goods.find((item) => {
return item.id == cur_product.product_category_id 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 obj1 = []
const obj2 = [] const obj2 = []
productItem?.pic.map((item, index) => {
picItem?.describe_url.map((item, index) => {
obj1.push({ obj1.push({
src: item, src: item,
id: item, id: item,
type: 'add', type: 'add',
name: picItem.name + index name: productItem.title + index
}) })
obj2.push({ obj2.push({
url: item, url: item,
id: item, id: item,
type: 'add', type: 'add',
name: picItem.name + index name: productItem.title + index
}) })
}) })
console.log(' picItem =>', picItem) console.log(' picItem =>', picItem)

View File

@ -256,16 +256,20 @@ export default class adduserinfo extends React.Component {
const obj1 = [] const obj1 = []
const obj2 = [] 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({ obj1.push({
src: item, src: item,
name: item + index, id: item,
id: item name: productItem.title + index
}) })
obj2.push({ obj2.push({
url: item, url: item,
name: item + index, id: item,
id: item name: productItem.title + index
}) })
}) })
model2.describe_url = obj1 model2.describe_url = obj1