提交 5986ea5a authored 作者: 刘旭's avatar 刘旭

把产品线显示的设计图片改成产品线图片

上级 30c0e767
...@@ -180,7 +180,7 @@ let custom = (selectShop: any) => { ...@@ -180,7 +180,7 @@ let custom = (selectShop: any) => {
let addCartFn = (obj: any) => { let addCartFn = (obj: any) => {
let { selectShop } = obj; let { selectShop } = obj;
let productData: any = getProductId(selectShop.sku_name_arr) let productData: any = getProductId(selectShop.sku_name_arr)
if (productData.designUrl) selectShop.image = productData.designUrl if (productData.lineUrl) selectShop.image = productData.lineUrl
let shop = custom(selectShop) let shop = custom(selectShop)
let specifications: any = selectShop.sku_name_arr let specifications: any = selectShop.sku_name_arr
let specificationCustom: any = [] let specificationCustom: any = []
...@@ -250,7 +250,7 @@ let addCarts = (selectShop: any) => { ...@@ -250,7 +250,7 @@ let addCarts = (selectShop: any) => {
let buyNow = (selectShop: any) => { let buyNow = (selectShop: any) => {
// console.log(selectShop, selectShop.sku_name_arr ,' selectShop.sku_name_arr'); // console.log(selectShop, selectShop.sku_name_arr ,' selectShop.sku_name_arr');
let productData: any = getProductId(selectShop.sku_name_arr) let productData: any = getProductId(selectShop.sku_name_arr)
if (productData.designUrl) selectShop.image = productData.designUrl if (productData.lineUrl) selectShop.image = productData.lineUrl
let shop = custom(selectShop) let shop = custom(selectShop)
let specifications: any = selectShop.sku_name_arr let specifications: any = selectShop.sku_name_arr
let specificationCustom: any = [] let specificationCustom: any = []
...@@ -309,7 +309,7 @@ const addProduct = (selectShop: any) => { ...@@ -309,7 +309,7 @@ const addProduct = (selectShop: any) => {
// console.log(selectShop); // console.log(selectShop);
skuPopupRef.value.handClose() skuPopupRef.value.handClose()
let productData: any = getProductId(selectShop.sku_name_arr) let productData: any = getProductId(selectShop.sku_name_arr)
if (productData.designUrl) selectShop.image = productData.designUrl if (productData.lineUrl) selectShop.image = productData.lineUrl
let shop = custom(selectShop) let shop = custom(selectShop)
let specifications: any = selectShop.sku_name_arr let specifications: any = selectShop.sku_name_arr
let specificationCustom: any = [] let specificationCustom: any = []
...@@ -332,7 +332,7 @@ const addProduct = (selectShop: any) => { ...@@ -332,7 +332,7 @@ const addProduct = (selectShop: any) => {
// 获取分组id // 获取分组id
const getProductId = (specText: any) => { const getProductId = (specText: any) => {
let productId; let productId;
let designUrl; let lineUrl;
detailData.value?.productList.forEach((item: any) => { detailData.value?.productList.forEach((item: any) => {
// 判断是否相等 // 判断是否相等
if (item.specifications.length === specText.length) { if (item.specifications.length === specText.length) {
...@@ -342,12 +342,12 @@ const getProductId = (specText: any) => { ...@@ -342,12 +342,12 @@ const getProductId = (specText: any) => {
}) })
if (bool) { if (bool) {
productId = item.id productId = item.id
designUrl = item.designUrl lineUrl = item.lineUrl
} }
bool = true bool = true
} }
}) })
return { productId, designUrl } return { productId, lineUrl }
} }
// 清除sku数据 // 清除sku数据
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论