Files
JayuCloud/JY-Artist-Frontend/src/views/HelpView.vue
T
2026-06-29 23:26:43 +08:00

97 lines
4.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { LeftOutlined } from '@ant-design/icons-vue'
import { message } from 'ant-design-vue'
import { userApi, type ContactInfoVO } from '@/api/user'
import { BRAND_CONFIG } from '@/config/brand'
const router = useRouter()
const loading = ref(false)
const contact = ref<ContactInfoVO | null>(null)
const loadContact = async () => {
loading.value = true
try {
contact.value = await userApi.getPlatformContact()
} catch (error: any) {
contact.value = null
message.warning(error?.message || '暂时无法加载客服信息')
} finally {
loading.value = false
}
}
onMounted(loadContact)
</script>
<template>
<div class="help-page">
<header class="header">
<a-button type="text" @click="router.back()">
<LeftOutlined />
</a-button>
<h1>帮助与客服</h1>
<a-button type="link" @click="loadContact">刷新</a-button>
</header>
<main class="content">
<section class="hero-card">
<span>{{ BRAND_CONFIG.appName }}客服</span>
<h2>帮助与客服</h2>
<p>订单、预约、售后和账号问题都可以从这里继续处理。</p>
</section>
<a-spin :spinning="loading">
<section class="section-card">
<h3>平台联系信息</h3>
<p v-if="contact?.contactName">{{ contact.contactName }} {{ contact.roleLabel || '' }}</p>
<p v-if="contact?.phoneAvailable && contact.phone">电话:{{ contact.phone }}</p>
<p v-if="contact?.wechatAvailable && contact.wechatId">微信:{{ contact.wechatId }}</p>
<p v-if="contact?.platformContactText">{{ contact.platformContactText }}</p>
<p v-if="!contact">暂无可展示的客服信息,请稍后重试或通过订单详情联系服务人员。</p>
</section>
<section class="quick-grid">
<button type="button" @click="router.push('/orders')">
<strong>订单中心</strong>
<span>查看预约、支付、评价</span>
</button>
<button type="button" @click="router.push('/after-sales')">
<strong>售后记录</strong>
<span>查看退款和处理进度</span>
</button>
<button type="button" @click="router.push('/notifications')">
<strong>消息中心</strong>
<span>查看系统通知</span>
</button>
<button type="button" @click="router.push('/settings')">
<strong>账号设置</strong>
<span>修改资料、手机号和密码</span>
</button>
</section>
</a-spin>
</main>
</div>
</template>
<style scoped>
.help-page { min-height: 100vh; padding-top: 66px; background: linear-gradient(180deg, color-mix(in srgb, var(--theme-card-bg) 76%, transparent), var(--theme-page-bg)); color: var(--text-primary); }
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 11px 18px; background: color-mix(in srgb, var(--theme-card-bg) 92%, transparent); border-bottom: 1px solid var(--theme-border); backdrop-filter: blur(14px); }
.header h1 { margin: 0; font-size: 17px; font-weight: 820; }
.content { padding: 18px 18px 34px; }
.hero-card, .section-card, .quick-grid button { border: 1px solid var(--theme-border); border-radius: 24px; background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent); box-shadow: 0 18px 44px color-mix(in srgb, var(--theme-neutral) 8%, transparent); }
.hero-card { padding: 24px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 24%, var(--theme-card-bg)), color-mix(in srgb, var(--theme-secondary) 18%, var(--theme-card-bg))); }
.hero-card span { color: var(--theme-primary-action); font-family: Georgia, 'Times New Roman', serif; font-size: 12px; font-weight: 800; }
.hero-card h2 { margin: 10px 0 6px; font-size: 21px; font-weight: 850; }
.hero-card p, .section-card p, .quick-grid span { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.section-card { padding: 16px; }
.section-card h3 { margin: 0 0 12px; font-size: 17px; }
.section-card p + p { margin-top: 8px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.quick-grid button { display: grid; gap: 6px; min-height: 112px; padding: 16px; border-color: var(--theme-border); text-align: left; color: var(--text-primary); cursor: pointer; }
.quick-grid strong { font-size: 16px; }
.quick-grid span { font-size: 13px; }
:deep(.ant-btn-link) { color: var(--theme-primary-action); }
</style>