diff --git a/src/router/index.js b/src/router/index.js index bb352af..b10a025 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -149,12 +149,12 @@ const router = createRouter({ component: () => import('@/views/AgentServiceAgreement.vue'), meta: { title: '信息技术服务合同' }, }, - { - path: '/inquire/marriage', - name: 'inquire-marriage', - component: () => import('@/views/Maintenance.vue'), - meta: { title: '维护通知' }, - }, + // { + // path: '/inquire/marriage', + // name: 'inquire-marriage', + // component: () => import('@/views/Maintenance.vue'), + // meta: { title: '维护通知' }, + // }, { path: '/inquire/:feature', name: 'inquire', diff --git a/src/views/Inquire.vue b/src/views/Inquire.vue index 8f427dd..a5e1c2e 100644 --- a/src/views/Inquire.vue +++ b/src/views/Inquire.vue @@ -12,6 +12,11 @@ const featureData = ref({}); onMounted(async () => { isFinishPayment(); await getProduct(); + + // 检查是否为婚姻查询页面,如果是则显示升级通知 + if (feature.value === 'marriage') { + showMarriageUpgradeNotice(); + } }); function isFinishPayment() { @@ -22,6 +27,98 @@ function isFinishPayment() { } } +// 婚姻查询升级通知弹窗 +function showMarriageUpgradeNotice() { + // 创建自定义弹窗 + const modal = document.createElement('div'); + modal.style.position = 'fixed'; + modal.style.top = '0'; + modal.style.left = '0'; + modal.style.width = '100%'; + modal.style.height = '100%'; + modal.style.backgroundColor = 'rgba(0, 0, 0, 0.5)'; + modal.style.display = 'flex'; + modal.style.justifyContent = 'center'; + modal.style.alignItems = 'center'; + modal.style.zIndex = '9999'; + + modal.innerHTML = ` +
+

亲爱的用户,您好!

+ +

婚恋报告正在优化升级中,需要查询请前往天远查。

+ + +
+ + + +
+ + +
+ `; + + document.body.appendChild(modal); + + // 绑定按钮事件 + const jumpNowBtn = modal.querySelector('#jumpNowBtn'); + const remindLaterBtn = modal.querySelector('#remindLaterBtn'); + + jumpNowBtn.addEventListener('click', () => { + // 跳转到新版首页 + window.open('https://www.tianyuancha.cn/', '_blank'); + document.body.removeChild(modal); + }); + + remindLaterBtn.addEventListener('click', () => { + // 跳转到指定网站 + window.location.href = 'https://www.tianyuandb.com/'; + }); +} + async function getProduct() { const { data, error } = await useApiFetch(`/product/en/${feature.value}`) .get()