fix: 顶栏颜色跟随小程序主题并保留跟随系统

This commit is contained in:
2026-08-06 19:54:05 +08:00
parent 9716148f15
commit f4f54a8720
84 changed files with 484 additions and 124 deletions
+1
View File
@@ -1,5 +1,6 @@
export default definePageConfig({
navigationStyle: 'custom',
enablePageMeta: true,
// 顶部为深色商品大图,状态栏文字设为白色,确保 iOS 时间/电量可见
navigationBarTextStyle: 'white'
})
+3
View File
@@ -7,6 +7,7 @@ import { ProductCategory } from '../../../types'
import { useSafeArea } from '../../../hooks/useSafeArea'
import { useStatusBar } from '../../../hooks/useStatusBar'
import { useThemeContext } from '../../../context/ThemeContext'
import ThemedPageMeta from '../../../components/ThemedPageMeta'
const clamp = (v: number, min: number, max: number) => Math.min(Math.max(v, min), max)
const lerp = (a: number, b: number, t: number) => a + (b - a) * t
@@ -107,6 +108,7 @@ export default function ShopDetailPage() {
if (!product) {
return (
<View className="shop-detail-page">
<ThemedPageMeta darkTop />
<Text style={{ color: '#fff', padding: '40rpx' }}></Text>
</View>
)
@@ -114,6 +116,7 @@ export default function ShopDetailPage() {
return (
<View className="shop-detail-page">
<ThemedPageMeta darkTop />
{/* Fixed Hero */}
<View className="shop-hero-fixed">
<View
+2 -1
View File
@@ -1,3 +1,4 @@
export default definePageConfig({
navigationStyle: 'custom'
navigationStyle: 'custom',
enablePageMeta: true,
})
+2
View File
@@ -3,6 +3,7 @@ import Taro from '@tarojs/taro'
import { useThemeContext } from '../../context/ThemeContext'
import { useSafeArea } from '../../hooks/useSafeArea'
import { useStatusBar } from '../../hooks/useStatusBar'
import ThemedPageMeta from '../../components/ThemedPageMeta'
import './index.scss'
import { PRODUCTS } from '../../utils/productConfig'
@@ -17,6 +18,7 @@ export default function ShopPage() {
return (
<View className={`shop-page theme-${resolvedTheme}`}>
<ThemedPageMeta />
<View className="shop-list">
<View className="shop-header" style={{ paddingTop: `${safe.headerPaddingTop}px` }}>
<Text className="shop-header-title"></Text>