This commit is contained in:
Mrx
2026-02-13 18:32:41 +08:00
parent 684601ffe8
commit de69a9d58c
2 changed files with 103 additions and 6 deletions

View File

@@ -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',

View File

@@ -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 = `
<div style="
background: white;
border-radius: 12px;
padding: 24px;
margin: 20px;
max-width: 400px;
width: 90%;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
position: relative;
overflow-y: auto;
max-height: 90vh;
">
<h3 style="
color: #333;
text-align: center;
margin-top: 0;
margin-bottom: 16px;
font-size: 18px;
">亲爱的用户,您好!</h3>
<p style="
color: #666;
line-height: 1.6;
margin: 8px 0;
text-align: center;
font-size: 14px;
">婚恋报告正在优化升级中,需要查询请前往天远查。</p>
<div style="display: flex; gap: 12px; margin-bottom: 16px;">
<button id="jumpNowBtn" style="
flex: 1;
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
color: white;
border: none;
padding: 12px 0;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
font-weight: bold;
">是</button>
<button id="remindLaterBtn" style="
flex: 1;
background: #f8f9fa;
color: #666;
border: 1px solid #ddd;
padding: 12px 0;
border-radius: 25px;
cursor: pointer;
font-size: 14px;
">否</button>
</div>
</div>
`;
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()