对接api
This commit is contained in:
@@ -3,27 +3,27 @@ import Taro from "@tarojs/taro"
|
||||
import { goLink } from "@/common/common"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type params = {
|
||||
desStatus?: true|false
|
||||
type Params = {
|
||||
desStatus?: true|false,
|
||||
productList?: any[]
|
||||
}
|
||||
export default ({desStatus = true}: params) => {
|
||||
|
||||
export default ({desStatus = true, productList = []}:Params) => {
|
||||
return (
|
||||
<View className={styles.products_list}>
|
||||
{new Array(10).fill('').map(item => {
|
||||
{productList.map(item => {
|
||||
return <View className={styles.products_item} onClick={() => goLink('/pages/details/index?id=1')}>
|
||||
<View className={styles.item_img}>
|
||||
<Image src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp01%2F1ZZQ214233446-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651827249&t=b2fc2a3672dc8ced9e0f37ce7e2ff901"/>
|
||||
<View className={styles.num}>230色</View>
|
||||
<Image src={item.texture_url}/>
|
||||
<View className={styles.num}>{item.product_color_count}色</View>
|
||||
</View>
|
||||
<View className={styles.item_con}>
|
||||
<View className={styles.title}><text>0770#</text>21S单面平纹(食毛)</View>
|
||||
<View className={styles.title}><text>{item.code}#</text>{item.name}</View>
|
||||
<View className={styles.tag_list}>
|
||||
<View className={styles.tag}>160cm</View>
|
||||
<View className={styles.tag}>110g</View>
|
||||
<View className={styles.tag}>{item.width}</View>
|
||||
<View className={styles.tag}>{item.weight_density}</View>
|
||||
</View>
|
||||
<View className={styles.introduce}>67.6%棉24%涤纶6.4%氨纶</View>
|
||||
{desStatus&&<View className={styles.des}>产品描述产品描述产品描述产品描述产品描述</View>}
|
||||
<View className={styles.introduce}>{item.component}</View>
|
||||
{desStatus&&<View className={styles.des}>{item.describe}</View>}
|
||||
</View>
|
||||
</View>
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user