119dc08ecS猫头猫import StatusBar from '@/components/base/statusBar'; 24245d81aS猫头猫import globalStyle from '@/constants/globalStyle'; 3c446f2b8S猫头猫import useOrientation from '@/hooks/useOrientation'; 4fbdbd2d3S猫头猫import React, {useEffect} from 'react'; 54060c00aS猫头猫import {StyleSheet, View} from 'react-native'; 61c06c799S猫头猫import {SafeAreaView} from 'react-native-safe-area-context'; 7bf6e62f2S猫头猫import Background from './components/background'; 8bf6e62f2S猫头猫import Bottom from './components/bottom'; 9bf6e62f2S猫头猫import Content from './components/content'; 10c446f2b8S猫头猫import Lyric from './components/content/lyric'; 11bf6e62f2S猫头猫import NavBar from './components/navBar'; 12fbdbd2d3S猫头猫import Config from '@/core/config'; 13fbdbd2d3S猫头猫import { 14fbdbd2d3S猫头猫 activateKeepAwake, 15fbdbd2d3S猫头猫 deactivateKeepAwake, 16fbdbd2d3S猫头猫} from '@sayem314/react-native-keep-awake'; 17bf6e62f2S猫头猫 18bf6e62f2S猫头猫export default function MusicDetail() { 19c446f2b8S猫头猫 const orientation = useOrientation(); 20fbdbd2d3S猫头猫 21fbdbd2d3S猫头猫 useEffect(() => { 22fbdbd2d3S猫头猫 const needAwake = Config.get('setting.basic.musicDetailAwake'); 23fbdbd2d3S猫头猫 if (needAwake) { 24fbdbd2d3S猫头猫 activateKeepAwake(); 25fbdbd2d3S猫头猫 } 26fbdbd2d3S猫头猫 return () => { 27fbdbd2d3S猫头猫 if (needAwake) { 28fbdbd2d3S猫头猫 deactivateKeepAwake(); 29fbdbd2d3S猫头猫 } 30fbdbd2d3S猫头猫 }; 31fbdbd2d3S猫头猫 }, []); 32fbdbd2d3S猫头猫 33bf6e62f2S猫头猫 return ( 34e990b02cS猫头猫 <> 354060c00aS猫头猫 <Background /> 364245d81aS猫头猫 <SafeAreaView style={globalStyle.fwflex1}> 374060c00aS猫头猫 <StatusBar backgroundColor={'transparent'} /> 38c446f2b8S猫头猫 <View style={style.bodyWrapper}> 394245d81aS猫头猫 <View style={globalStyle.flex1}> 404060c00aS猫头猫 <NavBar /> 414060c00aS猫头猫 <Content /> 424060c00aS猫头猫 <Bottom /> 43bf6e62f2S猫头猫 </View> 44*13cebe63S猫头猫 {orientation === 'horizonal' ? ( 45*13cebe63S猫头猫 <View style={globalStyle.flex1}> 46*13cebe63S猫头猫 <Lyric /> 47*13cebe63S猫头猫 </View> 48*13cebe63S猫头猫 ) : null} 49c446f2b8S猫头猫 </View> 501c06c799S猫头猫 </SafeAreaView> 51e990b02cS猫头猫 </> 52bf6e62f2S猫头猫 ); 53bf6e62f2S猫头猫} 54bf6e62f2S猫头猫 55bf6e62f2S猫头猫const style = StyleSheet.create({ 564245d81aS猫头猫 bodyWrapper: { 57c446f2b8S猫头猫 width: '100%', 58bf6e62f2S猫头猫 flex: 1, 59c446f2b8S猫头猫 flexDirection: 'row', 60c446f2b8S猫头猫 }, 61bf6e62f2S猫头猫}); 62