splash.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <view class="splash-root">
  3. <!-- 背景装饰 -->
  4. <view class="splash-bg-decor">
  5. <view class="bg-circle bg-circle-1"></view>
  6. <view class="bg-circle bg-circle-2"></view>
  7. <view class="bg-circle bg-circle-3"></view>
  8. </view>
  9. <view class="splash-content">
  10. <!-- Logo 图标 -->
  11. <view class="splash-logo-wrap">
  12. <image class="splash-logo-img" src="/static/logo.png" mode="aspectFit" />
  13. </view>
  14. <!-- Brand Name -->
  15. <text class="splash-brand-name">浠艾福</text>
  16. <text class="splash-brand-en">Care Family</text>
  17. <!-- 五维图标行 -->
  18. <view class="splash-dims-row">
  19. <view class="splash-dim-item">
  20. <view class="splash-dim-circle" style="background:rgba(255,140,66,0.3);">
  21. <text class="splash-dim-icon">🌏</text>
  22. </view>
  23. <text class="splash-dim-label">身</text>
  24. </view>
  25. <view class="splash-dim-item">
  26. <view class="splash-dim-circle" style="background:rgba(255,107,157,0.3);">
  27. <text class="splash-dim-icon">🔥</text>
  28. </view>
  29. <text class="splash-dim-label">心</text>
  30. </view>
  31. <view class="splash-dim-item">
  32. <view class="splash-dim-circle" style="background:rgba(99,102,241,0.3);">
  33. <text class="splash-dim-icon">⚡</text>
  34. </view>
  35. <text class="splash-dim-label">智</text>
  36. </view>
  37. <view class="splash-dim-item">
  38. <view class="splash-dim-circle" style="background:rgba(16,185,129,0.3);">
  39. <text class="splash-dim-icon">🌿</text>
  40. </view>
  41. <text class="splash-dim-label">行</text>
  42. </view>
  43. <view class="splash-dim-item">
  44. <view class="splash-dim-circle" style="background:rgba(245,158,11,0.3);">
  45. <text class="splash-dim-icon">💧</text>
  46. </view>
  47. <text class="splash-dim-label">富</text>
  48. </view>
  49. </view>
  50. <!-- Tagline -->
  51. <text class="splash-tagline">给全家的一站式幸福提案</text>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. name: 'SplashPage',
  58. onReady() {
  59. // 标记需要在首页显示 splash overlay(仅在首次进入时)
  60. uni.setStorageSync('_showSplashOverlay', '1')
  61. // 立即跳转首页,首页会展示 splash overlay 并加载数据
  62. uni.switchTab({ url: '/pages/index/index' })
  63. }
  64. }
  65. </script>
  66. <style scoped>
  67. .splash-root {
  68. position: fixed;
  69. top: 0;
  70. left: 0;
  71. right: 0;
  72. bottom: 0;
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. background: linear-gradient(160deg, #FFF7ED 0%, #FFEDD5 50%, #FED7AA 100%);
  77. z-index: 9999;
  78. overflow: hidden;
  79. }
  80. /* ===== 背景装饰 ===== */
  81. .splash-bg-decor {
  82. position: absolute;
  83. top: 0;
  84. left: 0;
  85. right: 0;
  86. bottom: 0;
  87. pointer-events: none;
  88. }
  89. .bg-circle {
  90. position: absolute;
  91. border-radius: 50%;
  92. opacity: 0.15;
  93. }
  94. .bg-circle-1 {
  95. width: 400rpx;
  96. height: 400rpx;
  97. background: #FF8C42;
  98. top: -100rpx;
  99. right: -100rpx;
  100. animation: float 6s ease-in-out infinite;
  101. }
  102. .bg-circle-2 {
  103. width: 300rpx;
  104. height: 300rpx;
  105. background: #F59E0B;
  106. bottom: 100rpx;
  107. left: -80rpx;
  108. animation: float 8s ease-in-out infinite reverse;
  109. }
  110. .bg-circle-3 {
  111. width: 200rpx;
  112. height: 200rpx;
  113. background: #FF6B9D;
  114. top: 300rpx;
  115. right: 50rpx;
  116. animation: float 5s ease-in-out infinite 1s;
  117. }
  118. @keyframes float {
  119. 0%, 100% { transform: translateY(0) scale(1); }
  120. 50% { transform: translateY(-20rpx) scale(1.05); }
  121. }
  122. /* ===== 主内容 ===== */
  123. .splash-content {
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. opacity: 0;
  128. animation: splash-fade-in 0.8s ease forwards;
  129. }
  130. @keyframes splash-fade-in {
  131. from {
  132. opacity: 0;
  133. transform: translateY(30rpx);
  134. }
  135. to {
  136. opacity: 1;
  137. transform: translateY(0);
  138. }
  139. }
  140. /* ===== Logo ===== */
  141. .splash-logo-wrap {
  142. width: 160rpx;
  143. height: 160rpx;
  144. border-radius: 40rpx;
  145. background: rgba(255, 255, 255, 0.95);
  146. display: flex;
  147. align-items: center;
  148. justify-content: center;
  149. margin-bottom: 24rpx;
  150. box-shadow: 0 8rpx 32rpx rgba(249, 115, 22, 0.25);
  151. }
  152. .splash-logo-img {
  153. width: 100rpx;
  154. height: 100rpx;
  155. }
  156. /* ===== Brand Name ===== */
  157. .splash-brand-name {
  158. font-size: 60rpx;
  159. font-weight: 700;
  160. color: #7C2D12;
  161. letter-spacing: 8rpx;
  162. margin-bottom: 4rpx;
  163. text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  164. }
  165. .splash-brand-en {
  166. font-size: 22rpx;
  167. color: rgba(124, 45, 18, 0.6);
  168. letter-spacing: 4rpx;
  169. margin-bottom: 20rpx;
  170. }
  171. /* ===== Tagline ===== */
  172. .splash-tagline {
  173. font-size: 28rpx;
  174. color: rgba(124, 45, 18, 0.8);
  175. letter-spacing: 2rpx;
  176. font-weight: 500;
  177. }
  178. /* ===== 五维图标行 ===== */
  179. .splash-dims-row {
  180. display: flex;
  181. flex-direction: row;
  182. align-items: center;
  183. justify-content: center;
  184. gap: 20rpx;
  185. margin: 24rpx 0 24rpx;
  186. }
  187. .splash-dim-item {
  188. display: flex;
  189. flex-direction: column;
  190. align-items: center;
  191. gap: 6rpx;
  192. opacity: 0;
  193. transform: translateY(20rpx);
  194. animation: splash-dim-enter 0.4s ease forwards;
  195. }
  196. .splash-dim-item:nth-child(1) { animation-delay: 0.4s; }
  197. .splash-dim-item:nth-child(2) { animation-delay: 0.55s; }
  198. .splash-dim-item:nth-child(3) { animation-delay: 0.7s; }
  199. .splash-dim-item:nth-child(4) { animation-delay: 0.85s; }
  200. .splash-dim-item:nth-child(5) { animation-delay: 1.0s; }
  201. .splash-dim-circle {
  202. width: 68rpx;
  203. height: 68rpx;
  204. border-radius: 50%;
  205. display: flex;
  206. align-items: center;
  207. justify-content: center;
  208. }
  209. .splash-dim-icon {
  210. font-size: 30rpx;
  211. line-height: 1;
  212. }
  213. .splash-dim-label {
  214. font-size: 20rpx;
  215. color: rgba(124, 45, 18, 0.7);
  216. line-height: 1;
  217. font-weight: 500;
  218. }
  219. @keyframes splash-dim-enter {
  220. from {
  221. opacity: 0;
  222. transform: translateY(20rpx);
  223. }
  224. to {
  225. opacity: 1;
  226. transform: translateY(0);
  227. }
  228. }
  229. </style>