250 lines
13 KiB
JavaScript
250 lines
13 KiB
JavaScript
import { ref, watch } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
|
|
export function useSEO() {
|
|
const route = useRoute()
|
|
|
|
// 默认SEO信息
|
|
const defaultSEO = {
|
|
title: '天远助手_背调报告代理加盟_个人风控系统搭建_合规数据服务平台',
|
|
description: '天远助手提供低成本的风控系统搭建服务。一键开通独立代理后台,支持自定义品牌与报告价格。平台基于公开合法数据,支持一键生成综合素质报告。诚邀行业合作伙伴,共享数字化风控红利,助力流量合规变现。',
|
|
keywords: '天远助手,职场背调,风险核验报告,家政背景核验,第三方背调,企业风控服务,数据报告分销',
|
|
url: 'https://www.zhinengcha.cn'
|
|
}
|
|
|
|
// 页面SEO配置
|
|
const pageSEO = ref({
|
|
title: '',
|
|
description: '',
|
|
keywords: '',
|
|
url: ''
|
|
})
|
|
|
|
// 更新页面SEO信息
|
|
const updateSEO = (seoConfig) => {
|
|
const config = { ...defaultSEO, ...seoConfig }
|
|
|
|
// 更新页面标题
|
|
document.title = config.title
|
|
|
|
// 更新meta描述
|
|
let metaDescription = document.querySelector('meta[name="description"]')
|
|
if (!metaDescription) {
|
|
metaDescription = document.createElement('meta')
|
|
metaDescription.name = 'description'
|
|
document.head.appendChild(metaDescription)
|
|
}
|
|
metaDescription.content = config.description
|
|
|
|
// 更新meta关键词
|
|
let metaKeywords = document.querySelector('meta[name="keywords"]')
|
|
if (!metaKeywords) {
|
|
metaKeywords = document.createElement('meta')
|
|
metaKeywords.name = 'keywords'
|
|
document.head.appendChild(metaKeywords)
|
|
}
|
|
metaKeywords.content = config.keywords
|
|
|
|
// 更新Open Graph标签
|
|
updateOpenGraph(config)
|
|
|
|
// 更新Twitter Cards
|
|
updateTwitterCards(config)
|
|
|
|
// 更新canonical URL
|
|
updateCanonicalURL(config.url)
|
|
|
|
// 更新结构化数据
|
|
updateStructuredData(config)
|
|
}
|
|
|
|
// 更新Open Graph标签
|
|
const updateOpenGraph = (config) => {
|
|
const ogTags = {
|
|
'og:title': config.title,
|
|
'og:description': config.description,
|
|
'og:url': config.url,
|
|
'og:type': 'website',
|
|
'og:site_name': '天远助手',
|
|
'og:locale': 'zh_CN'
|
|
}
|
|
|
|
Object.entries(ogTags).forEach(([property, content]) => {
|
|
let meta = document.querySelector(`meta[property="${property}"]`)
|
|
if (!meta) {
|
|
meta = document.createElement('meta')
|
|
meta.setAttribute('property', property)
|
|
document.head.appendChild(meta)
|
|
}
|
|
meta.content = content
|
|
})
|
|
}
|
|
|
|
// 更新Twitter Cards
|
|
const updateTwitterCards = (config) => {
|
|
const twitterTags = {
|
|
'twitter:card': 'summary',
|
|
'twitter:title': config.title,
|
|
'twitter:description': config.description,
|
|
'twitter:url': config.url
|
|
}
|
|
|
|
Object.entries(twitterTags).forEach(([name, content]) => {
|
|
let meta = document.querySelector(`meta[name="${name}"]`)
|
|
if (!meta) {
|
|
meta = document.createElement('meta')
|
|
meta.name = name
|
|
document.head.appendChild(meta)
|
|
}
|
|
meta.content = content
|
|
})
|
|
}
|
|
|
|
// 更新canonical URL
|
|
const updateCanonicalURL = (url) => {
|
|
let canonical = document.querySelector('link[rel="canonical"]')
|
|
if (!canonical) {
|
|
canonical = document.createElement('link')
|
|
canonical.rel = 'canonical'
|
|
document.head.appendChild(canonical)
|
|
}
|
|
canonical.href = url
|
|
}
|
|
|
|
// 更新结构化数据
|
|
const updateStructuredData = (config) => {
|
|
// 移除现有的结构化数据
|
|
const existingScripts = document.querySelectorAll('script[type="application/ld+json"]')
|
|
existingScripts.forEach(script => {
|
|
if (script.textContent.includes('"@type":"WebPage"')) {
|
|
script.remove()
|
|
}
|
|
})
|
|
|
|
// 添加新的结构化数据
|
|
const structuredData = {
|
|
"@context": "https://schema.org",
|
|
"@type": "WebPage",
|
|
"name": config.title,
|
|
"description": config.description,
|
|
"url": config.url,
|
|
"mainEntity": {
|
|
"@type": "Organization",
|
|
"name": "天远助手",
|
|
"url": "https://www.zhinengcha.cn/",
|
|
"description": "专业大数据风险报告查询与代理平台,支持个人和企业多场景风控应用"
|
|
}
|
|
}
|
|
|
|
const script = document.createElement('script')
|
|
script.type = 'application/ld+json'
|
|
script.textContent = JSON.stringify(structuredData)
|
|
document.head.appendChild(script)
|
|
}
|
|
|
|
// 根据路由自动更新SEO
|
|
const updateSEOByRoute = () => {
|
|
const routeConfigs = {
|
|
'/': {
|
|
title: '天远助手_背调报告代理加盟_个人风控系统搭建_合规数据服务平台',
|
|
description: '天远助手提供低成本的风控系统搭建服务。一键开通独立代理后台,支持自定义品牌与报告价格。平台基于公开合法数据,支持一键生成综合素质报告。诚邀行业合作伙伴,共享数字化风控红利,助力流量合规变现。',
|
|
keywords: '天远助手,职场背调,风险核验报告,家政背景核验,第三方背调,企业风控服务,数据报告分销'
|
|
},
|
|
'/historyQuery': {
|
|
title: '我的报告_历史查询记录_天远助手',
|
|
description: '天远助手用户个人中心,查看及下载历史查询报告。',
|
|
keywords: '我的报告,历史记录,天远助手'
|
|
},
|
|
// 个人查询
|
|
'/inquire/personalData': {
|
|
title: '个人综合风险报告_个人履约评分_多维数据检测_天远助手',
|
|
description: '天远助手提供个人全维信用画像扫描。一键检测司法涉诉记录、历史履约情况、号码状态异常检测及个人消费等级。数据同步权威行业系统,采用银行级加密技术,保障信息安全,助您全面了解自身信用状况。',
|
|
keywords: '个人风险评估,信用状况评估,综合履约能力,司法风险自查,风险标签检测'
|
|
},
|
|
// 企业查询
|
|
'/inquire/companyinfo': {
|
|
title: '企业信用风险评估_工商经营异常与司法诉讼核查_天远助手',
|
|
description: '天远助手提供全维度的企业商业画像。基于官方公示数据,核验目标企业的工商变更、经营异常名录、行政处罚、投融资背景及关联风险。深度评估商业履约能力,透视合作方真实状况,规避合同陷阱。',
|
|
keywords: '企业信用画像,公司经营风险,工商异常名录,企业履约评估,商业背景核验'
|
|
},
|
|
// 贷前风险
|
|
'/inquire/preloanbackgroundcheck': {
|
|
title: '综合履约评分检测_多平台履约记录分析_个人财务履约报告_天远助手',
|
|
description: '天远助手提供专业的个人履约健康度体检服务。基于多维大数据分析,检测您的综合评分波动、历史履约记录及潜在的风险标签。本服务旨在帮助用户优化个人数据画像,提升信用管理意识,不提供任何信贷金融服务。',
|
|
keywords: '综合评分检测,多重履约压力分析,履约能力评估,综合评分优化,个人数据画像'
|
|
},
|
|
// 婚恋风险
|
|
'/inquire/marriage': {
|
|
title: '婚恋对象背景了解_司法诉讼与不良记录筛查_婚前风险评估_天远助手',
|
|
description: '天远助手提供专业的婚恋风险评估工具。基于合法的公开司法数据,深度排查法律诉讼记录、失信被执行信息及潜在的履约风险。数据来源合规,仅供个人防范参考,拒绝隐私泄露,为幸福保驾护航。',
|
|
keywords: '婚恋背景核验,婚前风险了解,司法记录核验,个人履约风险,背景核实'
|
|
},
|
|
// 入职背调
|
|
'/inquire/backgroundcheck': {
|
|
title: '入职背景核验_候选人履历核验_职场信用与竞业排查_天远助手',
|
|
description: '天远助手职场风险报告助力企业构建防御体系。基于司法级大数据,一键筛查候选人司法涉诉记录、学历信息、商业利益冲突、历史违约记录及不良社会风险。官方数据,客观预警入职风险,辅助HR高效决策。',
|
|
keywords: '入职风险评估,候选人背景核验,简历真伪辨别,竞业限制核验,职场信用报告,员工风险预警'
|
|
},
|
|
// 家政风险
|
|
'/inquire/homeservice': {
|
|
title: '家政人员背景核实_保姆月嫂司法风险筛查_用工安全评估_天远助手',
|
|
description: '天远助手家政风险报告,为家庭用人安全把关。通过合法大数据,快速筛查家政人员的司法诉讼、失信被执行记录及社会不良风险标签。有效识别潜在隐患,预防雇佣纠纷,让您找保姆、请月嫂更放心。',
|
|
keywords: '保姆背景核验,月嫂风险筛查,家政人员核验,育儿嫂背景核实,雇佣风险防范'
|
|
},
|
|
|
|
'/agent': {
|
|
title: '天远助手代理 - 免费开通代理权限 | 大数据风险报告代理',
|
|
description: '天远助手代理平台,免费开通代理权限,享受大数据风险报告查询服务代理收益。专业的大数据风险报告、婚姻查询、个人信用评估等服务的代理合作。',
|
|
keywords: '天远助手代理, 免费代理, 大数据风险报告代理, 代理权限, 代理收益'
|
|
},
|
|
'/help': {
|
|
title: '天远助手帮助中心_代理操作指南_推广收益计算常见问题',
|
|
description: '天远助手帮助中心提供全方位的代理操作指引。包含如何成为代理、推广报告生成教程、收益与成本计算规则及推广效率提升方案。',
|
|
keywords: '天远助手教程,代理新手指南,推广收益计算,报告推广'
|
|
},
|
|
'/help/guide': {
|
|
title: '使用指南 - 天远助手操作教程 | 功能说明',
|
|
description: '天远助手详细使用指南,包含各功能模块的操作教程、功能说明、注意事项等,让用户快速上手使用。',
|
|
keywords: '使用指南, 操作教程, 功能说明, 快速上手, 天远助手教程'
|
|
},
|
|
'/example': {
|
|
title: '示例报告 - 天远助手报告展示 | 大数据风险报告样例',
|
|
description: '天远助手示例报告展示,包含大数据风险报告、婚姻状况查询、个人信用评估等服务的报告样例,让用户了解报告内容和格式。',
|
|
keywords: '示例报告, 报告展示, 报告样例, 大数据风险报告, 婚姻查询报告'
|
|
},
|
|
'/service': {
|
|
title: '客服中心 - 天远助手在线客服 | 技术支持',
|
|
description: '天远助手客服中心,提供在线客服支持、技术咨询、问题反馈等服务,确保用户获得及时有效的帮助。',
|
|
keywords: '客服中心, 在线客服, 技术支持, 问题反馈, 天远助手客服'
|
|
},
|
|
'/agent/promote': {
|
|
title: '生成推广码_自定义价格_0成本代理查价系统_天远助手',
|
|
description: '天远助手推广中心支持代理自主设置报告价格。在此选择报告类型,自定义客户查询价,0成本生成专属推广链接或二维码。差价即为利润,实现个人风险报告的私域流量变现。',
|
|
keywords: '推广码生成,自定义查价系统,代理收益工具,代理推广链接,流量变现平台,天远助手推广'
|
|
},
|
|
'/agent/invitation': {
|
|
title: '邀请合作伙伴_发展代理享收益_推广返利计划_天远助手',
|
|
description: '天远助手推出合伙人邀请奖励机制。邀请好友注册成为合作伙伴,每单不仅可获得推广收益,还可叠加合作伙伴活跃奖励及定价差额收益。打造专属推广团队,实现收益持续增长。',
|
|
keywords: '渠道合作伙伴,商业收益管理,流量合规变现,业务推广系统,代理后台'
|
|
},
|
|
}
|
|
|
|
const currentPath = route?.path || '/'
|
|
const config = routeConfigs[currentPath] || defaultSEO
|
|
|
|
updateSEO({
|
|
...config,
|
|
url: `https://www.zhinengcha.cn${currentPath}`
|
|
})
|
|
}
|
|
|
|
// 监听路由变化
|
|
watch(() => route?.path, updateSEOByRoute, { immediate: true })
|
|
|
|
return {
|
|
updateSEO,
|
|
updateSEOByRoute,
|
|
pageSEO
|
|
}
|
|
}
|