杂务:更新 YumiNail 工作区
This commit is contained in:
@@ -121,9 +121,42 @@
|
||||
<a-modal v-model:open="contactOpen" title="一键联系" :footer="null">
|
||||
<div class="contact-box">
|
||||
<p class="contact-name">{{ contactInfo.contactName || contactInfo.roleLabel || '联系人' }}</p>
|
||||
<p>电话联系:{{ contactInfo.phoneAvailable ? contactInfo.phone : '暂无电话' }}</p>
|
||||
<a-button v-if="contactInfo.phoneAvailable" type="primary" block :href="`tel:${contactInfo.phone}`">拨打电话</a-button>
|
||||
<a-button block disabled>{{ contactInfo.platformContactText || '平台联系暂未接入' }}</a-button>
|
||||
<div class="contact-row">
|
||||
<span>联系电话</span>
|
||||
<strong>{{ contactInfo.phoneAvailable ? contactInfo.phone : '暂无电话' }}</strong>
|
||||
</div>
|
||||
<div class="contact-actions">
|
||||
<a-button v-if="contactInfo.phoneAvailable" type="primary" :href="`tel:${contactInfo.phone}`">
|
||||
<PhoneOutlined />
|
||||
拨号
|
||||
</a-button>
|
||||
<a-button v-if="contactInfo.phoneAvailable" @click="copyToClipboard(contactInfo.phone || '', '联系电话')">
|
||||
<CopyOutlined />
|
||||
复制电话
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="contact-row">
|
||||
<span>微信号</span>
|
||||
<strong>{{ contactInfo.wechatAvailable ? contactInfo.wechatId : '暂无微信' }}</strong>
|
||||
</div>
|
||||
<img v-if="contactInfo.wechatQrCode" :src="contactInfo.wechatQrCode" alt="微信二维码" class="contact-qr" />
|
||||
<div class="contact-actions">
|
||||
<a-button v-if="contactInfo.wechatAvailable" type="primary" @click="openWechatContact">
|
||||
<WechatOutlined />
|
||||
打开微信
|
||||
</a-button>
|
||||
<a-button v-if="contactInfo.wechatAvailable" @click="copyToClipboard(contactInfo.wechatId || '', '微信号')">
|
||||
<CopyOutlined />
|
||||
复制微信
|
||||
</a-button>
|
||||
<a-button v-if="contactInfo.phoneAvailable || contactInfo.wechatAvailable" @click="copyContactInfo">
|
||||
<CopyOutlined />
|
||||
一键复制
|
||||
</a-button>
|
||||
</div>
|
||||
<a-button v-if="!contactInfo.phoneAvailable && !contactInfo.wechatAvailable" block disabled>
|
||||
{{ contactInfo.platformContactText || '平台联系暂未接入' }}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
@@ -147,7 +180,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { CopyOutlined, LeftOutlined, ShopOutlined } from '@ant-design/icons-vue'
|
||||
import { CopyOutlined, LeftOutlined, PhoneOutlined, ShopOutlined, WechatOutlined } from '@ant-design/icons-vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { fileApi } from '@/api/file'
|
||||
/**
|
||||
@@ -371,6 +404,24 @@ const copyToClipboard = async (text: string, type: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** openWechatContact copies the WeChat ID and then asks the browser to open WeChat. */
|
||||
const openWechatContact = async () => {
|
||||
const wechatId = contactInfo.value.wechatId
|
||||
if (!wechatId) return
|
||||
await copyToClipboard(wechatId, '微信号')
|
||||
window.location.href = 'weixin://'
|
||||
}
|
||||
|
||||
/** copyContactInfo copies all available contact channels in one action. */
|
||||
const copyContactInfo = async () => {
|
||||
const lines = [
|
||||
contactInfo.value.contactName || contactInfo.value.roleLabel || '联系人',
|
||||
contactInfo.value.phoneAvailable && contactInfo.value.phone ? `电话:${contactInfo.value.phone}` : '',
|
||||
contactInfo.value.wechatAvailable && contactInfo.value.wechatId ? `微信:${contactInfo.value.wechatId}` : ''
|
||||
].filter(Boolean)
|
||||
await copyToClipboard(lines.join('\n'), '联系方式')
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: loadShopImages supports ShopDetailView.vue by holding or executing the load shop images page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
@@ -516,13 +567,13 @@ onMounted(fetchShopDetail)
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
margin: 0 0 8px;
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.shop-address {
|
||||
font-size: 14px;
|
||||
color: #667085;
|
||||
color: var(--text-secondary);
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
cursor: pointer;
|
||||
@@ -537,7 +588,7 @@ onMounted(fetchShopDetail)
|
||||
.copy-icon {
|
||||
font-size: 13px;
|
||||
margin-left: 6px;
|
||||
color: #8a94a6;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.shop-details {
|
||||
@@ -575,14 +626,14 @@ onMounted(fetchShopDetail)
|
||||
|
||||
.detail-label {
|
||||
font-size: 13px;
|
||||
color: #8a94a6;
|
||||
color: var(--text-secondary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
margin-top: 6px;
|
||||
font-size: 16px;
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
@@ -633,7 +684,7 @@ onMounted(fetchShopDetail)
|
||||
text-align: left;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
background: var(--theme-card-bg);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -661,7 +712,7 @@ onMounted(fetchShopDetail)
|
||||
}
|
||||
|
||||
.featured-product strong {
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -685,14 +736,14 @@ onMounted(fetchShopDetail)
|
||||
padding: 12px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
background: var(--theme-card-bg);
|
||||
}
|
||||
|
||||
.recent-review__head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.recent-review__head span {
|
||||
@@ -702,7 +753,7 @@ onMounted(fetchShopDetail)
|
||||
|
||||
.recent-review p {
|
||||
margin: 8px 0 6px;
|
||||
color: #475467;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@@ -713,7 +764,7 @@ onMounted(fetchShopDetail)
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
@@ -775,13 +826,49 @@ onMounted(fetchShopDetail)
|
||||
.contact-name {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
color: #172033;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.contact-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 8px;
|
||||
background: var(--theme-primary-soft);
|
||||
}
|
||||
|
||||
.contact-row span {
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.contact-row strong {
|
||||
min-width: 0;
|
||||
overflow-wrap: break-word;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.contact-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.contact-qr {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 8px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.map-summary {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
color: #475467;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.map-frame {
|
||||
@@ -789,7 +876,7 @@ onMounted(fetchShopDetail)
|
||||
height: 420px;
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
background: #eef2f7;
|
||||
background: var(--theme-primary-soft);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
@@ -830,4 +917,97 @@ onMounted(fetchShopDetail)
|
||||
padding: 100px 24px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.shop-detail {
|
||||
background:
|
||||
radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--theme-primary) 26%, transparent), transparent 32%),
|
||||
linear-gradient(180deg, color-mix(in srgb, var(--theme-card-bg) 76%, transparent), var(--theme-page-bg));
|
||||
}
|
||||
|
||||
.header-bg {
|
||||
height: 210px;
|
||||
background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 28%, var(--theme-card-bg)), color-mix(in srgb, var(--theme-secondary) 22%, var(--theme-page-bg)));
|
||||
}
|
||||
|
||||
.header {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
border-radius: 999px;
|
||||
color: var(--theme-primary-action);
|
||||
background: color-mix(in srgb, var(--theme-card-bg) 76%, transparent);
|
||||
box-shadow: 0 12px 24px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
color: var(--text-primary);
|
||||
font-weight: 820;
|
||||
}
|
||||
|
||||
.shop-content {
|
||||
padding: 92px 18px 28px;
|
||||
}
|
||||
|
||||
.shop-card {
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 28px;
|
||||
background: color-mix(in srgb, var(--theme-card-bg) 90%, transparent);
|
||||
box-shadow: 0 24px 54px color-mix(in srgb, var(--theme-neutral) 11%, transparent);
|
||||
}
|
||||
|
||||
.shop-card :deep(.ant-card-body) {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.shop-icon-wrapper {
|
||||
border-radius: 22px;
|
||||
background: linear-gradient(135deg, var(--theme-primary-action), var(--theme-secondary));
|
||||
}
|
||||
|
||||
.shop-name {
|
||||
font-size: 24px;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.shop-distance,
|
||||
.trust-card strong,
|
||||
.featured-product span,
|
||||
.recent-review__head span {
|
||||
color: var(--theme-primary-action);
|
||||
}
|
||||
|
||||
.trust-card,
|
||||
.featured-product,
|
||||
.recent-review,
|
||||
.contact-row {
|
||||
border-radius: 18px;
|
||||
background: color-mix(in srgb, var(--theme-card-bg) 86%, var(--theme-primary-soft));
|
||||
}
|
||||
|
||||
.image-carousel,
|
||||
.carousel-item,
|
||||
.carousel-image {
|
||||
border-radius: 22px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 17px;
|
||||
font-weight: 820;
|
||||
}
|
||||
|
||||
:deep(.ant-btn-primary) {
|
||||
border-color: transparent;
|
||||
background: linear-gradient(135deg, var(--theme-primary-action), var(--theme-secondary));
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.shop-content {
|
||||
padding: 92px 18px 28px;
|
||||
}
|
||||
|
||||
.trust-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user