splash.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="splash-root">
  3. <view class="splash-content">
  4. <!-- Brand Logo Mark -->
  5. <view class="splash-logo-mark">
  6. <text class="splash-logo-char">浠</text>
  7. </view>
  8. <!-- Brand Name -->
  9. <text class="splash-brand-name">浠艾福</text>
  10. <!-- Tagline -->
  11. <text class="splash-tagline">给全家的一站式幸福提案</text>
  12. <!-- Loading dots at bottom -->
  13. <view class="splash-loading">
  14. <view class="splash-dot splash-dot--1"></view>
  15. <view class="splash-dot splash-dot--2"></view>
  16. <view class="splash-dot splash-dot--3"></view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'SplashPage',
  24. data() {
  25. return {
  26. ready: false
  27. }
  28. },
  29. onLoad() {
  30. // 标记 splash 已展示
  31. this.ready = true
  32. },
  33. onReady() {
  34. // 延迟 2500ms 后跳转到首页
  35. setTimeout(function() {
  36. uni.setStorageSync('_splashReady', true)
  37. uni.reLaunch({
  38. url: '/pages/index/index'
  39. })
  40. }, 2500)
  41. }
  42. }
  43. </script>
  44. <style scoped>
  45. .splash-root {
  46. position: fixed;
  47. top: 0;
  48. left: 0;
  49. right: 0;
  50. bottom: 0;
  51. display: flex;
  52. align-items: center;
  53. justify-content: center;
  54. background: linear-gradient(160deg, #FFF7ED 0%, #F97316 100%);
  55. z-index: 9999;
  56. }
  57. .splash-content {
  58. display: flex;
  59. flex-direction: column;
  60. align-items: center;
  61. opacity: 0;
  62. animation: splash-fade-in 0.8s ease forwards;
  63. }
  64. @keyframes splash-fade-in {
  65. from {
  66. opacity: 0;
  67. transform: translateY(20rpx);
  68. }
  69. to {
  70. opacity: 1;
  71. transform: translateY(0);
  72. }
  73. }
  74. /* ===== Logo Mark ===== */
  75. .splash-logo-mark {
  76. width: 144rpx;
  77. height: 144rpx;
  78. border-radius: 36rpx;
  79. background: rgba(255, 255, 255, 0.3);
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. margin-bottom: 24rpx;
  84. backdrop-filter: blur(4px);
  85. }
  86. .splash-logo-char {
  87. font-size: 72rpx;
  88. font-weight: 700;
  89. color: #FFFFFF;
  90. line-height: 1;
  91. }
  92. /* ===== Brand Name ===== */
  93. .splash-brand-name {
  94. font-size: 56rpx;
  95. font-weight: 700;
  96. color: #FFFFFF;
  97. letter-spacing: 8rpx;
  98. margin-bottom: 12rpx;
  99. text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  100. }
  101. /* ===== Tagline ===== */
  102. .splash-tagline {
  103. font-size: 28rpx;
  104. color: rgba(255, 255, 255, 0.85);
  105. letter-spacing: 4rpx;
  106. font-weight: 400;
  107. }
  108. /* ===== Loading Dots ===== */
  109. .splash-loading {
  110. position: absolute;
  111. bottom: 120rpx;
  112. left: 0;
  113. right: 0;
  114. display: flex;
  115. justify-content: center;
  116. align-items: center;
  117. gap: 12rpx;
  118. }
  119. .splash-dot {
  120. width: 14rpx;
  121. height: 14rpx;
  122. border-radius: 50%;
  123. background: rgba(255, 255, 255, 0.6);
  124. animation: splash-dot-bounce 1.4s ease-in-out infinite both;
  125. }
  126. .splash-dot--1 {
  127. animation-delay: -0.32s;
  128. }
  129. .splash-dot--2 {
  130. animation-delay: -0.16s;
  131. }
  132. .splash-dot--3 {
  133. animation-delay: 0s;
  134. }
  135. @keyframes splash-dot-bounce {
  136. 0%, 80%, 100% {
  137. transform: scale(0.6);
  138. opacity: 0.4;
  139. }
  140. 40% {
  141. transform: scale(1);
  142. opacity: 1;
  143. }
  144. }
  145. </style>