v3.5.16小程序首页动画

This commit is contained in:
2026-08-30 15:07:58 +08:00
parent 9c8d5f2cad
commit b375fab44a
13 changed files with 546 additions and 759 deletions
+4 -4
View File
@@ -13,9 +13,9 @@ import BenefitSloganBar from '../../components/BenefitSloganBar';
import { BENEFIT_GIFT_TAG, BENEFIT_TAG } from '../../lib/benefit-copy';
import WechatShareReady from '../../components/WechatShareReady';
import UserTabBar, { shouldRenderPageTabBar, syncTabBarSelected } from '../../components/UserTabBar';
import JiuzuSplash from '../../components/JiuzuSplash';
import HomeSplash from '../../components/HomeSplash';
import { goLogin } from '../../lib/auth-nav';
import { hasJiuzuSplashPlayed } from '../../lib/jiuzu-splash';
import { hasHomeSplashPlayed } from '../../lib/home-splash';
import { getToken, isLoggedIn, request, toast } from '../../lib/api';
import {
getHomeCatalogCache,
@@ -83,7 +83,7 @@ function formatBenefitCorner(p: Product): string {
}
export default function HomePage() {
const [showSplash, setShowSplash] = useState(() => !hasJiuzuSplashPlayed());
const [showSplash, setShowSplash] = useState(() => !hasHomeSplashPlayed());
const [activeAroma, setActiveAroma] = useState<AromaKey>('QINGXIANG');
const [products, setProducts] = useState<Product[]>([]);
const [loading, setLoading] = useState(true);
@@ -428,7 +428,7 @@ export default function HomePage() {
) : null}
{shouldRenderPageTabBar() && !showSplash ? <UserTabBar selected={0} /> : null}
{showSplash ? <JiuzuSplash onDone={() => setShowSplash(false)} /> : null}
{showSplash ? <HomeSplash onDone={() => setShowSplash(false)} /> : null}
</PageShell>
);
}