🐞 fix(订单列表):修改列表的商品图片
This commit is contained in:
parent
1180a3e916
commit
bf80f95ead
@ -5,6 +5,7 @@ import classnames from 'classnames'
|
|||||||
import BottomBtns from '@/components/BottomBtns'
|
import BottomBtns from '@/components/BottomBtns'
|
||||||
import { formatPriceDiv } from '@/common/format'
|
import { formatPriceDiv } from '@/common/format'
|
||||||
import Taro from '@tarojs/taro'
|
import Taro from '@tarojs/taro'
|
||||||
|
import LabAndImg from "@/components/LabAndImg"
|
||||||
|
|
||||||
interface propsObj {
|
interface propsObj {
|
||||||
obj: any,
|
obj: any,
|
||||||
@ -38,6 +39,9 @@ export default memo((props: propsObj) => {
|
|||||||
}
|
}
|
||||||
}, [props?.obj])
|
}, [props?.obj])
|
||||||
|
|
||||||
|
const labAndImgObj = useCallback((item) => {
|
||||||
|
return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url }
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={styles.itemBox} onClick={(e) => navTo(e)}>
|
<View className={styles.itemBox} onClick={(e) => navTo(e)}>
|
||||||
@ -49,7 +53,8 @@ export default memo((props: propsObj) => {
|
|||||||
<View className={styles.line}></View>
|
<View className={styles.line}></View>
|
||||||
<View className={styles.contBox}>
|
<View className={styles.contBox}>
|
||||||
<View style={{ minWidth: '24%' }}>
|
<View style={{ minWidth: '24%' }}>
|
||||||
<View className={styles.leftCont} style={{ backgroundColor: `rgb(${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.r} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.g} ${props?.obj?.product_list[0]?.product_colors[0]?.rgb?.b})` }}>
|
<View className={styles.leftCont}>
|
||||||
|
<LabAndImg value={labAndImgObj(props?.obj?.product_list?.[0])} />
|
||||||
<View className={styles.leftContNums}>颜色 ({props?.obj?.total_colors})</View>
|
<View className={styles.leftContNums}>颜色 ({props?.obj?.total_colors})</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user