优化支付功能

This commit is contained in:
hero920103 committed 2026-09-16 14:28:07 +08:00
1 parent ac14452cae
commit 605c2a569f
19 files changed
+1020 -479

No files matched your search

+32 -4
View File
@@ -6,9 +6,10 @@
</div>
<div class="locked-message">功能未开通</div>
<div class="locked-desc">
当前套餐未包含<template v-if="moduleName">「{{ moduleName }}」</template>功能模块,请联系管理员升级套餐后使用。
当前未开通<template v-if="moduleName">「{{ moduleName }}」</template>功能,请购买或联系管理员开通后使用。
</div>
<div class="locked-actions">
<a href="javascript:void(0)" class="buy-package-btn" @click.prevent="goBuyProduct">立即购买</a>
<a href="javascript:void(0)" class="back-home-btn" @click.prevent="backToHome">返回首页</a>
</div>
</div>
@@ -27,6 +28,15 @@ const moduleName = computed(() => route.meta?.title || "");
const backToHome = () => {
router.push("/home");
};
const goBuyProduct = () => {
const code = route.meta?.code || route.path.replace(/^\/+/, "").split("/")[0] || "";
if (code) {
router.push(`/product/${code}`);
} else {
router.push("/home");
}
};
</script>
<style scoped>
@@ -77,19 +87,37 @@ const backToHome = () => {
}
.locked-actions {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 4px;
}
.buy-package-btn,
.back-home-btn {
display: inline-block;
background: linear-gradient(90deg, #3973ff 0%, #6a82fb 100%);
color: #fff;
padding: 10px 36px;
border-radius: 24px;
font-size: 15px;
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s;
transition: opacity 0.2s, transform 0.2s;
}
.buy-package-btn {
background: linear-gradient(90deg, #f56c6c 0%, #f78979 100%);
color: #fff;
}
.buy-package-btn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.back-home-btn {
background: linear-gradient(90deg, #3973ff 0%, #6a82fb 100%);
color: #fff;
}
.back-home-btn:hover {