隐私协议单独加个页面
This commit is contained in:
Vendored
-3
@@ -31,13 +31,10 @@ declare module 'vue' {
|
|||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
||||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||||
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
|
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
FullscreenLoading: typeof import('./src/components/FullscreenLoading.vue')['default']
|
FullscreenLoading: typeof import('./src/components/FullscreenLoading.vue')['default']
|
||||||
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
|
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
|
||||||
|
|||||||
@@ -222,7 +222,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span class="job-resume-custom-dialog__match-score">{{ cachedOptimizedScore.toFixed(1) }}</span>
|
<span class="job-resume-custom-dialog__match-score">{{ cachedOptimizedScore.toFixed(1) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="job-resume-custom-dialog__match-label job-resume-custom-dialog__match-label--high">{{ cachedOptimizedScore >= 9 ? '非常匹配' : cachedOptimizedScore >= 6 ? '高匹配度' : '低匹配度' }}</span>
|
<span class="job-resume-custom-dialog__match-label job-resume-custom-dialog__match-label--high">{{ cachedOptimizedScore >= 9 ? '非常匹配' : cachedOptimizedScore >= 6 ? '高匹配度' : '低竞争力' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 改写说明(卡片外面平铺) -->
|
<!-- 改写说明(卡片外面平铺) -->
|
||||||
@@ -482,7 +482,7 @@ const missingSkills = computed(() => props.jobInfo.missingSkills || [])
|
|||||||
const matchLevelText = computed(() => {
|
const matchLevelText = computed(() => {
|
||||||
const score = props.jobInfo.matchScore
|
const score = props.jobInfo.matchScore
|
||||||
if (score >= 6) return '高匹配度'
|
if (score >= 6) return '高匹配度'
|
||||||
return '低匹配度'
|
return '低竞争力'
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 是否为低匹配度(低于6分) */
|
/** 是否为低匹配度(低于6分) */
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ const staticRoutes: RouteRecordRaw[] = [
|
|||||||
name: 'MentorDetail',
|
name: 'MentorDetail',
|
||||||
component: () => import('@/views/MentorDetail.vue'),
|
component: () => import('@/views/MentorDetail.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/privacy',
|
||||||
|
name: 'PrivacyPolicy',
|
||||||
|
component: () => import('@/views/PrivacyPolicy.vue'),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 隐私协议页面 — 独立页面,用于外部访问 -->
|
||||||
|
<div class="privacy-policy-page">
|
||||||
|
<div class="privacy-policy-page__content">
|
||||||
|
<!-- 加载中状态 -->
|
||||||
|
<div v-if="loading" class="privacy-policy-page__loading">加载中...</div>
|
||||||
|
<!-- 协议内容渲染 -->
|
||||||
|
<div v-else class="privacy-policy-page__body" v-html="contentHtml"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { fetchAgreement } from '@/api/common'
|
||||||
|
// @ts-ignore
|
||||||
|
import markdownit from 'markdown-it'
|
||||||
|
|
||||||
|
/** markdown-it 实例 */
|
||||||
|
const md = markdownit({ html: false, breaks: true, linkify: true })
|
||||||
|
|
||||||
|
/** 渲染后的 HTML 内容 */
|
||||||
|
const contentHtml = ref('')
|
||||||
|
/** 加载状态 */
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
|
/** 隐私协议 code */
|
||||||
|
const PRIVACY_CODE = 'hf8375i8'
|
||||||
|
|
||||||
|
/** 页面加载时获取协议内容 */
|
||||||
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
|
const res = await fetchAgreement(PRIVACY_CODE)
|
||||||
|
if (res.data?.content) {
|
||||||
|
contentHtml.value = md.render(res.data.content)
|
||||||
|
} else {
|
||||||
|
contentHtml.value = '<p>暂无协议内容</p>'
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
contentHtml.value = '<p>加载失败,请稍后重试</p>'
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@use '../assets/styles/variables' as *;
|
||||||
|
|
||||||
|
/* 隐私协议页面容器 */
|
||||||
|
.privacy-policy-page {
|
||||||
|
font-size: 0.14rem;
|
||||||
|
min-height: var(--app-height, 100vh);
|
||||||
|
background: $bg-white;
|
||||||
|
padding: 1rem 0;
|
||||||
|
|
||||||
|
/* 内容区域 — 居中,12rem宽 */
|
||||||
|
&__content {
|
||||||
|
width: 12rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 加载中提示 */
|
||||||
|
&__loading {
|
||||||
|
text-align: center;
|
||||||
|
color: $text-light;
|
||||||
|
padding: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 协议正文样式 */
|
||||||
|
&__body {
|
||||||
|
color: $text-dark;
|
||||||
|
line-height: 1.8;
|
||||||
|
|
||||||
|
:deep(h1) {
|
||||||
|
font-size: 0.24rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(h2) {
|
||||||
|
font-size: 0.2rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 0.3rem;
|
||||||
|
margin-bottom: 0.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(h3) {
|
||||||
|
font-size: 0.17rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 0.2rem;
|
||||||
|
margin-bottom: 0.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(p) {
|
||||||
|
margin-bottom: 0.12rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(ul), :deep(ol) {
|
||||||
|
padding-left: 0.2rem;
|
||||||
|
margin-bottom: 0.12rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(li) {
|
||||||
|
margin-bottom: 0.06rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(a) {
|
||||||
|
color: $accent;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user