import { View } from '@tarojs/components' import { Image } from '@nutui/nutui-react-taro' import { Share } from '@nutui/icons-react-taro' import Taro from '@tarojs/taro' import { ShopGoods } from '@/api/shop/shopGoods/model' import './GoodsItem.scss' interface GoodsItemProps { goods: ShopGoods } const GoodsItem = ({ goods }: GoodsItemProps) => { // 跳转到商品详情 const goToDetail = () => { Taro.navigateTo({ url: `/shop/goodsDetail/index?id=${goods.goodsId}` }) } return ( {goods.name || goods.goodsName} {goods.comments || ''} 已售 {goods.sales || 0} {goods.price || '0.00'} 购买 ) } export default GoodsItem