Преглед изворни кода

chore: auto bump version and changelog [skip ci]

iwt пре 1 месец
родитељ
комит
8679b87b24

+ 7 - 0
cfc-frontend/pages.json

@@ -1,5 +1,12 @@
 {
   "pages": [
+    {
+      "path": "pages/splash/index",
+      "style": {
+        "navigationBarTitleText": "",
+        "navigationStyle": "custom"
+      }
+    },
     {
       "path": "pages/index-home/index",
       "style": {

+ 4 - 104
cfc-frontend/pages/index-home/index.vue

@@ -1,48 +1,5 @@
 <template>
 <view>
-  <!-- 冷启动 splash overlay — 覆盖首页直到数据加载完毕(tab 切回时不显示) -->
-  <view class="splash-overlay" :class="{'fade-out': splashOverlayFading}" v-if="splashOverlay || splashOverlayFading">
-    <view class="splash-overlay-bg">
-      <view class="bg-circle bg-circle-1"></view>
-      <view class="bg-circle bg-circle-2"></view>
-      <view class="bg-circle bg-circle-3"></view>
-    </view>
-    <view class="splash-overlay-body">
-      <view class="splash-logo-wrap">
-        <image class="splash-logo-img" src="/static/logo.png" mode="aspectFit" />
-      </view>
-      <text class="splash-brand-name">浠艾福</text>
-      <text class="splash-brand-en">Care Family</text>
-      <view class="splash-dims-row">
-        <view class="splash-dim-item">
-          <view class="splash-dim-circle" style="background:rgba(255,140,66,0.3);"><text class="splash-dim-icon">🌏</text></view>
-          <text class="splash-dim-label">身</text>
-        </view>
-        <view class="splash-dim-item">
-          <view class="splash-dim-circle" style="background:rgba(255,107,157,0.3);"><text class="splash-dim-icon">🔥</text></view>
-          <text class="splash-dim-label">心</text>
-        </view>
-        <view class="splash-dim-item">
-          <view class="splash-dim-circle" style="background:rgba(99,102,241,0.3);"><text class="splash-dim-icon">⚡</text></view>
-          <text class="splash-dim-label">智</text>
-        </view>
-        <view class="splash-dim-item">
-          <view class="splash-dim-circle" style="background:rgba(16,185,129,0.3);"><text class="splash-dim-icon">🌿</text></view>
-          <text class="splash-dim-label">行</text>
-        </view>
-        <view class="splash-dim-item">
-          <view class="splash-dim-circle" style="background:rgba(245,158,11,0.3);"><text class="splash-dim-icon">💧</text></view>
-          <text class="splash-dim-label">富</text>
-        </view>
-      </view>
-      <text class="splash-tagline">给全家的一站式幸福提案</text>
-      <view class="splash-overlay-loading">
-        <view class="splash-overlay-dot"></view>
-        <view class="splash-overlay-dot"></view>
-        <view class="splash-overlay-dot"></view>
-      </view>
-    </view>
-  </view>
 
   <!-- Tabbar 切换过渡页 -->
   <tab-transition v-if="showTabTransition" dimCode="action" ref="tabTransition" @close="showTabTransition = false" />
@@ -407,18 +364,11 @@ export default {
     if (_token) {
       _currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || ''
     }
-    // 冷启动标记(由 App.vue onLaunch 设置,仅在冷启动时存在)
-    var _isFirstLaunch = (uni.getStorageSync('_showSplashOverlay') === '1')
     return {
       currentRole: _currentRole,
-      // TabTransition 始终默认 true,确保首次渲染即出现;冷启动时被 splash overlay 覆盖不可见
+      // TabTransition 始终默认 true,确保首次渲染即出现
       showTabTransition: true,
 
-      // splash loading overlay(冷启动时展示,数据加载完关闭)
-      splashOverlay: _isFirstLaunch,
-      splashOverlayFading: false,
-      _splashReady: false,
-
       typeList: [
         { label: '全部', value: '' },
         { label: '活动', value: 'activity' },
@@ -542,59 +492,14 @@ export default {
     this._doInit(options)
   },
   onShow() {
-    // splash overlay 已在 data() 中根据 storage 标记初始化,此处只需配置关闭条件
-    if (this.splashOverlay) {
-      uni.removeStorageSync('_showSplashOverlay')
-      this._splashLoadCount = 0
-      this._splashMinPassed = false
-
-      var self = this
-      // 最低展示 800ms
-      setTimeout(function() {
-        self._splashMinPassed = true
-        self._tryHideSplash()
-      }, 800)
-      // 最多展示 5s
-      setTimeout(function() {
-        if (self.splashOverlay) self._hideSplashOverlay()
-      }, 5000)
-    } else {
-      // tab 切回:TabTransition 已在 data() 中为 true,确保首次渲染即出现
-      // 但组件缓存后再次切回时可能已被 _watchPageReady 置为 false,需要重置
-      this.showTabTransition = true
-      this._watchPageReady()
-    }
+    // tab 切回:重置 TabTransition 确保过渡动画正常显示
+    this.showTabTransition = true
+    this._watchPageReady()
 
     // 始终执行初始化,确保登录态变更后及时切换视图
     this._doInit()
   },
   methods: {
-    _checkSplashReady() {
-      this._splashLoadCount++
-      this._tryHideSplash()
-    },
-    _tryHideSplash() {
-      if (this.splashOverlayFading) return
-      if (!this._splashMinPassed) return
-      if (this.isLoggedIn()) {
-        // 登录用户:等待子组件的 ready 信号
-        if (this._splashReady) this._hideSplashOverlay()
-      } else {
-        // 游客:等待 3 个 API 全部返回
-        if (this._splashLoadCount >= 3) this._hideSplashOverlay()
-      }
-    },
-    _hideSplashOverlay() {
-      if (this.splashOverlayFading) return
-      this.splashOverlayFading = true
-      // splash 关闭时同时隐藏 TabTransition(防止 splash 结束后闪现过渡页)
-      this.showTabTransition = false
-      var self = this
-      setTimeout(function() {
-        self.splashOverlay = false
-        self.splashOverlayFading = false
-      }, 400)
-    },
 
     // ===== 登录态数据加载 =====
     loadLoggedInData: function() {
@@ -650,8 +555,6 @@ export default {
       getFamilyEnergySandbox().then(function(res) {
         if (res && res.data) {
           self.sandboxData = res.data
-          self._splashReady = true
-          self._tryHideSplash()
         }
       }).catch(function() {})
     },
@@ -976,10 +879,7 @@ export default {
           var rawData = res.data && (Array.isArray(res.data) ? res.data : (res.data.data || res.data.records || []))
           self.products = Array.isArray(rawData) ? rawData : []
         }
-        self._checkSplashReady()
       }).catch(function() {
-        self.loading = false
-        self._checkSplashReady()
       })
     },
     loadDimensionActivities: function() {

+ 254 - 0
cfc-frontend/pages/splash/index.vue

@@ -0,0 +1,254 @@
+<template>
+  <view class="splash-overlay">
+    <view class="splash-overlay-bg">
+      <view class="bg-circle bg-circle-1"></view>
+      <view class="bg-circle bg-circle-2"></view>
+      <view class="bg-circle bg-circle-3"></view>
+    </view>
+    <view class="splash-overlay-body">
+      <view class="splash-logo-wrap">
+        <image class="splash-logo-img" src="/static/logo.png" mode="aspectFit" />
+      </view>
+      <text class="splash-brand-name">浠艾福</text>
+      <text class="splash-brand-en">Care Family</text>
+      <view class="splash-dims-row">
+        <view class="splash-dim-item">
+          <view class="splash-dim-circle" style="background:rgba(255,140,66,0.3);"><text class="splash-dim-icon">🌏</text></view>
+          <text class="splash-dim-label">身</text>
+        </view>
+        <view class="splash-dim-item">
+          <view class="splash-dim-circle" style="background:rgba(255,107,157,0.3);"><text class="splash-dim-icon">🔥</text></view>
+          <text class="splash-dim-label">心</text>
+        </view>
+        <view class="splash-dim-item">
+          <view class="splash-dim-circle" style="background:rgba(99,102,241,0.3);"><text class="splash-dim-icon">⚡</text></view>
+          <text class="splash-dim-label">智</text>
+        </view>
+        <view class="splash-dim-item">
+          <view class="splash-dim-circle" style="background:rgba(16,185,129,0.3);"><text class="splash-dim-icon">🌿</text></view>
+          <text class="splash-dim-label">行</text>
+        </view>
+        <view class="splash-dim-item">
+          <view class="splash-dim-circle" style="background:rgba(245,158,11,0.3);"><text class="splash-dim-icon">💧</text></view>
+          <text class="splash-dim-label">富</text>
+        </view>
+      </view>
+      <text class="splash-tagline">给全家的一站式幸福提案</text>
+      <view class="splash-overlay-loading">
+        <view class="splash-overlay-dot"></view>
+        <view class="splash-overlay-dot"></view>
+        <view class="splash-overlay-dot"></view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  onShow() {
+    // 显示 2 秒后自动跳转到首页
+    setTimeout(() => {
+      uni.reLaunch({ url: '/pages/index-home/index' })
+    }, 2000)
+  }
+}
+</script>
+
+<style scoped>
+.splash-overlay {
+  position: fixed;
+  top: 0; left: 0; right: 0; bottom: 0;
+  z-index: 9999;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: linear-gradient(160deg, #FFF7ED 0%, #FFEDD5 50%, #FED7AA 100%);
+  overflow: hidden;
+}
+
+.splash-overlay-bg {
+  position: absolute;
+  top: 0; left: 0; right: 0; bottom: 0;
+  pointer-events: none;
+}
+
+.bg-circle {
+  position: absolute;
+  border-radius: 50%;
+  opacity: 0.12;
+}
+
+.bg-circle-1 {
+  width: 400rpx;
+  height: 400rpx;
+  background: #FF8C42;
+  top: -100rpx;
+  right: -80rpx;
+  animation: splash-float-1 4s ease-in-out infinite;
+}
+
+.bg-circle-2 {
+  width: 280rpx;
+  height: 280rpx;
+  background: #FF6B9D;
+  bottom: 80rpx;
+  left: -60rpx;
+  animation: splash-float-2 5s ease-in-out infinite;
+}
+
+.bg-circle-3 {
+  width: 180rpx;
+  height: 180rpx;
+  background: #6366F1;
+  top: 50%;
+  right: -40rpx;
+  animation: splash-float-3 6s ease-in-out infinite;
+}
+
+@keyframes splash-float-1 {
+  0%, 100% { transform: translateY(0) scale(1); }
+  50% { transform: translateY(-30rpx) scale(1.05); }
+}
+
+@keyframes splash-float-2 {
+  0%, 100% { transform: translateY(0) scale(1); }
+  50% { transform: translateY(20rpx) scale(1.08); }
+}
+
+@keyframes splash-float-3 {
+  0%, 100% { transform: translateY(0) rotate(0deg); }
+  50% { transform: translateY(-20rpx) rotate(10deg); }
+}
+
+.splash-overlay-body {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  animation: splash-body-in 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
+}
+
+@keyframes splash-body-in {
+  from { opacity: 0; transform: translateY(40rpx) scale(0.96); }
+  to   { opacity: 1; transform: translateY(0) scale(1); }
+}
+
+.splash-logo-wrap {
+  width: 160rpx;
+  height: 160rpx;
+  border-radius: 40rpx;
+  background: rgba(255,255,255,0.95);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 16rpx;
+  box-shadow: 0 8rpx 32rpx rgba(249,115,22,0.25);
+  animation: splash-logo-pulse 2.5s ease-in-out infinite;
+}
+
+@keyframes splash-logo-pulse {
+  0%, 100% { box-shadow: 0 8rpx 32rpx rgba(249,115,22,0.25); }
+  50% { box-shadow: 0 8rpx 48rpx rgba(249,115,22,0.45); }
+}
+
+.splash-logo-img {
+  width: 100rpx;
+  height: 100rpx;
+}
+
+.splash-brand-name {
+  font-size: 64rpx;
+  font-weight: 800;
+  color: #7C2D12;
+  letter-spacing: 10rpx;
+  margin-bottom: 2rpx;
+}
+
+.splash-brand-en {
+  font-size: 20rpx;
+  color: rgba(124,45,18,0.5);
+  letter-spacing: 6rpx;
+  margin-bottom: 30rpx;
+}
+
+.splash-dims-row {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  gap: 28rpx;
+}
+
+.splash-dim-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  gap: 8rpx;
+}
+
+.splash-dim-circle {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.splash-dim-icon {
+  font-size: 36rpx;
+  line-height: 1;
+}
+
+.splash-dim-label {
+  font-size: 22rpx;
+  font-weight: 500;
+  color: rgba(124,45,18,0.75);
+  line-height: 1;
+}
+
+.splash-dim-item:nth-child(1) { animation: splash-dim-in 0.5s ease 0.1s both; }
+.splash-dim-item:nth-child(2) { animation: splash-dim-in 0.5s ease 0.2s both; }
+.splash-dim-item:nth-child(3) { animation: splash-dim-in 0.5s ease 0.3s both; }
+.splash-dim-item:nth-child(4) { animation: splash-dim-in 0.5s ease 0.4s both; }
+.splash-dim-item:nth-child(5) { animation: splash-dim-in 0.5s ease 0.5s both; }
+
+@keyframes splash-dim-in {
+  from { opacity: 0; transform: translateY(16rpx) scale(0.8); }
+  to   { opacity: 1; transform: translateY(0) scale(1); }
+}
+
+.splash-tagline {
+  font-size: 26rpx;
+  color: rgba(124,45,18,0.7);
+  letter-spacing: 4rpx;
+  margin-top: 24rpx;
+}
+
+.splash-overlay-loading {
+  position: absolute;
+  bottom: 120rpx;
+  left: 0;
+  right: 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  gap: 12rpx;
+}
+
+.splash-overlay-dot {
+  width: 14rpx;
+  height: 14rpx;
+  border-radius: 50%;
+  background: rgba(249,115,22,0.6);
+  animation: splash-dot-bounce 1.4s ease-in-out infinite both;
+}
+
+.splash-overlay-dot:nth-child(1) { animation-delay: -0.32s; }
+.splash-overlay-dot:nth-child(2) { animation-delay: -0.16s; }
+.splash-overlay-dot:nth-child(3) { animation-delay: 0s; }
+
+@keyframes splash-dot-bounce {
+  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
+  40%           { transform: scale(1);   opacity: 1; }
+}
+</style>

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-06b5a6740975eb9205bee78b3c11ee5d788419b8
+ab7e997d8a7d0f3c0ffbe25cd8199c0d5eaf2dea

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.876",
+  "version": "1.0.877",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.876",
+      "version": "1.0.877",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.877",
+  "version": "1.0.878",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 6 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,12 @@
 
 ---
 
+## v1.0.878 (2026-08-08)
+
+### Bug 修复
+- growth tab 空态不刷新 — hasFamily 加入 children/records 判断
+
+
 ## v1.0.877 (2026-08-08)
 
 ### Bug 修复

+ 7 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.877
+> 当前版本: v1.0.878
 
 ## 历史版本
 
@@ -8,6 +8,12 @@
 
 ---
 
+## v1.0.878 (2026-08-08)
+
+### Bug 修复
+- growth tab 空态不刷新 — hasFamily 加入 children/records 判断
+
+
 ## v1.0.877 (2026-08-08)
 
 ### Bug 修复