feat 个人中心
This commit is contained in:
@@ -1,153 +1,138 @@
|
||||
<script setup lang="ts">
|
||||
const intro = '虫子智造是一站式研发智造一体化服务平台,聚焦零部件加工、模具开发、样品试制与批量生产需求,打通需求发布、方案对接、项目管控、合同结算全流程,为企业提供高效透明的智能制造外协解决方案。'
|
||||
|
||||
const mission = '连接需求方与制造资源,简化外协生产流程,降低企业研发与制造成本,助力中小制造企业数字化转型。'
|
||||
|
||||
const advantages = [
|
||||
{ title: '全流程线上化', desc: '需求发布、方案对接、进度跟踪、合同结算全程线上完成,状态实时可见。' },
|
||||
{ title: '优质制造资源', desc: '汇聚软硬件研发与量产优质服务商,严格资质审核,匹配更精准。' },
|
||||
{ title: '规范化项目管控', desc: '标准化交付节点与验收流程,里程碑透明管控,项目风险早发现早处理。' },
|
||||
{ title: '一站式服务', desc: '从零部件加工到模具开发、样品试制与批量生产,一个平台完成全部外协。' },
|
||||
{ title: '全流程线上化', desc: '需求提报、项目跟进、合同管理、财务对账全部线上完成,进度实时可见。' },
|
||||
{ title: '优质制造资源', desc: '汇聚各类加工厂商,覆盖 3D 打印、机加工、注塑、钣金等多种工艺。' },
|
||||
{ title: '规范化项目管理', desc: '统一项目流程、质量标准、售后保障,降低合作风险。' },
|
||||
{ title: '一站式服务', desc: '从样品打样到批量生产,提供完整的智造交付支撑。' },
|
||||
]
|
||||
|
||||
const contacts = [
|
||||
{ label: '客服热线:', value: '400-XXXX-XXXX' },
|
||||
{ label: '工作时间:', value: '周一至周五 09:00 - 18:00' },
|
||||
{ label: '平台官网:', value: 'www.chongzizhizao.com', link: true },
|
||||
{ label: '公司地址:', value: '山东省日照市' },
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="about-panel">
|
||||
<section class="about-panel__section">
|
||||
<h3 class="about-panel__title">
|
||||
<h3 class="about-panel__section-title">
|
||||
平台简介
|
||||
</h3>
|
||||
<p class="about-panel__text">
|
||||
虫子智造是一站式研发智造一体化服务平台,聚焦零部件加工、模具开发、样品试制与批量生产需求,打通需求发布、方案对接、项目管控、合同结算全流程,为企业提供高效透明的智能制造外协解决方案。
|
||||
<p class="about-panel__center-text">
|
||||
{{ intro }}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="about-panel__section">
|
||||
<h3 class="about-panel__title">
|
||||
<h3 class="about-panel__section-title">
|
||||
我们的使命
|
||||
</h3>
|
||||
<p class="about-panel__text">
|
||||
连接需求方与制造资源,简化外协生产流程,降低企业研发与制造成本,助力中小制造企业数字化转型。
|
||||
<p class="about-panel__center-text">
|
||||
{{ mission }}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="about-panel__section">
|
||||
<h3 class="about-panel__title">
|
||||
核心优势
|
||||
</h3>
|
||||
<ul class="about-panel__advantages">
|
||||
<li
|
||||
v-for="item in advantages"
|
||||
:key="item.title"
|
||||
class="about-panel__advantage"
|
||||
>
|
||||
<h4 class="about-panel__advantage-title">
|
||||
{{ item.title }}
|
||||
</h4>
|
||||
<p class="about-panel__advantage-desc text-secondary">
|
||||
{{ item.desc }}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<ol class="about-panel__advantages">
|
||||
<li
|
||||
v-for="item in advantages"
|
||||
:key="item.title"
|
||||
class="about-panel__advantage"
|
||||
>
|
||||
<span class="about-panel__advantage-title">{{ item.title }}:</span>
|
||||
<span class="about-panel__advantage-desc">{{ item.desc }}</span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<section class="about-panel__section">
|
||||
<h3 class="about-panel__title">
|
||||
联系信息
|
||||
</h3>
|
||||
<ul class="about-panel__contact">
|
||||
<li><span>客服热线:</span>400-XXXX-XXXX</li>
|
||||
<li><span>工作时间:</span>周一至周五 09:00 - 18:00</li>
|
||||
<li>
|
||||
<span>平台官网:</span>
|
||||
<a
|
||||
href="https://www.chongzizhizao.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="about-panel__link"
|
||||
>
|
||||
https://www.chongzizhizao.com
|
||||
</a>
|
||||
</li>
|
||||
<li><span>公司地址:</span>山东省日照市</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="about-panel__section">
|
||||
<h3 class="about-panel__title">
|
||||
版本信息
|
||||
</h3>
|
||||
<p class="about-panel__text">
|
||||
当前系统版本:V1.0.0<br>
|
||||
更新时间:2026 年 09 月
|
||||
</p>
|
||||
</section>
|
||||
<ul class="about-panel__contacts">
|
||||
<li v-for="item in contacts" :key="item.label" class="about-panel__contact">
|
||||
{{ item.label }}<a
|
||||
v-if="item.link"
|
||||
href="https://www.chongzizhizao.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="about-panel__link"
|
||||
>{{ item.value }}</a>
|
||||
<template v-else>{{ item.value }}</template>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.about-panel {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-lg;
|
||||
width: 100%;
|
||||
|
||||
&__section {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-sm;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
& + & {
|
||||
margin-top: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 11px;
|
||||
&__section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__center-text {
|
||||
margin-top: 12px;
|
||||
font-size: 13px;
|
||||
color: @text-color;
|
||||
line-height: 1.9;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__advantages {
|
||||
margin: 56px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
counter-reset: advantage;
|
||||
}
|
||||
|
||||
&__advantage {
|
||||
counter-increment: advantage;
|
||||
font-size: 13px;
|
||||
color: @text-color;
|
||||
line-height: 32px;
|
||||
|
||||
&::before {
|
||||
content: counter(advantage) '. ';
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
& + & {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__advantage-title {
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&__text {
|
||||
font-size: 11px;
|
||||
&__advantage-desc {
|
||||
color: @text-color;
|
||||
line-height: 1.9;
|
||||
}
|
||||
|
||||
&__advantages {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: @spacing-sm;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
&__contacts {
|
||||
margin: 46px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&__advantage {
|
||||
.flex(row, flex-start);
|
||||
gap: @spacing-sm;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&__advantage-title {
|
||||
flex-shrink: 0;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
&__advantage-desc {
|
||||
font-size: 11px;
|
||||
color: @text-color;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
&__contact {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-sm;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
color: @text-color;
|
||||
|
||||
span {
|
||||
color: @text-color;
|
||||
}
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
&__link {
|
||||
|
||||
@@ -1,299 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { AppButton, SmsCodeInput } from '@/components'
|
||||
|
||||
export type BindContactMode =
|
||||
| 'phone-bind'
|
||||
| 'phone-rebind'
|
||||
| 'email-bind'
|
||||
| 'email-rebind'
|
||||
| 'identity'
|
||||
|
||||
interface Props {
|
||||
mode: BindContactMode
|
||||
hintPhone?: string
|
||||
hintEmail?: string
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
hintPhone: '',
|
||||
hintEmail: '',
|
||||
})
|
||||
|
||||
const visible = defineModel<boolean>('visible', { default: false })
|
||||
|
||||
const emit = defineEmits<{ submit: [payload: { contact: string; code: string }] }>()
|
||||
|
||||
const contact = ref('')
|
||||
const code = ref('')
|
||||
const agree = ref(false)
|
||||
|
||||
const isEmailMode = computed(() => props.mode === 'email-bind' || props.mode === 'email-rebind')
|
||||
const isIdentity = computed(() => props.mode === 'identity')
|
||||
|
||||
const title = computed<string>(() => {
|
||||
const map: Record<BindContactMode, string> = {
|
||||
'phone-bind': '绑定手机号',
|
||||
'phone-rebind': '验证并换绑',
|
||||
'email-bind': '绑定邮箱',
|
||||
'email-rebind': '更换绑定邮箱',
|
||||
identity: '安全身份验证',
|
||||
}
|
||||
return map[props.mode]
|
||||
})
|
||||
|
||||
const fieldLabel = computed<string>(() => {
|
||||
const map: Record<BindContactMode, string> = {
|
||||
'phone-bind': '手机号',
|
||||
'phone-rebind': '新手机号',
|
||||
'email-bind': '邮箱',
|
||||
'email-rebind': '新邮箱',
|
||||
identity: '手机号',
|
||||
}
|
||||
return map[props.mode]
|
||||
})
|
||||
|
||||
const submitText = computed<string>(() => {
|
||||
const map: Record<BindContactMode, string> = {
|
||||
'phone-bind': '验证并绑定',
|
||||
'phone-rebind': '验证并换绑',
|
||||
'email-bind': '确认修改',
|
||||
'email-rebind': '确认修改',
|
||||
identity: '验证',
|
||||
}
|
||||
return map[props.mode]
|
||||
})
|
||||
|
||||
const contactPlaceholder = computed<string>(() => {
|
||||
if (isEmailMode.value) return props.hintEmail || '请输入邮箱'
|
||||
return props.mode === 'phone-rebind' ? '请输入新手机号' : '请输入手机号'
|
||||
})
|
||||
|
||||
const identityDesc = computed(() =>
|
||||
isIdentity.value
|
||||
? `安全身份验证:为确保账号安全,请完成身份验证后再进行账号操作,发送验证码至 ${props.hintPhone}`
|
||||
: '',
|
||||
)
|
||||
|
||||
watch(visible, (open) => {
|
||||
if (!open) return
|
||||
contact.value = isIdentity.value ? props.hintPhone : ''
|
||||
code.value = ''
|
||||
agree.value = false
|
||||
})
|
||||
|
||||
function onGetCode(): void {
|
||||
ElMessage.success('验证码已发送')
|
||||
}
|
||||
|
||||
function onSubmit(): void {
|
||||
if (!contact.value.trim()) {
|
||||
ElMessage.warning(isEmailMode.value ? '请输入邮箱' : '请输入手机号')
|
||||
return
|
||||
}
|
||||
if (!code.value) {
|
||||
ElMessage.warning('请输入验证码')
|
||||
return
|
||||
}
|
||||
if (!isIdentity.value && !agree.value) {
|
||||
ElMessage.warning('请先阅读并同意《用户协议》和《隐私政策》')
|
||||
return
|
||||
}
|
||||
emit('submit', { contact: contact.value.trim(), code: code.value })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div v-if="visible" class="bind-dialog" @click.self="visible = false">
|
||||
<div class="bind-dialog__panel">
|
||||
<h3 class="bind-dialog__title">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<p v-if="identityDesc" class="bind-dialog__desc text-secondary">
|
||||
{{ identityDesc }}
|
||||
</p>
|
||||
|
||||
<div class="bind-dialog__field">
|
||||
<label class="bind-dialog__label">{{ fieldLabel }}</label>
|
||||
<input
|
||||
v-model="contact"
|
||||
class="bind-dialog__input"
|
||||
type="text"
|
||||
:placeholder="contactPlaceholder"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="bind-dialog__field">
|
||||
<label class="bind-dialog__label">验证码</label>
|
||||
<SmsCodeInput v-model:code="code" @get-code="onGetCode" />
|
||||
</div>
|
||||
|
||||
<label v-if="!isIdentity" class="bind-dialog__agree">
|
||||
<input v-model="agree" type="checkbox">
|
||||
<span>我已阅读并同意<em>《用户协议》</em>和<em>《隐私政策》</em></span>
|
||||
</label>
|
||||
|
||||
<div class="bind-dialog__footer">
|
||||
<AppButton type="default" @click="visible = false">
|
||||
取消
|
||||
</AppButton>
|
||||
<AppButton type="primary" @click="onSubmit">
|
||||
{{ submitText }}
|
||||
</AppButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bind-dialog {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
.flex(row, center);
|
||||
background: transparent;
|
||||
overflow-y: auto;
|
||||
|
||||
&__panel {
|
||||
width: 700px;
|
||||
max-width: calc(100vw - 32px);
|
||||
max-height: calc(100vh - 48px);
|
||||
overflow-y: auto;
|
||||
padding: @spacing-base;
|
||||
border-radius: @radius-lg;
|
||||
background: @white;
|
||||
box-shadow: @shadow-lg;
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-base;
|
||||
.scrollbar();
|
||||
}
|
||||
|
||||
&__title {
|
||||
position: relative;
|
||||
padding-left: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
border-radius: 2px;
|
||||
background: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__title:has(+ .bind-dialog__desc) {
|
||||
padding-left: 0;
|
||||
font-size: 11px;
|
||||
color: @primary-strong;
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__desc {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
color: @text-color-secondary;
|
||||
font-size: 11px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
&__field {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-xs;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid @profile-input-border;
|
||||
border-radius: @profile-radius;
|
||||
background: @white;
|
||||
font-size: 11px;
|
||||
color: @text-color;
|
||||
outline: none;
|
||||
transition: border-color 0.2s;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:focus {
|
||||
border-color: @primary-strong;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: @heading-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__agree {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
font-size: 11px;
|
||||
color: @text-color-secondary;
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
accent-color: @primary-strong;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__footer {
|
||||
.flex(row, flex-start);
|
||||
gap: @spacing-sm;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-button {
|
||||
flex: 1;
|
||||
height: 36px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: @profile-radius;
|
||||
}
|
||||
|
||||
.app-button--primary {
|
||||
border-color: @primary-strong;
|
||||
background: @primary-strong;
|
||||
|
||||
&:hover {
|
||||
border-color: darken(@primary-strong, 6%);
|
||||
background: darken(@primary-strong, 6%);
|
||||
}
|
||||
}
|
||||
|
||||
.app-button--default {
|
||||
border: none;
|
||||
background: @profile-quiet-btn;
|
||||
color: @text-color;
|
||||
|
||||
&:hover {
|
||||
border: none;
|
||||
background: darken(@profile-quiet-btn, 4%);
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,256 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { AppButton, PasswordStrength, SmsCodeInput } from '@/components'
|
||||
|
||||
interface Props {
|
||||
phone: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const visible = defineModel<boolean>('visible', { default: false })
|
||||
|
||||
const emit = defineEmits<{
|
||||
submit: [payload: { code: string; password: string; confirm: string }]
|
||||
}>()
|
||||
|
||||
const code = ref('')
|
||||
const password = ref('')
|
||||
const confirm = ref('')
|
||||
const agree = ref(false)
|
||||
|
||||
watch(visible, (open) => {
|
||||
if (!open) return
|
||||
code.value = ''
|
||||
password.value = ''
|
||||
confirm.value = ''
|
||||
agree.value = false
|
||||
})
|
||||
|
||||
function onGetCode(): void {
|
||||
ElMessage.success('验证码已发送')
|
||||
}
|
||||
|
||||
function onSubmit(): void {
|
||||
if (!code.value) {
|
||||
ElMessage.warning('请输入验证码')
|
||||
return
|
||||
}
|
||||
if (!password.value) {
|
||||
ElMessage.warning('请输入新密码')
|
||||
return
|
||||
}
|
||||
if (!agree.value) {
|
||||
ElMessage.warning('请先阅读并同意《用户协议》和《隐私政策》')
|
||||
return
|
||||
}
|
||||
emit('submit', {
|
||||
code: code.value,
|
||||
password: password.value,
|
||||
confirm: confirm.value,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div v-if="visible" class="change-pwd-dialog" @click.self="visible = false">
|
||||
<div class="change-pwd-dialog__panel">
|
||||
<h3 class="change-pwd-dialog__title">
|
||||
修改密码
|
||||
</h3>
|
||||
|
||||
<div class="change-pwd-dialog__field">
|
||||
<label class="change-pwd-dialog__label">手机号</label>
|
||||
<input
|
||||
class="change-pwd-dialog__input"
|
||||
type="text"
|
||||
:value="props.phone"
|
||||
readonly
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="change-pwd-dialog__field">
|
||||
<label class="change-pwd-dialog__label">验证码</label>
|
||||
<SmsCodeInput v-model:code="code" @get-code="onGetCode" />
|
||||
</div>
|
||||
|
||||
<div class="change-pwd-dialog__field">
|
||||
<label class="change-pwd-dialog__label">设置密码</label>
|
||||
<input
|
||||
v-model="password"
|
||||
class="change-pwd-dialog__input"
|
||||
type="password"
|
||||
placeholder="请输入密码(6-20位)"
|
||||
maxlength="20"
|
||||
>
|
||||
<PasswordStrength :password="password" />
|
||||
</div>
|
||||
|
||||
<div class="change-pwd-dialog__field">
|
||||
<label class="change-pwd-dialog__label">确认密码</label>
|
||||
<input
|
||||
v-model="confirm"
|
||||
class="change-pwd-dialog__input"
|
||||
type="password"
|
||||
placeholder="请再次输入密码"
|
||||
maxlength="20"
|
||||
@keyup.enter="onSubmit"
|
||||
>
|
||||
</div>
|
||||
|
||||
<label class="change-pwd-dialog__agree">
|
||||
<input v-model="agree" type="checkbox">
|
||||
<span>我已阅读并同意<em>《用户协议》</em>和<em>《隐私政策》</em></span>
|
||||
</label>
|
||||
|
||||
<div class="change-pwd-dialog__footer">
|
||||
<AppButton type="default" @click="visible = false">
|
||||
取消
|
||||
</AppButton>
|
||||
<AppButton type="primary" @click="onSubmit">
|
||||
确认修改
|
||||
</AppButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.change-pwd-dialog {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 1000;
|
||||
.flex(row, center);
|
||||
background: transparent;
|
||||
overflow-y: auto;
|
||||
|
||||
&__panel {
|
||||
width: 700px;
|
||||
max-width: calc(100vw - 32px);
|
||||
max-height: calc(100vh - 48px);
|
||||
overflow-y: auto;
|
||||
padding: @spacing-base;
|
||||
border-radius: @radius-lg;
|
||||
background: @white;
|
||||
box-shadow: @shadow-lg;
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-base;
|
||||
.scrollbar();
|
||||
}
|
||||
|
||||
&__title {
|
||||
position: relative;
|
||||
padding-left: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
border-radius: 2px;
|
||||
background: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__field {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-xs;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid @profile-input-border;
|
||||
border-radius: @profile-radius;
|
||||
background: @white;
|
||||
font-size: 11px;
|
||||
color: @text-color;
|
||||
outline: none;
|
||||
transition: border-color 0.2s;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:focus {
|
||||
border-color: @primary-strong;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&:read-only {
|
||||
color: @text-color;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&__agree {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
font-size: 11px;
|
||||
color: @text-color-secondary;
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
accent-color: @primary-strong;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__footer {
|
||||
.flex(row, flex-start);
|
||||
gap: @spacing-sm;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-button {
|
||||
flex: 1;
|
||||
height: 36px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border-radius: @profile-radius;
|
||||
}
|
||||
|
||||
.app-button--primary {
|
||||
border-color: @primary-strong;
|
||||
background: @primary-strong;
|
||||
|
||||
&:hover {
|
||||
border-color: darken(@primary-strong, 6%);
|
||||
background: darken(@primary-strong, 6%);
|
||||
}
|
||||
}
|
||||
|
||||
.app-button--default {
|
||||
border: none;
|
||||
background: @profile-quiet-btn;
|
||||
color: @text-color;
|
||||
|
||||
&:hover {
|
||||
border: none;
|
||||
background: darken(@profile-quiet-btn, 4%);
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,43 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { CaseCard } from '@/components'
|
||||
import type { Case } from '@/types/business/cases'
|
||||
|
||||
interface Props {
|
||||
cases: Case[]
|
||||
}
|
||||
|
||||
defineProps<Props>()
|
||||
|
||||
const emit = defineEmits<{ view: [id: string] }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="favorites-grid">
|
||||
<template v-if="cases.length > 0">
|
||||
<CaseCard
|
||||
v-for="item in cases"
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
@view="emit('view', $event)"
|
||||
/>
|
||||
</template>
|
||||
<p v-else class="favorites-grid__empty text-secondary">
|
||||
暂无收藏案例,快去案例库挑选感兴趣的内容吧
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.favorites-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: @spacing-base;
|
||||
|
||||
&__empty {
|
||||
grid-column: 1 / -1;
|
||||
padding: @spacing-xxl 0;
|
||||
text-align: center;
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, watch } from 'vue'
|
||||
import { AppButton, FileList, UploadArea } from '@/components'
|
||||
import { reactive, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { FileInfo } from '@/types/api'
|
||||
import type { Feedback } from '@/types/business/profile'
|
||||
|
||||
@@ -12,7 +12,6 @@ const props = withDefaults(defineProps<Props>(), { resetSignal: 0 })
|
||||
|
||||
const emit = defineEmits<{
|
||||
submit: [feedback: Feedback]
|
||||
reset: []
|
||||
preview: [file: FileInfo]
|
||||
}>()
|
||||
|
||||
@@ -22,6 +21,7 @@ const form = reactive({
|
||||
})
|
||||
|
||||
const attachments = reactive<FileInfo[]>([])
|
||||
const fileInputRef = ref<HTMLInputElement | null>(null)
|
||||
|
||||
function clear(): void {
|
||||
form.title = ''
|
||||
@@ -34,13 +34,34 @@ watch(
|
||||
() => clear(),
|
||||
)
|
||||
|
||||
function onUpload(file: File): void {
|
||||
attachments.push({
|
||||
name: file.name,
|
||||
size: file.size,
|
||||
uploadTime: new Date().toISOString().slice(0, 10),
|
||||
url: '',
|
||||
})
|
||||
function openFilePicker(): void {
|
||||
fileInputRef.value?.click()
|
||||
}
|
||||
|
||||
function onFileChange(event: Event): void {
|
||||
const input = event.target as HTMLInputElement
|
||||
const files = input.files
|
||||
if (!files) return
|
||||
for (const file of Array.from(files)) {
|
||||
attachments.push({
|
||||
name: file.name,
|
||||
size: file.size,
|
||||
uploadTime: new Date().toISOString().slice(0, 10),
|
||||
url: '',
|
||||
})
|
||||
}
|
||||
input.value = ''
|
||||
}
|
||||
|
||||
function extOf(name: string): string {
|
||||
const index = name.lastIndexOf('.')
|
||||
return index >= 0 ? name.slice(index + 1, index + 4).toUpperCase() : 'FILE'
|
||||
}
|
||||
|
||||
function sizeText(size: number): string {
|
||||
if (size >= 1024 * 1024) return `${(size / 1024 / 1024).toFixed(1)}MB`
|
||||
if (size >= 1024) return `${(size / 1024).toFixed(0)}KB`
|
||||
return `${size}B`
|
||||
}
|
||||
|
||||
function onDeleteFile(file: FileInfo): void {
|
||||
@@ -48,17 +69,25 @@ function onDeleteFile(file: FileInfo): void {
|
||||
if (index >= 0) attachments.splice(index, 1)
|
||||
}
|
||||
|
||||
function onPreview(file: FileInfo): void {
|
||||
emit('preview', file)
|
||||
}
|
||||
|
||||
function onSubmit(): void {
|
||||
if (!form.title.trim()) {
|
||||
ElMessage.warning('请填写反馈标题')
|
||||
return
|
||||
}
|
||||
if (!form.description.trim()) {
|
||||
ElMessage.warning('请填写详细描述')
|
||||
return
|
||||
}
|
||||
emit('submit', {
|
||||
title: form.title,
|
||||
description: form.description,
|
||||
attachments: [...attachments],
|
||||
})
|
||||
}
|
||||
|
||||
function onReset(): void {
|
||||
emit('reset')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -69,7 +98,7 @@ function onReset(): void {
|
||||
v-model="form.title"
|
||||
class="feedback-form__input"
|
||||
type="text"
|
||||
placeholder="请简要描述您的反馈标题"
|
||||
placeholder="请输入反馈标题"
|
||||
maxlength="50"
|
||||
>
|
||||
</div>
|
||||
@@ -79,34 +108,57 @@ function onReset(): void {
|
||||
<textarea
|
||||
v-model="form.description"
|
||||
class="feedback-form__textarea"
|
||||
placeholder="请详细描述您遇到的问题或建议,便于我们更快为您处理"
|
||||
placeholder="请详细描述您的问题..."
|
||||
maxlength="500"
|
||||
rows="6"
|
||||
/>
|
||||
<span class="feedback-form__counter text-secondary">{{ form.description.length }}/500</span>
|
||||
<span class="feedback-form__counter">{{ form.description.length }}/500</span>
|
||||
</div>
|
||||
|
||||
<p class="feedback-form__tip">
|
||||
提交后我们的专业顾问将在一个工作日内与您联系,为您提供一对一服务
|
||||
</p>
|
||||
|
||||
<div class="feedback-form__field">
|
||||
<label class="feedback-form__label">附件</label>
|
||||
<UploadArea @upload="onUpload" />
|
||||
<FileList
|
||||
:files="attachments"
|
||||
@preview="emit('preview', $event)"
|
||||
@delete="onDeleteFile"
|
||||
/>
|
||||
<div class="feedback-form__attach-head">
|
||||
<h3 class="feedback-form__attach-title">
|
||||
附件上传
|
||||
</h3>
|
||||
<span class="feedback-form__attach-hint">支持图片/文档/压缩包,大小不超过1G</span>
|
||||
<button class="feedback-form__upload-btn" @click="openFilePicker">
|
||||
上传
|
||||
</button>
|
||||
<input
|
||||
ref="fileInputRef"
|
||||
class="feedback-form__file-input"
|
||||
type="file"
|
||||
multiple
|
||||
@change="onFileChange"
|
||||
>
|
||||
</div>
|
||||
|
||||
<ul class="feedback-form__files">
|
||||
<li v-for="file in attachments" :key="file.name" class="feedback-form__file">
|
||||
<span class="feedback-form__file-icon" :class="`is-${extOf(file.name).toLowerCase()}`">
|
||||
{{ extOf(file.name) }}
|
||||
</span>
|
||||
<div class="feedback-form__file-info">
|
||||
<p class="feedback-form__file-name">
|
||||
{{ file.name }}
|
||||
</p>
|
||||
<p class="feedback-form__file-meta">
|
||||
{{ sizeText(file.size) }} · 上传于 {{ file.uploadTime }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="feedback-form__file-actions">
|
||||
<button class="feedback-form__file-link" @click="onPreview(file)">
|
||||
预览
|
||||
</button>
|
||||
<button class="feedback-form__file-link is-danger" @click="onDeleteFile(file)">
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="feedback-form__footer">
|
||||
<AppButton type="primary" @click="onSubmit">
|
||||
<button class="feedback-form__submit" @click="onSubmit">
|
||||
提交反馈
|
||||
</AppButton>
|
||||
<AppButton type="default" @click="onReset">
|
||||
重置
|
||||
</AppButton>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -114,21 +166,20 @@ function onReset(): void {
|
||||
<style lang="less" scoped>
|
||||
.feedback-form {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-base;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
gap: 20px;
|
||||
width: 100%;
|
||||
|
||||
&__field {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-xs;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&__required {
|
||||
@@ -139,11 +190,11 @@ function onReset(): void {
|
||||
&__input,
|
||||
&__textarea {
|
||||
width: 100%;
|
||||
padding: 0 12px;
|
||||
padding: 0 14px;
|
||||
border: 1px solid @profile-input-border;
|
||||
border-radius: @profile-radius;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
color: @text-color;
|
||||
outline: none;
|
||||
transition: border-color 0.2s;
|
||||
@@ -154,71 +205,175 @@ function onReset(): void {
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: @heading-color;
|
||||
color: @text-color-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
&__input {
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
&__textarea {
|
||||
padding: 8px 12px;
|
||||
line-height: 1.6;
|
||||
height: 150px;
|
||||
padding: 12px 14px;
|
||||
line-height: 1.7;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
&__counter {
|
||||
align-self: flex-end;
|
||||
color: @text-color-disabled;
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
&__tip {
|
||||
padding: @spacing-sm @spacing-base;
|
||||
border-radius: @profile-radius;
|
||||
background: @primary-light;
|
||||
color: @primary-strong;
|
||||
&__attach-head {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 14px;
|
||||
width: 100%;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
&__attach-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
&__attach-hint {
|
||||
font-size: 12px;
|
||||
color: @text-color-disabled;
|
||||
}
|
||||
|
||||
&__upload-btn {
|
||||
margin-left: auto;
|
||||
height: 32px;
|
||||
padding: 0 18px;
|
||||
border: 1px solid @profile-input-border;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
color: @text-color;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: @primary-strong;
|
||||
color: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__file-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__files {
|
||||
.flex(column, flex-start);
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&__file {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 14px;
|
||||
width: 100%;
|
||||
padding: 13px 16px;
|
||||
border-radius: @radius-base;
|
||||
background: @service-input-bg;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&__file-icon {
|
||||
.flex(row, center);
|
||||
flex-shrink: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: @radius-base;
|
||||
font-size: 11px;
|
||||
line-height: 1.6;
|
||||
font-weight: 700;
|
||||
|
||||
&.is-pdf {
|
||||
background: @profile-icon-phone;
|
||||
color: @danger-color;
|
||||
}
|
||||
|
||||
&.is-doc,
|
||||
&.is-docx {
|
||||
background: @profile-page-active-bg;
|
||||
color: @primary-strong;
|
||||
}
|
||||
|
||||
&.is-xls,
|
||||
&.is-xlsx {
|
||||
background: @profile-tag-ok-bg;
|
||||
color: @success-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__file-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__file-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
.ellipsis();
|
||||
}
|
||||
|
||||
&__file-meta {
|
||||
margin-top: 3px;
|
||||
font-size: 12px;
|
||||
color: @text-color-disabled;
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
&__file-actions {
|
||||
.flex(row, flex-end, center);
|
||||
gap: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__file-link {
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: @primary-strong;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @primary-hover;
|
||||
}
|
||||
|
||||
&.is-danger {
|
||||
color: @danger-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__footer {
|
||||
.flex(row, flex-start);
|
||||
gap: @spacing-sm;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
:deep(.upload-area) {
|
||||
min-height: 56px;
|
||||
border: 1px solid @profile-input-border;
|
||||
background: @white;
|
||||
|
||||
&:hover,
|
||||
&.is-dragging {
|
||||
background: @bg-color-light;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.upload-area__hint) {
|
||||
color: @text-color-disabled;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.app-button {
|
||||
height: 32px;
|
||||
padding: 0 16px;
|
||||
border-radius: @profile-radius;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.app-button--primary {
|
||||
border-color: @primary-strong;
|
||||
&__submit {
|
||||
height: 40px;
|
||||
padding: 0 32px;
|
||||
border: none;
|
||||
border-radius: @radius-base;
|
||||
background: @primary-strong;
|
||||
color: @white;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: darken(@primary-strong, 6%);
|
||||
background: darken(@primary-strong, 6%);
|
||||
background: @primary-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,30 +10,27 @@ defineProps<Props>()
|
||||
|
||||
<template>
|
||||
<div class="help-faq">
|
||||
<details
|
||||
v-for="group in groups"
|
||||
<section
|
||||
v-for="(group, gi) in groups"
|
||||
:key="group.title"
|
||||
class="help-faq__group"
|
||||
open
|
||||
>
|
||||
<summary class="help-faq__summary">
|
||||
{{ group.title }}
|
||||
</summary>
|
||||
<ul class="help-faq__list">
|
||||
<li
|
||||
v-for="item in group.items"
|
||||
:key="item.q"
|
||||
class="help-faq__item"
|
||||
>
|
||||
<p class="help-faq__q">
|
||||
Q:{{ item.q }}
|
||||
</p>
|
||||
<p class="help-faq__a text-secondary">
|
||||
A:{{ item.a }}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<h3 class="help-faq__group-title">
|
||||
{{ gi + 1 }}、{{ group.title }}
|
||||
</h3>
|
||||
<div
|
||||
v-for="item in group.items"
|
||||
:key="item.q"
|
||||
class="help-faq__item"
|
||||
>
|
||||
<p class="help-faq__q">
|
||||
Q: {{ item.q }}
|
||||
</p>
|
||||
<p class="help-faq__a text-secondary">
|
||||
{{ item.a }}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<p v-if="groups.length === 0" class="help-faq__empty text-secondary">
|
||||
暂无常见问题
|
||||
@@ -44,68 +41,43 @@ defineProps<Props>()
|
||||
<style lang="less" scoped>
|
||||
.help-faq {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-base;
|
||||
width: 100%;
|
||||
|
||||
&__group {
|
||||
background: transparent;
|
||||
& + & {
|
||||
margin-top: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
&__summary {
|
||||
.flex(row, center, center);
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-size: 11px;
|
||||
&__group-title {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: transparent;
|
||||
color: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__list {
|
||||
.flex(column, flex-start);
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
padding: @spacing-sm 0 0;
|
||||
list-style: none;
|
||||
border-top: none;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__item {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-xs;
|
||||
padding-top: 0;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
&__q {
|
||||
font-size: 11px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&__a {
|
||||
font-size: 11px;
|
||||
color: @text-color;
|
||||
line-height: 1.7;
|
||||
margin: 8px 0 0 184px;
|
||||
font-size: 13px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
&__empty {
|
||||
padding: @spacing-xxl 0;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,77 +6,69 @@ const WORK_TIME = '工作日 8:00-12:00 14:00-18:00'
|
||||
<template>
|
||||
<div class="hotline-panel">
|
||||
<div class="hotline-panel__card">
|
||||
<span class="hotline-panel__icon" aria-hidden="true">📞</span>
|
||||
<h3 class="hotline-panel__title">
|
||||
专属客服热线
|
||||
</h3>
|
||||
<p class="hotline-panel__number">
|
||||
{{ HOTLINE }}
|
||||
</p>
|
||||
<p class="hotline-panel__time text-secondary">
|
||||
{{ WORK_TIME }}
|
||||
</p>
|
||||
<span class="hotline-panel__icon" aria-hidden="true" />
|
||||
<div class="hotline-panel__info">
|
||||
<h3 class="hotline-panel__title">
|
||||
专属客服热线
|
||||
</h3>
|
||||
<p class="hotline-panel__number">
|
||||
{{ HOTLINE }}
|
||||
</p>
|
||||
<p class="hotline-panel__time">
|
||||
{{ WORK_TIME }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.hotline-panel {
|
||||
.flex(row, flex-start);
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
// 设计稿 #01:浅蓝横幅卡,蓝圆 + 标题/电话/时间三行左对齐
|
||||
&__card {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-areas:
|
||||
'icon title'
|
||||
'icon number'
|
||||
'icon time';
|
||||
column-gap: @spacing-base;
|
||||
align-content: center;
|
||||
.flex(row, flex-start, center);
|
||||
gap: 32px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: @spacing-lg;
|
||||
padding: 30px 32px;
|
||||
border-radius: @radius-base;
|
||||
background: @profile-hotline-bg;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
.flex(row, center);
|
||||
grid-area: icon;
|
||||
flex-shrink: 0;
|
||||
width: 49px;
|
||||
height: 49px;
|
||||
margin: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: @radius-round;
|
||||
background: @primary-strong;
|
||||
font-size: @font-size-lg;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&__info {
|
||||
.flex(column, flex-start);
|
||||
}
|
||||
|
||||
&__title {
|
||||
grid-area: title;
|
||||
align-self: end;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
&__number {
|
||||
grid-area: number;
|
||||
font-size: 18px;
|
||||
margin-top: 6px;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: @primary-strong;
|
||||
line-height: 1.3;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
&__time {
|
||||
grid-area: time;
|
||||
align-self: start;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: @text-color-secondary;
|
||||
font-size: 11px;
|
||||
line-height: 17px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@ interface MenuItem {
|
||||
const menus: MenuItem[] = [
|
||||
{ to: '/profile/security', label: '账号安全' },
|
||||
{ to: '/profile/address', label: '地址管理' },
|
||||
{ to: '/profile/favorites', label: '收藏列表' },
|
||||
{ to: '/favorites', label: '收藏列表' },
|
||||
{ to: '/profile/qualifications', label: '资质列表' },
|
||||
{ to: '/profile/feedback', label: '意见反馈' },
|
||||
{ to: '/profile/help', label: '帮助中心' },
|
||||
@@ -33,17 +33,14 @@ const menus: MenuItem[] = [
|
||||
.profile-sider {
|
||||
.flex(column, flex-start);
|
||||
gap: 0;
|
||||
padding: 4px 0;
|
||||
border-radius: @radius-lg;
|
||||
background: @white;
|
||||
|
||||
&__item {
|
||||
.flex(row, flex-start, center);
|
||||
height: 36px;
|
||||
padding: 0 24px;
|
||||
padding: 0 16px;
|
||||
border-radius: @profile-radius;
|
||||
color: @text-color;
|
||||
font-size: @font-size-base;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
transition: all 0.2s;
|
||||
|
||||
@@ -54,7 +51,7 @@ const menus: MenuItem[] = [
|
||||
&.router-link-active {
|
||||
background: @profile-nav-active-bg;
|
||||
color: @primary-strong;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function save(): void {
|
||||
<style lang="less" scoped>
|
||||
.profile-user-card {
|
||||
.flex(column, center, center);
|
||||
height: 110px;
|
||||
height: 146px;
|
||||
border-radius: @radius-lg;
|
||||
background: linear-gradient(180deg, @profile-user-from 0%, @profile-user-to 100%);
|
||||
box-sizing: border-box;
|
||||
@@ -69,13 +69,13 @@ function save(): void {
|
||||
|
||||
&__name {
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
margin-top: 6px;
|
||||
height: 22px;
|
||||
margin-top: 8px;
|
||||
padding: 0 @spacing-xs;
|
||||
border: 1px solid transparent;
|
||||
border-radius: @profile-radius;
|
||||
background: transparent;
|
||||
font-size: @font-size-lg;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @white;
|
||||
text-align: center;
|
||||
@@ -92,14 +92,14 @@ function save(): void {
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
font-size: @font-size-lg;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 400;
|
||||
color: fade(@white, 75%);
|
||||
}
|
||||
}
|
||||
|
||||
&__phone {
|
||||
margin-top: 6px;
|
||||
margin-top: 4px;
|
||||
font-size: @font-size-sm;
|
||||
color: @white;
|
||||
text-align: center;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { StatusTag } from '@/components'
|
||||
import { EllipsisText } from '@/components'
|
||||
import type { Qualification, QualificationStatus } from '@/types/business/profile'
|
||||
|
||||
interface Props {
|
||||
@@ -14,144 +14,144 @@ const emit = defineEmits<{
|
||||
reupload: [qualification: Qualification]
|
||||
}>()
|
||||
|
||||
const STATUS_VARIANTS: Record<QualificationStatus, 'success' | 'warning' | 'danger'> = {
|
||||
已认证: 'success',
|
||||
审核中: 'warning',
|
||||
未通过: 'danger',
|
||||
const STATUS_CLASS: Record<QualificationStatus, string> = {
|
||||
已认证: 'is-certified',
|
||||
审核中: 'is-reviewing',
|
||||
未通过: 'is-rejected',
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<article class="qual-card">
|
||||
<div class="qual-card__head">
|
||||
<h3 class="qual-card__name">
|
||||
{{ qualification.certName }}
|
||||
</h3>
|
||||
<StatusTag
|
||||
:label="qualification.status"
|
||||
:variant="STATUS_VARIANTS[qualification.status]"
|
||||
<article class="qual-row">
|
||||
<div class="qual-row__col">
|
||||
<p class="qual-row__label">资质类型</p>
|
||||
<EllipsisText class="qual-row__value" :text="qualification.type" />
|
||||
</div>
|
||||
<div class="qual-row__col qual-row__col--name">
|
||||
<p class="qual-row__label">证书名称</p>
|
||||
<EllipsisText class="qual-row__value" :text="qualification.certName" />
|
||||
</div>
|
||||
<div class="qual-row__col">
|
||||
<p class="qual-row__label">证书编号</p>
|
||||
<EllipsisText class="qual-row__value" :text="qualification.certNo" />
|
||||
</div>
|
||||
<div class="qual-row__col">
|
||||
<p class="qual-row__label">发证单位</p>
|
||||
<EllipsisText class="qual-row__value" :text="qualification.issuer" />
|
||||
</div>
|
||||
<div class="qual-row__col qual-row__col--valid">
|
||||
<p class="qual-row__label">有效期</p>
|
||||
<EllipsisText
|
||||
class="qual-row__value"
|
||||
:text="qualification.validFrom + ' 至 ' + qualification.validTo"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ul class="qual-card__meta">
|
||||
<li><span>资质类型:</span>{{ qualification.type }}</li>
|
||||
<li><span>证书编号:</span>{{ qualification.certNo }}</li>
|
||||
<li><span>发证单位:</span>{{ qualification.issuer }}</li>
|
||||
<li><span>有效期:</span>{{ qualification.validFrom }} 至 {{ qualification.validTo }}</li>
|
||||
</ul>
|
||||
|
||||
<div class="qual-card__actions">
|
||||
<button class="qual-card__btn" @click="emit('edit', qualification)">
|
||||
编辑
|
||||
</button>
|
||||
<button class="qual-card__btn qual-card__btn--danger" @click="emit('delete', qualification)">
|
||||
<div class="qual-row__col qual-row__col--status">
|
||||
<p class="qual-row__label">状态</p>
|
||||
<p class="qual-row__value qual-row__status" :class="STATUS_CLASS[qualification.status]">
|
||||
{{ qualification.status }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="qual-row__actions">
|
||||
<button type="button" class="qual-row__btn" @click="emit('delete', qualification)">
|
||||
删除
|
||||
</button>
|
||||
<button
|
||||
v-if="qualification.status === '未通过'"
|
||||
class="qual-card__btn qual-card__btn--warning"
|
||||
type="button"
|
||||
class="qual-row__btn"
|
||||
@click="emit('reupload', qualification)"
|
||||
>
|
||||
重新上传
|
||||
</button>
|
||||
<button v-else type="button" class="qual-row__btn" @click="emit('edit', qualification)">
|
||||
编辑
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.qual-card {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-sm;
|
||||
padding: @spacing-base;
|
||||
.qual-row {
|
||||
position: relative;
|
||||
.flex(row, flex-start, center);
|
||||
min-height: 78px;
|
||||
padding: 14px 24px 14px 52px;
|
||||
border: 1px solid @profile-card-border;
|
||||
border-radius: @radius-base;
|
||||
border-radius: @radius-lg;
|
||||
background: @white;
|
||||
box-sizing: border-box;
|
||||
|
||||
&__head {
|
||||
.flex(row, space-between, flex-start);
|
||||
gap: @spacing-sm;
|
||||
}
|
||||
&__col {
|
||||
flex: 0 0 200px;
|
||||
min-width: 0;
|
||||
padding-right: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&__name {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
.multi-ellipsis(2);
|
||||
}
|
||||
|
||||
&__meta {
|
||||
.flex(column, flex-start);
|
||||
gap: @spacing-xs;
|
||||
list-style: none;
|
||||
font-size: 11px;
|
||||
color: @heading-color;
|
||||
|
||||
li {
|
||||
.ellipsis();
|
||||
font-weight: 600;
|
||||
&--name {
|
||||
flex: 0 0 270px;
|
||||
}
|
||||
|
||||
span {
|
||||
color: @text-color-secondary;
|
||||
font-weight: 400;
|
||||
&--valid {
|
||||
flex: 0 0 250px;
|
||||
}
|
||||
|
||||
&--status {
|
||||
flex: 0 0 100px;
|
||||
}
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-sm;
|
||||
color: @finance-axis-text;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
&__value {
|
||||
margin-top: 6px;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @profile-ink;
|
||||
line-height: 20px;
|
||||
.ellipsis();
|
||||
}
|
||||
|
||||
&__status {
|
||||
&.is-reviewing {
|
||||
color: @primary-strong;
|
||||
}
|
||||
|
||||
&.is-certified {
|
||||
color: @success-color;
|
||||
}
|
||||
|
||||
&.is-rejected {
|
||||
color: @danger-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__actions {
|
||||
.flex(row, center);
|
||||
gap: @spacing-sm;
|
||||
margin-top: auto;
|
||||
padding-top: @spacing-sm;
|
||||
border-top: 1px solid @profile-card-border;
|
||||
width: 100%;
|
||||
.flex(row, flex-start, center);
|
||||
flex-shrink: 0;
|
||||
gap: 12px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
&__btn {
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid @profile-line;
|
||||
border-radius: @profile-radius;
|
||||
height: 28px;
|
||||
padding: 0 14px;
|
||||
border: 1px solid @profile-card-border;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
color: @text-color;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: @finance-entry-text;
|
||||
font-size: @font-size-sm;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: @primary-strong;
|
||||
color: @primary-strong;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&--danger {
|
||||
color: @text-color;
|
||||
}
|
||||
|
||||
&--warning {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qual-card .status-tag {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
|
||||
&--success {
|
||||
background: transparent;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&--warning {
|
||||
background: transparent;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
&--danger {
|
||||
background: transparent;
|
||||
color: @danger-color;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import type { Profile } from '@/types/business/profile'
|
||||
|
||||
interface Props {
|
||||
@@ -8,57 +9,89 @@ interface Props {
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
changePassword: []
|
||||
bindPhone: []
|
||||
bindEmail: [mode: 'email-bind' | 'email-rebind']
|
||||
unbindEmail: []
|
||||
deleteAccount: []
|
||||
}>()
|
||||
const router = useRouter()
|
||||
|
||||
const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
|
||||
function goChangePassword(): void {
|
||||
void router.push('/profile/security/change-password')
|
||||
}
|
||||
|
||||
function goBindPhone(): void {
|
||||
void router.push('/profile/security/bind-phone')
|
||||
}
|
||||
|
||||
function goBindEmail(): void {
|
||||
void router.push('/profile/security/bind-email')
|
||||
}
|
||||
|
||||
function goDeleteAccount(): void {
|
||||
void router.push('/profile/security/delete-account')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="security-panel">
|
||||
<h2 class="security-panel__title">
|
||||
账号安全
|
||||
</h2>
|
||||
|
||||
<section
|
||||
class="security-panel__row"
|
||||
@click="emit('changePassword')"
|
||||
@click="goChangePassword"
|
||||
>
|
||||
<span class="security-panel__icon security-panel__icon--pwd" aria-hidden="true">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18">
|
||||
<path d="M5 7V5a3 3 0 0 1 6 0v2" fill="none" stroke="#fff" stroke-width="1.5" />
|
||||
<rect x="3.5" y="7" width="9" height="6.5" rx="1.5" fill="#fff" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="security-panel__main">
|
||||
<h3 class="security-panel__title">
|
||||
<h3 class="security-panel__name">
|
||||
修改密码
|
||||
</h3>
|
||||
<p class="security-panel__sub">
|
||||
上次修改:{{ profile?.passwordModifiedAt }}
|
||||
</p>
|
||||
</div>
|
||||
<span class="security-panel__state security-panel__state--ok">已设置</span>
|
||||
<span class="security-panel__state">已设置</span>
|
||||
<span class="security-panel__arrow" aria-hidden="true">›</span>
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="security-panel__row"
|
||||
@click="emit('bindPhone')"
|
||||
@click="goBindPhone"
|
||||
>
|
||||
<span class="security-panel__icon security-panel__icon--phone" aria-hidden="true">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18">
|
||||
<rect x="4.5" y="1.5" width="7" height="13" rx="1.5" fill="none" stroke="#fff" stroke-width="1.5" />
|
||||
<line x1="7" y1="12.2" x2="9" y2="12.2" stroke="#fff" stroke-width="1.2" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="security-panel__main">
|
||||
<h3 class="security-panel__title">
|
||||
<h3 class="security-panel__name">
|
||||
绑定手机
|
||||
</h3>
|
||||
<p class="security-panel__sub">
|
||||
{{ profile?.phone ?? '' }}
|
||||
</p>
|
||||
</div>
|
||||
<span class="security-panel__state security-panel__state--ok">已绑定</span>
|
||||
<span class="security-panel__state">已绑定</span>
|
||||
<span class="security-panel__arrow" aria-hidden="true">›</span>
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="security-panel__row"
|
||||
@click="emit('bindEmail', hasEmail ? 'email-rebind' : 'email-bind')"
|
||||
@click="goBindEmail"
|
||||
>
|
||||
<span class="security-panel__icon security-panel__icon--email" aria-hidden="true">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18">
|
||||
<rect x="1.5" y="3.5" width="13" height="9" rx="1.5" fill="none" stroke="#fff" stroke-width="1.5" />
|
||||
<path d="M2 4.5 8 9l6-4.5" fill="none" stroke="#fff" stroke-width="1.5" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="security-panel__main">
|
||||
<h3 class="security-panel__title">
|
||||
<h3 class="security-panel__name">
|
||||
绑定邮箱
|
||||
</h3>
|
||||
<p class="security-panel__sub">
|
||||
@@ -67,7 +100,7 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
</div>
|
||||
<span
|
||||
class="security-panel__state"
|
||||
:class="{ 'security-panel__state--ok': hasEmail }"
|
||||
:class="{ 'security-panel__state--idle': !hasEmail }"
|
||||
>{{ hasEmail ? '已绑定' : '未绑定' }}</span>
|
||||
<span class="security-panel__arrow" aria-hidden="true">›</span>
|
||||
</section>
|
||||
@@ -75,7 +108,7 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
<button
|
||||
type="button"
|
||||
class="security-panel__delete"
|
||||
@click="emit('deleteAccount')"
|
||||
@click="goDeleteAccount"
|
||||
>
|
||||
注销账号
|
||||
</button>
|
||||
@@ -85,13 +118,33 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
<style lang="less" scoped>
|
||||
.security-panel {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
|
||||
&__title {
|
||||
position: relative;
|
||||
padding-left: 14px;
|
||||
margin-bottom: 22px;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @profile-ink;
|
||||
line-height: 20px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
width: 4px;
|
||||
height: 14px;
|
||||
border-radius: 2px;
|
||||
background: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
&__row {
|
||||
.flex(row, space-between, center);
|
||||
height: 86px;
|
||||
padding: 0 24px;
|
||||
border: 1px solid @profile-card-border;
|
||||
.flex(row, flex-start, center);
|
||||
height: 85px;
|
||||
padding: 0 48px 0 52px;
|
||||
border: 1px solid @profile-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
box-sizing: border-box;
|
||||
@@ -99,7 +152,32 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
transition: border-color 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: @profile-line;
|
||||
border-color: @profile-nav-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&__row + &__row {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
.flex(row, center);
|
||||
flex-shrink: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 12px;
|
||||
border-radius: @radius-base;
|
||||
|
||||
&--pwd {
|
||||
background: @profile-icon-pwd;
|
||||
}
|
||||
|
||||
&--phone {
|
||||
background: @profile-icon-phone;
|
||||
}
|
||||
|
||||
&--email {
|
||||
background: @profile-icon-email;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,32 +185,42 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__title {
|
||||
&__name {
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @profile-ink;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
&__sub {
|
||||
margin-top: 6px;
|
||||
margin-top: 4px;
|
||||
font-size: @font-size-sm;
|
||||
color: @finance-axis-text; // #9CA3AF
|
||||
color: @finance-axis-text;
|
||||
line-height: 16px;
|
||||
.ellipsis();
|
||||
}
|
||||
|
||||
&__state {
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
height: 22px;
|
||||
padding: 0 8px;
|
||||
border-radius: @radius-round;
|
||||
background: @profile-tag-ok-bg;
|
||||
color: @success-color;
|
||||
font-size: @font-size-sm;
|
||||
font-weight: 500;
|
||||
color: @finance-muted-text;
|
||||
line-height: 22px;
|
||||
|
||||
&--ok {
|
||||
color: @success-color;
|
||||
&--idle {
|
||||
background: @profile-quiet-btn;
|
||||
color: @finance-axis-text;
|
||||
}
|
||||
}
|
||||
|
||||
&__arrow {
|
||||
flex-shrink: 0;
|
||||
margin-left: 20px;
|
||||
font-size: 21px;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
color: @finance-axis-text;
|
||||
}
|
||||
@@ -140,8 +228,9 @@ const hasEmail = computed(() => Boolean(props.profile?.email))
|
||||
&__delete {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
margin-top: 108px;
|
||||
border: 1px solid @profile-line;
|
||||
border-radius: @radius-base;
|
||||
border-radius: @profile-radius;
|
||||
background: @white;
|
||||
color: @finance-axis-text;
|
||||
font-size: @font-size-base;
|
||||
|
||||
Reference in New Issue
Block a user