🐞 fix(图片问题):修改部分商品图片展示
This commit is contained in:
parent
dcf76ab611
commit
e68b97e104
@ -5,7 +5,7 @@ export const BASE_URL = CURRENT_BASE_URL
|
||||
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||
// export const BASE_URL = `https://pre.zzfzyc.com/lymarket` // 预发布
|
||||
// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
|
||||
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
||||
|
||||
@ -2,6 +2,7 @@ import { Image, Input, ScrollView, View } from '@tarojs/components'
|
||||
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import styles from './index.module.scss'
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
|
||||
interface props {
|
||||
clickAdd: (any) => void
|
||||
@ -17,6 +18,8 @@ interface props {
|
||||
weight_cut_price?: Number
|
||||
code?: string
|
||||
rgb?: { r: number; g: number; b: number }
|
||||
lab?: { l: number; a: number; b: number }
|
||||
texture_url: string
|
||||
name?: string
|
||||
roll?: number | string
|
||||
buyNums?: number | string
|
||||
@ -56,15 +59,23 @@ const GoodsItem = (props: props) => {
|
||||
return 'digit'
|
||||
}
|
||||
}, [props.modeFont])
|
||||
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
||||
}, [])
|
||||
return (
|
||||
<View className={styles.goodsBox}>
|
||||
{
|
||||
|
||||
{/* {
|
||||
props?.value?.rgb?.r == 0 && props?.value?.rgb?.g == 0 && props?.value?.rgb?.b == 0 && <Image className={styles.pic} mode="aspectFill" src="https://test.cdn.zzfzyc.com/mall/no_img.png"></Image>
|
||||
}
|
||||
{
|
||||
(props?.value?.rgb?.r != 0 || props?.value?.rgb?.g != 0 || props?.value?.rgb?.b != 0)
|
||||
&& <View className={styles.pic} style={{ backgroundColor: `rgb(${props?.value?.rgb?.r} ${props?.value?.rgb?.g} ${props?.value.rgb?.b})` }}></View>
|
||||
}
|
||||
} */}
|
||||
<View className={styles.pic}>
|
||||
<LabAndImg value={labAndImgObj(props.value)} />
|
||||
</View>
|
||||
<View className={styles.rightGoodbox}>
|
||||
<View className={styles.leftFontsbox}>
|
||||
<View className={styles.title}>{props.value?.code} {props.value?.name}</View>
|
||||
|
||||
@ -33,7 +33,7 @@ import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import { PAY_H5_CODE_URL } from '@/common/constant'
|
||||
import SaleCodeList from '@/components/SaleCodeList'
|
||||
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
// 卡片盒子元素
|
||||
interface Obs {
|
||||
title?: string
|
||||
@ -79,6 +79,9 @@ interface PropGoods {
|
||||
}
|
||||
const GoodsItem = (porps: PropGoods) => {
|
||||
const { list = [], obj = {} } = porps
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
||||
}, [])
|
||||
return (
|
||||
<>
|
||||
{
|
||||
@ -91,7 +94,10 @@ const GoodsItem = (porps: PropGoods) => {
|
||||
item.product_colors.map((it, inx) => {
|
||||
return (
|
||||
<View className={styles.itemGoods} key={inx}>
|
||||
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View>
|
||||
<View className={styles.itemPic}>
|
||||
<LabAndImg value={labAndImgObj(it)} />
|
||||
</View>
|
||||
{/* <View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> */}
|
||||
<View className={styles.itemRight}>
|
||||
<View className={styles.item_right_top}>
|
||||
<View className={styles.itemName}>{it.code}# {it.name}</View>
|
||||
|
||||
@ -16,7 +16,7 @@ import { alert } from '@/common/common'
|
||||
import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
|
||||
import IconFont from '@/components/iconfont/iconfont'
|
||||
import { MpPurchaserAddressList } from '@/api/addressList'
|
||||
|
||||
import LabAndImg from '@/components/LabAndImg'
|
||||
// 卡片盒子元素
|
||||
interface Obs {
|
||||
title?: string
|
||||
@ -62,6 +62,10 @@ interface PropGoods {
|
||||
}
|
||||
const GoodsItem = (porps: PropGoods) => {
|
||||
const { list = [], obj = {} } = porps
|
||||
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
||||
}, [])
|
||||
return (
|
||||
<>
|
||||
{
|
||||
@ -74,7 +78,10 @@ const GoodsItem = (porps: PropGoods) => {
|
||||
item.product_colors.map((it, inx) => {
|
||||
return (
|
||||
<View className={styles.itemGoods} key={inx}>
|
||||
<View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View>
|
||||
<View className={styles.itemPic}>
|
||||
<LabAndImg value={labAndImgObj(item)} />
|
||||
</View>
|
||||
{/* <View className={styles.itemPic} style={{ backgroundColor: `rgb(${it?.rgb?.r} ${it?.rgb?.g} ${it?.rgb?.b})` }}></View> */}
|
||||
<View className={styles.itemRight}>
|
||||
<View className={styles.item_right_top}>
|
||||
<View className={styles.itemName}>{it.code} {it.name}</View>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user