| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <template>
- <main class="redirect-page">
- <div class="decoration decoration-top" aria-hidden="true"></div>
- <div class="decoration decoration-bottom" aria-hidden="true"></div>
- <section class="redirect-card" aria-labelledby="redirect-title" aria-live="polite">
- <div class="icon-wrap" aria-hidden="true">
- <van-icon name="guide-o" />
- </div>
- <h1 id="redirect-title">正在前往合规方案页面</h1>
- <p class="description">页面即将自动跳转,请稍候</p>
- <div class="loading-row">
- <van-loading type="spinner" size="18px" color="#1677ff" />
- <span>正在为你打开新页面...</span>
- </div>
- <button type="button" class="redirect-button" @click="redirectToCompliancePlan">
- 立即前往
- <van-icon name="arrow" />
- </button>
- <p class="fallback-tip">若未自动跳转,请点击上方按钮</p>
- </section>
- <footer class="page-footer">
- <van-icon name="shield-o" aria-hidden="true" />
- <span>安全跳转 · 请放心访问</span>
- </footer>
- </main>
- </template>
- <script setup lang="ts">
- import { onBeforeUnmount, onMounted } from 'vue'
- const COMPLIANCE_PLAN_URL = 'https://preapi.yaoyi.net/h5/#/pages/artile/compliance-plan'
- const REDIRECT_DELAY = 1000
- let redirectTimer: number | undefined
- const redirectToCompliancePlan = (): void => {
- window.location.replace(COMPLIANCE_PLAN_URL)
- }
- onMounted(() => {
- redirectTimer = window.setTimeout(redirectToCompliancePlan, REDIRECT_DELAY)
- })
- onBeforeUnmount(() => {
- if (redirectTimer !== undefined) {
- window.clearTimeout(redirectTimer)
- }
- })
- </script>
- <style scoped lang="scss">
- .redirect-page {
- position: relative;
- display: flex;
- min-height: 100vh;
- min-height: 100dvh;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- padding: calc(28px + env(safe-area-inset-top, 0px)) 22px
- calc(68px + env(safe-area-inset-bottom, 0px));
- background: linear-gradient(160deg, #f7faff 0%, #edf5ff 54%, #f7fbff 100%);
- color: #1f2937;
- font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
- box-sizing: border-box;
- }
- .decoration {
- position: absolute;
- border-radius: 50%;
- pointer-events: none;
- }
- .decoration-top {
- top: -92px;
- right: -76px;
- width: 238px;
- height: 238px;
- background: radial-gradient(circle, rgba(39, 133, 255, 0.18) 0%, rgba(39, 133, 255, 0) 70%);
- }
- .decoration-bottom {
- bottom: -116px;
- left: -90px;
- width: 286px;
- height: 286px;
- background: radial-gradient(circle, rgba(80, 173, 255, 0.14) 0%, rgba(80, 173, 255, 0) 70%);
- }
- .redirect-card {
- position: relative;
- z-index: 1;
- width: 100%;
- max-width: 360px;
- padding: 38px 24px 26px;
- border: 1px solid rgba(255, 255, 255, 0.92);
- border-radius: 22px;
- background: rgba(255, 255, 255, 0.88);
- box-shadow: 0 18px 48px rgba(49, 98, 157, 0.12);
- text-align: center;
- box-sizing: border-box;
- backdrop-filter: blur(12px);
- h1,
- p {
- margin: 0;
- }
- h1 {
- margin-top: 22px;
- color: #172033;
- font-size: 21px;
- font-weight: 700;
- line-height: 1.4;
- }
- }
- .icon-wrap {
- position: relative;
- display: flex;
- width: 68px;
- height: 68px;
- align-items: center;
- justify-content: center;
- margin: 0 auto;
- border-radius: 22px;
- background: linear-gradient(145deg, #1677ff 0%, #39a5ff 100%);
- box-shadow: 0 12px 28px rgba(22, 119, 255, 0.26);
- color: #fff;
- font-size: 32px;
- &::after {
- position: absolute;
- inset: -7px;
- border: 1px solid rgba(22, 119, 255, 0.12);
- border-radius: 27px;
- content: '';
- }
- }
- .redirect-card .description {
- margin-top: 8px;
- color: #7a8495;
- font-size: 14px;
- line-height: 1.6;
- }
- .loading-row {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 9px;
- min-height: 46px;
- margin-top: 24px;
- border-radius: 12px;
- background: #f4f8fd;
- color: #526176;
- font-size: 13px;
- }
- .redirect-button {
- display: flex;
- width: 100%;
- height: 46px;
- align-items: center;
- justify-content: center;
- gap: 5px;
- margin-top: 18px;
- padding: 0;
- border: 0;
- border-radius: 23px;
- background: linear-gradient(90deg, #1677ff 0%, #2998ff 100%);
- box-shadow: 0 9px 20px rgba(22, 119, 255, 0.22);
- color: #fff;
- font-size: 15px;
- font-weight: 600;
- cursor: pointer;
- -webkit-tap-highlight-color: transparent;
- &:active {
- opacity: 0.86;
- transform: translateY(1px);
- }
- &:focus-visible {
- outline: 2px solid #1677ff;
- outline-offset: 3px;
- }
- }
- .redirect-card .fallback-tip {
- margin-top: 13px;
- color: #a0a8b4;
- font-size: 12px;
- line-height: 1.5;
- }
- .page-footer {
- position: absolute;
- right: 0;
- bottom: calc(24px + env(safe-area-inset-bottom, 0px));
- left: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 5px;
- color: #9ba8b8;
- font-size: 12px;
- }
- @media (max-width: 360px) {
- .redirect-page {
- padding-right: 16px;
- padding-left: 16px;
- }
- .redirect-card {
- padding: 32px 20px 23px;
- }
- }
- @media (prefers-reduced-motion: reduce) {
- .redirect-button:active {
- transform: none;
- }
- }
- </style>
|