refactor(components): 将客户联系二维码模态框抽离为独立组件

- 从 product.vue 中移除模态框代码
- 新建 customer-service-modal.vue 组件
- 在 product.vue 中引入并使用新的 CustomerServiceModal 组件
This commit is contained in:
2025-06-18 17:59:54 +08:00
parent d6dfab4c3c
commit a6f6cd8bff
2 changed files with 18 additions and 8 deletions

View File

@ -65,14 +65,7 @@
</a-button>
</a-popconfirm>
</div>
<a-modal v-model:visible="visible">
<template #title>
扫描下面二维码联系客户
</template>
<div class="text-center">
<img width="200" src="@/assets/customer-service.svg" alt="" />
</div>
</a-modal>
<CustomerServiceModal v-model:visible="visible" />
</div>
</template>
@ -80,6 +73,8 @@
import { now } from '@vueuse/core';
import { trialProduct } from '@/api/all';
import { useRouter } from 'vue-router';
import CustomerServiceModal from '@/components/customer-service-modal.vue';
const props = defineProps<{
product: Product;
}>();