This commit is contained in:
李志鹏
2026-05-27 11:16:40 +08:00
parent a0fa8cd523
commit 22ebbba451
2 changed files with 13 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
<img :src="info.cover" />
<div class="content">
<div class="title">{{ info.title }}</div>
<div class="brand" v-if="showBrand">
<div class="brand" v-if="showBrand" @click="handleBrandClick">
<span class="icon"><svg-icon name="order-shop" size="24" /></span>
<span class="text">{{ info.brand }}</span>
</div>
@@ -49,7 +49,9 @@
<script setup lang="ts">
import { computed, ref, onMounted } from 'vue'
import { FormatBytes, FormatDate } from '@/utils/tools'
import { FormatDate } from '@/utils/tools'
import { useRouter } from 'vue-router'
const router = useRouter()
const emit = defineEmits(['remove'])
const props = defineProps({
showTags: { type: Boolean, default: true },
@@ -66,6 +68,7 @@
date: string
amount: number
cover: string
sellerId: string
},
default: () => {}
},
@@ -74,6 +77,12 @@
const onRemove = () => {
emit('remove', props.info)
}
const handleBrandClick = () => {
router.push({
name: 'brand',
params: { id: props.info.sellerId }
})
}
</script>
<style lang="less" scoped>
@@ -106,6 +115,7 @@
> .brand {
display: flex;
align-items: center;
cursor: pointer;
> .icon {
width: 2.4rem;
height: 2.4rem;

View File

@@ -159,6 +159,7 @@
listingId: v.listingId, //资产ID
title: v.title, //标题
brand: v.shopName, //店铺名称
sellerId: v.sellerId, //店铺ID
cover: v.cover, //封面
amount: v.price, //价格
status: v.status, //状态