style(goods): 商品列表卡片样式优化
- 为商品图片添加固定宽高和圆角样式 - 在政企采购专区卡片上添加点击跳转功能 - 在桂乐淘福利区卡片上添加点击跳转功能 - 为两个专区卡片添加箭头图标指示跳转 - 从 NutUI 图标库导入箭头图标组件
This commit is contained in:
@@ -3,7 +3,7 @@ import Banner from './Banner'
|
|||||||
import Taro, { useDidShow, useShareAppMessage } from '@tarojs/taro'
|
import Taro, { useDidShow, useShareAppMessage } from '@tarojs/taro'
|
||||||
import { View, Text, Image, ScrollView } from '@tarojs/components'
|
import { View, Text, Image, ScrollView } from '@tarojs/components'
|
||||||
import { useEffect, useMemo, useState, type ReactNode } from 'react'
|
import { useEffect, useMemo, useState, type ReactNode } from 'react'
|
||||||
import { Cart, Gift, Ticket, Agenda } from '@nutui/icons-react-taro'
|
import { Cart, Gift, Ticket, Agenda, ArrowRight } from '@nutui/icons-react-taro'
|
||||||
import { getShopInfo } from '@/api/layout'
|
import { getShopInfo } from '@/api/layout'
|
||||||
import { checkAndHandleInviteRelation, hasPendingInvite } from '@/utils/invite'
|
import { checkAndHandleInviteRelation, hasPendingInvite } from '@/utils/invite'
|
||||||
import { pageShopGoods } from '@/api/shop/shopGoods'
|
import { pageShopGoods } from '@/api/shop/shopGoods'
|
||||||
@@ -290,17 +290,17 @@ function Home() {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* onClick={() => Taro.navigateTo({ url: `/shop/category/index?id=4560` })} */}
|
<View className="ticket-card" onClick={() => Taro.navigateTo({ url: `/shop/category/index?id=4560` })}>
|
||||||
<View className="ticket-card">
|
|
||||||
<View className="ticket-card__head">
|
<View className="ticket-card__head">
|
||||||
<Text className="ticket-card__title">政企采购专区</Text>
|
<Text className="ticket-card__title">政企采购专区</Text>
|
||||||
|
<ArrowRight className={'text-gray-50'} size={16} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* onClick={() => navTo('/shop/category/index?id=4556')} */}
|
<View className="ticket-card" onClick={() => Taro.navigateTo({ url: `/shop/category/index?id=4556` })}>
|
||||||
<View className="ticket-card">
|
|
||||||
<View className="ticket-card__head">
|
<View className="ticket-card__head">
|
||||||
<Text className="ticket-card__title">桂乐淘·福利惊爆区</Text>
|
<Text className="ticket-card__title">桂乐淘·福利惊爆区</Text>
|
||||||
|
<ArrowRight className={'text-gray-50'} size={16} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ const GoodsList = (props: any) => {
|
|||||||
className="goods-card__img"
|
className="goods-card__img"
|
||||||
src={item.image || ''}
|
src={item.image || ''}
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
|
width="100%"
|
||||||
|
height="280rpx"
|
||||||
|
radius="18rpx"
|
||||||
lazyLoad={false}
|
lazyLoad={false}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
Taro.navigateTo({ url: `/shop/goodsDetail/index?id=${item.goodsId}` })
|
Taro.navigateTo({ url: `/shop/goodsDetail/index?id=${item.goodsId}` })
|
||||||
|
|||||||
Reference in New Issue
Block a user