|
|
|
@ -5,7 +5,7 @@ import Taro, {useReachBottom} from "@tarojs/taro"; |
|
|
|
|
import Empty from "@/components/empty/empty"; |
|
|
|
|
import Spinner from "@/components/spinner"; |
|
|
|
|
import Img from "@/components/image/image"; |
|
|
|
|
import {formatDate} from "@/utils/time"; |
|
|
|
|
import {beforeTime} from "@/utils/time"; |
|
|
|
|
|
|
|
|
|
const BrandItem: FC<{ data: BrandRecord; onClick: VoidFunction }> = ({data, onClick}) => { |
|
|
|
|
let media: ReactNode |
|
|
|
@ -16,7 +16,7 @@ const BrandItem: FC<{ data: BrandRecord; onClick: VoidFunction }> = ({data, onCl |
|
|
|
|
/> |
|
|
|
|
} else if (data.brand_album) { |
|
|
|
|
media = <Img |
|
|
|
|
width={712} |
|
|
|
|
// width={712}
|
|
|
|
|
height={320} |
|
|
|
|
src={data.brand_album.split(",")[0]} |
|
|
|
|
mode="aspectFill" |
|
|
|
@ -27,26 +27,32 @@ const BrandItem: FC<{ data: BrandRecord; onClick: VoidFunction }> = ({data, onCl |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className="bg-white flex flex-column justify-stretch mb-2_4 rounded-10 clip"> |
|
|
|
|
{media} |
|
|
|
|
<View className="p-3" onClick={onClick}> |
|
|
|
|
<View className='font-weight mb-2 font-32 flex align-center'> |
|
|
|
|
<View className='mb-2 font-32 flex'> |
|
|
|
|
<Img |
|
|
|
|
width={32} |
|
|
|
|
height={32} |
|
|
|
|
width={76} |
|
|
|
|
height={76} |
|
|
|
|
src={data.logo} |
|
|
|
|
mode='aspectFill' |
|
|
|
|
errorType='avatar' |
|
|
|
|
className="rounded-10 clip" |
|
|
|
|
style={{background: '#ededed'}} |
|
|
|
|
/> |
|
|
|
|
<View className="ml-1 flex-1"> |
|
|
|
|
<View className="ml-2 flex-1"> |
|
|
|
|
<View className="text-row1 font-28">{data.name}</View> |
|
|
|
|
<View className='font-24 mt-1 text-dark'>{beforeTime(data.created_at)}·加入</View> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
<View> |
|
|
|
|
{media} |
|
|
|
|
</View> |
|
|
|
|
<View className="font-24 text-muted mb-4 text-row3" style={{lineHeight: 1.4}}> |
|
|
|
|
|
|
|
|
|
<View className="font-24 text-muted mb-4 text-row3 mt-2" style={{lineHeight: 1.4}}> |
|
|
|
|
{data.graphic_introduction} |
|
|
|
|
</View> |
|
|
|
|
<View className="flex gap20rpx font-24 text-muted"> |
|
|
|
|
<View>{formatDate(new Date(data.created_at), "YY-MM-dd hh:mm:ss")}</View> |
|
|
|
|
|
|
|
|
|
<View className="flex-1"></View> |
|
|
|
|
<View>文章:{data.article_count || 0}</View> |
|
|
|
|
<View>点赞:{(Math.random() * 100).toFixed(0)}</View> |
|
|
|
@ -105,7 +111,7 @@ const BrandList: FC = () => { |
|
|
|
|
content = ( |
|
|
|
|
<> |
|
|
|
|
{brands.map(d => <BrandItem data={d} key={d.id} onClick={() => jumpInfo(d.id)}/>)} |
|
|
|
|
<View style={{width: '710rpx', textAlign: 'center', color: '#999'}} className="font-28 mt-3">{text}</View> |
|
|
|
|
<View className='text-center font-24 text-dark mt-3'>{text}</View> |
|
|
|
|
</> |
|
|
|
|
) |
|
|
|
|
} else { |
|
|
|
|