商城测试版v6
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
right:0;
|
||||
bottom: 0;
|
||||
background: rgba($color: #000, $alpha: 0.3);
|
||||
border-radius: 36px 0px 10px 0px;
|
||||
border-radius: 36px 0px 20px 0px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -4,18 +4,24 @@ import { goLink } from "@/common/common"
|
||||
import styles from './index.module.scss'
|
||||
import { formatHashTag, formatImgUrl } from "@/common/fotmat"
|
||||
import LabAndImg from "../LabAndImg"
|
||||
import { useCallback, useMemo } from "react"
|
||||
|
||||
type Params = {
|
||||
desStatus?: true|false,
|
||||
productList?: any[]
|
||||
}
|
||||
export default ({desStatus = true, productList = []}:Params) => {
|
||||
|
||||
const labAndImgObj = useCallback((item) => {
|
||||
const img = item?item.texture_url.split(',')[0]:''
|
||||
return {lab:item.lab,rgb:item.rgb,texture_url:img}
|
||||
}, [productList])
|
||||
return (
|
||||
<View className={styles.products_list}>
|
||||
{productList?.map(item => {
|
||||
return <View className={styles.products_item} onClick={() => goLink(`/pages/details/index?id=${item.id}`)}>
|
||||
<View className={styles.item_img}>
|
||||
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
|
||||
<LabAndImg value={labAndImgObj(item)}/>
|
||||
<View className={styles.num}>{item.product_color_count}色</View>
|
||||
</View>
|
||||
<View className={styles.item_con}>
|
||||
|
||||
Reference in New Issue
Block a user