商城测试版v6

This commit is contained in:
2022-07-19 21:17:53 +08:00
parent d5a5099e25
commit ff8eb0ce1c
33 changed files with 839 additions and 655 deletions
+6 -1
View File
@@ -153,6 +153,11 @@ export default () => {
setSearchField((e) => ({...e, abstract_sort_key: value}))
}
}
const labAndImgObj = useCallback((item) => {
const img = item?item.texture_url.split(',')[0]:''
return {lab:item.lab,rgb:item.rgb,texture_url:img}
}, [materialList])
return (
<View className={styles.main}>
<View className={styles.search}>
@@ -202,7 +207,7 @@ export default () => {
{materialList.list.map(item => {
return <View key={item.id} className={styles.product_item} onClick={() => goLinkPage(item)}>
<View className={styles.product_img}>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
<LabAndImg value={labAndImgObj(item)}/>
<View className={styles.color_num}>{(item.product_color_code)}</View>
</View>
<View className={styles.product_info}>
+1 -1
View File
@@ -1,5 +1,5 @@
export default {
navigationBarTitleText: '高级搜索',
navigationBarTitleText: '搜索',
enablePullDownRefresh: true,
backgroundTextStyle: 'dark'
}
+6 -1
View File
@@ -136,6 +136,11 @@ export default () => {
setSearchField((e) => ({...e, abstract_sort_key: value}))
}
}
const labAndImgObj = useCallback((item) => {
const img = item?item.texture_url.split(',')[0]:''
return {lab:item.lab,rgb:item.rgb,texture_url:img}
}, [materialList])
return (
<View className={styles.main}>
<View className={styles.search}>
@@ -179,7 +184,7 @@ export default () => {
{materialList.list.map(item => {
return <View key={item.id} className={styles.product_item} onClick={() => goLinkPage(item)}>
<View className={styles.product_img}>
<LabAndImg value={{lab:item.lab,rgb:item.rgb,texture_url:item.texture_url}}/>
<LabAndImg value={labAndImgObj(item)}/>
<View className={styles.color_num}>{(item.product_color_count)}色</View>
</View>
<View className={styles.product_info}>