index.js 1.37 KB
// 路由配置
import React from 'react'
import { createStackNavigator } from '@react-navigation/stack'
import { headerStyle } from '../config'
import { TabRouter } from '../tab'

import About from '../../views/about'
import Privacy from '../../views/about/privacy'
import Features from '../../views/about/features'
import FeatureDetail from '../../views/about/feature-detail'

const Stack = createStackNavigator()

const Route = () => {
    return (
        <Stack.Navigator initialRouteName="Index" screenOptions={{ ...headerStyle }} mode={'card'} >
            <Stack.Screen name="Index" options={{ title: '首页' }} component={ TabRouter } />
            {/* 关于 */}
            <Stack.Screen name='About' options={{ title: '', headerShown: true, headerStyle: {elevation: 0, backgroundColor: '#fff'} }} component={About}/>
            {/* 隐私协议与政策 */}
            <Stack.Screen name='Privacy' options={{title: '隐私协议',  headerShown: true}} component={Privacy}/>
            {/* 功能介绍 */}
            <Stack.Screen name='Features' options={{ headerShown: true, title: '功能介绍'}} component={Features}/>
            {/* 功能介绍 */}
            <Stack.Screen name='FeatureDetail' options={{ headerShown: true, title: '', headerStyle: {elevation: 0, backgroundColor: '#fff'}}} component={FeatureDetail}/>
        </Stack.Navigator>
    )
}

export { Route }