封装图片组件
This commit is contained in:
@@ -165,7 +165,6 @@
|
||||
.product_img{
|
||||
width: 100%;
|
||||
height: 224px;
|
||||
background: #e5ad3a;
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
position: relative;
|
||||
image{
|
||||
|
||||
@@ -17,6 +17,7 @@ import LoadingCard from "@/components/loadingCard";
|
||||
import useLogin from "@/use/useLogin";
|
||||
import { goLink } from "@/common/common";
|
||||
import SelectData, {ListProps} from "./components/selectData";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
|
||||
export default () => {
|
||||
const {checkLogin} = useLogin()
|
||||
@@ -95,7 +96,6 @@ export default () => {
|
||||
const [blueToothColor, setBlueToothColor] = useState('')
|
||||
useEffect(() => {
|
||||
if(colorState.deviceLab) {
|
||||
console.log('颜色:',colorState.deviceLab)
|
||||
const rgb = toRgb([colorState.deviceLab.L, colorState.deviceLab.a, colorState.deviceLab.b])
|
||||
setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
|
||||
setSearchField({...searchField, l:rgb[0], a:rgb[1], b:rgb[2], size:10})
|
||||
@@ -103,7 +103,7 @@ export default () => {
|
||||
}, [colorState.deviceLab])
|
||||
|
||||
const goLinkPage = (item) => {
|
||||
goLink('/pages/details/index',{id:item.id})
|
||||
goLink('/pages/details/index',{id:item.product_id})
|
||||
}
|
||||
|
||||
//获取筛选条件
|
||||
@@ -186,7 +186,7 @@ export default () => {
|
||||
{materialList.list.map(item => {
|
||||
return <View key={item.id} className={styles.product_item} onClick={() => goLinkPage(item)}>
|
||||
<View className={styles.product_img}>
|
||||
<Image mode="aspectFill" src={formatImgUrl(item.texture_url)}></Image>
|
||||
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
|
||||
<View className={styles.color_num}>{(item.product_color_code)}#</View>
|
||||
</View>
|
||||
<View className={styles.product_info}>
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
.product_img{
|
||||
width: 100%;
|
||||
height: 224px;
|
||||
background: #e5ad3a;
|
||||
border-radius: 20px 20px 0px 0px;
|
||||
position: relative;
|
||||
image{
|
||||
|
||||
@@ -13,6 +13,7 @@ import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
|
||||
import { formatHashTag, formatImgUrl } from "@/common/fotmat";
|
||||
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
||||
import useLogin from "@/use/useLogin";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
|
||||
export default () => {
|
||||
const {checkLogin} = useLogin()
|
||||
@@ -161,7 +162,7 @@ export default () => {
|
||||
{materialList.list.map(item => {
|
||||
return <View key={item.id} className={styles.product_item} onClick={() => goLinkPage(item)}>
|
||||
<View className={styles.product_img}>
|
||||
<Image mode="aspectFill" src={formatImgUrl(item.texture_url)}></Image>
|
||||
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
|
||||
<View className={styles.color_num}>{(item.product_color_count)}色</View>
|
||||
</View>
|
||||
<View className={styles.product_info}>
|
||||
|
||||
Reference in New Issue
Block a user