splash.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. <!-- Loading dots at bottom -->
  53. <view class="splash-loading">
  54. <view class="splash-dot splash-dot--1"></view>
  55. <view class="splash-dot splash-dot--2"></view>
  56. <view class="splash-dot splash-dot--3"></view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. name: 'SplashPage',
  64. data() {
  65. return {
  66. ready: false
  67. }
  68. },
  69. onLoad() {
  70. this.ready = true
  71. },
  72. onReady() {
  73. // 标记来自 splash 页,首页首次加载跳过 tab-transition
  74. uni.setStorageSync('_fromSplash', '1')
  75. // 至少展示 1 秒后跳转
  76. setTimeout(function() {
  77. uni.switchTab({
  78. url: '/pages/index/index'
  79. })
  80. }, 1200)
  81. }
  82. }
  83. </script>
  84. <style scoped>
  85. .splash-root {
  86. position: fixed;
  87. top: 0;
  88. left: 0;
  89. right: 0;
  90. bottom: 0;
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. background: linear-gradient(160deg, #FFF7ED 0%, #FFEDD5 50%, #FED7AA 100%);
  95. z-index: 9999;
  96. overflow: hidden;
  97. }
  98. /* ===== 背景装饰 ===== */
  99. .splash-bg-decor {
  100. position: absolute;
  101. top: 0;
  102. left: 0;
  103. right: 0;
  104. bottom: 0;
  105. pointer-events: none;
  106. }
  107. .bg-circle {
  108. position: absolute;
  109. border-radius: 50%;
  110. opacity: 0.15;
  111. }
  112. .bg-circle-1 {
  113. width: 400rpx;
  114. height: 400rpx;
  115. background: #FF8C42;
  116. top: -100rpx;
  117. right: -100rpx;
  118. animation: float 6s ease-in-out infinite;
  119. }
  120. .bg-circle-2 {
  121. width: 300rpx;
  122. height: 300rpx;
  123. background: #F59E0B;
  124. bottom: 100rpx;
  125. left: -80rpx;
  126. animation: float 8s ease-in-out infinite reverse;
  127. }
  128. .bg-circle-3 {
  129. width: 200rpx;
  130. height: 200rpx;
  131. background: #FF6B9D;
  132. top: 300rpx;
  133. right: 50rpx;
  134. animation: float 5s ease-in-out infinite 1s;
  135. }
  136. @keyframes float {
  137. 0%, 100% { transform: translateY(0) scale(1); }
  138. 50% { transform: translateY(-20rpx) scale(1.05); }
  139. }
  140. /* ===== 主内容 ===== */
  141. .splash-content {
  142. display: flex;
  143. flex-direction: column;
  144. align-items: center;
  145. opacity: 0;
  146. animation: splash-fade-in 0.8s ease forwards;
  147. }
  148. @keyframes splash-fade-in {
  149. from {
  150. opacity: 0;
  151. transform: translateY(30rpx);
  152. }
  153. to {
  154. opacity: 1;
  155. transform: translateY(0);
  156. }
  157. }
  158. /* ===== Logo ===== */
  159. .splash-logo-wrap {
  160. width: 160rpx;
  161. height: 160rpx;
  162. border-radius: 40rpx;
  163. background: rgba(255, 255, 255, 0.95);
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. margin-bottom: 24rpx;
  168. box-shadow: 0 8rpx 32rpx rgba(249, 115, 22, 0.25);
  169. }
  170. .splash-logo-img {
  171. width: 100rpx;
  172. height: 100rpx;
  173. }
  174. /* ===== Brand Name ===== */
  175. .splash-brand-name {
  176. font-size: 60rpx;
  177. font-weight: 700;
  178. color: #7C2D12;
  179. letter-spacing: 8rpx;
  180. margin-bottom: 4rpx;
  181. text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
  182. }
  183. .splash-brand-en {
  184. font-size: 22rpx;
  185. color: rgba(124, 45, 18, 0.6);
  186. letter-spacing: 4rpx;
  187. margin-bottom: 20rpx;
  188. }
  189. /* ===== Tagline ===== */
  190. .splash-tagline {
  191. font-size: 28rpx;
  192. color: rgba(124, 45, 18, 0.8);
  193. letter-spacing: 2rpx;
  194. font-weight: 500;
  195. }
  196. /* ===== Loading Dots ===== */
  197. .splash-loading {
  198. position: absolute;
  199. bottom: 120rpx;
  200. left: 0;
  201. right: 0;
  202. display: flex;
  203. justify-content: center;
  204. align-items: center;
  205. gap: 12rpx;
  206. }
  207. .splash-dot {
  208. width: 14rpx;
  209. height: 14rpx;
  210. border-radius: 50%;
  211. background: rgba(249, 115, 22, 0.6);
  212. animation: splash-dot-bounce 1.4s ease-in-out infinite both;
  213. }
  214. .splash-dot--1 { animation-delay: -0.32s; }
  215. .splash-dot--2 { animation-delay: -0.16s; }
  216. .splash-dot--3 { animation-delay: 0s; }
  217. @keyframes splash-dot-bounce {
  218. 0%, 80%, 100% {
  219. transform: scale(0.6);
  220. opacity: 0.4;
  221. }
  222. 40% {
  223. transform: scale(1);
  224. opacity: 1;
  225. }
  226. }
  227. /* ===== 五维图标行 ===== */
  228. .splash-dims-row {
  229. display: flex;
  230. flex-direction: row;
  231. align-items: center;
  232. justify-content: center;
  233. gap: 20rpx;
  234. margin: 24rpx 0 24rpx;
  235. }
  236. .splash-dim-item {
  237. display: flex;
  238. flex-direction: column;
  239. align-items: center;
  240. gap: 6rpx;
  241. opacity: 0;
  242. transform: translateY(20rpx);
  243. animation: splash-dim-enter 0.4s ease forwards;
  244. }
  245. .splash-dim-item:nth-child(1) { animation-delay: 0.4s; }
  246. .splash-dim-item:nth-child(2) { animation-delay: 0.55s; }
  247. .splash-dim-item:nth-child(3) { animation-delay: 0.7s; }
  248. .splash-dim-item:nth-child(4) { animation-delay: 0.85s; }
  249. .splash-dim-item:nth-child(5) { animation-delay: 1.0s; }
  250. .splash-dim-circle {
  251. width: 68rpx;
  252. height: 68rpx;
  253. border-radius: 50%;
  254. display: flex;
  255. align-items: center;
  256. justify-content: center;
  257. }
  258. .splash-dim-icon {
  259. font-size: 30rpx;
  260. line-height: 1;
  261. }
  262. .splash-dim-label {
  263. font-size: 20rpx;
  264. color: rgba(124, 45, 18, 0.7);
  265. line-height: 1;
  266. font-weight: 500;
  267. }
  268. @keyframes splash-dim-enter {
  269. from {
  270. opacity: 0;
  271. transform: translateY(20rpx);
  272. }
  273. to {
  274. opacity: 1;
  275. transform: translateY(0);
  276. }
  277. }
  278. </style>