fix: 顶栏颜色跟随小程序主题并保留跟随系统
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export default definePageConfig({
|
||||
navigationStyle: 'custom',
|
||||
enablePageMeta: true,
|
||||
// 顶部为深色商品大图,状态栏文字设为白色,确保 iOS 时间/电量可见
|
||||
navigationBarTextStyle: 'white'
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user