123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- import React, {Component} from 'react';
- import {createStackNavigator} from '@react-navigation/stack';
- import personal_center_page from '../../page/personalCenter/personal_center_page';
- import login_head from '../../page/login/login_head';
- import forget_password from '../../page/login/forget_password';
- import personal_information from '../../page/personalInformation/personal_information';
- // import enterprise_list from '../../page/enterpriseInfo/enterpriseList';
- import customer_information from '../../page/customerInformation/customer_information';
- import change_nick_name from '../../page/personalInformation/change_nick_name';
- import change_sex from '../../page/personalInformation/change_sex';
- import change_company from '../../page/personalInformation/change_company';
- import change_address from '../../page/personalInformation/change_address';
- import change_phone from '../../page/personalInformation/change_phone';
- import change_profiles from '../../page/personalInformation/change_profiles';
- const Stack = createStackNavigator();
- export default class personal_navigation extends Component {
- constructor(props) {
- super(props);
- }
- render() {
- return (
- <Stack.Navigator initialRouteName="personal_center_page">
- <Stack.Screen
- name="personal_center_page"
- component={personal_center_page}
- options={{
- title: '个人中心',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="login_head"
- component={login_head}
- options={{
- title: '登录',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="forget_password"
- component={forget_password}
- options={{
- title: '密码修改',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="personal_information"
- component={personal_information}
- options={{
- title: '个人信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="customer_information"
- component={customer_information}
- options={{
- title: '个人信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- {/*<Stack.Screen*/}
- {/* name="enterprise_list"*/}
- {/* component={enterprise_list}*/}
- {/* options={{*/}
- {/* title: '企业信息',*/}
- {/* headerTitleAlign: 'center',*/}
- {/* headerStyle: {*/}
- {/* backgroundColor: '#1199EA',*/}
- {/* },*/}
- {/* headerTintColor: '#fff',*/}
- {/* }}*/}
- {/*/>*/}
- <Stack.Screen
- name="change_nick_name"
- component={change_nick_name}
- options={{
- title: '设置昵称',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="change_sex"
- component={change_sex}
- options={{
- title: '设置性别',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="change_company"
- component={change_company}
- options={{
- title: '设置公司名称',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="change_address"
- component={change_address}
- options={{
- title: '设置地址信息',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="change_phone"
- component={change_phone}
- options={{
- title: '修改手机号码',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- <Stack.Screen
- name="change_profiles"
- component={change_profiles}
- options={{
- title: '设置简介',
- headerTitleAlign: 'center',
- headerStyle: {
- backgroundColor: '#1199EA',
- },
- headerTintColor: '#fff',
- }}
- />
- </Stack.Navigator>
- );
- }
- //判断导航栏是否显示
- shouldComponentUpdate(
- nextProps: Readonly<P>,
- nextState: Readonly<S>,
- nextContext: any,
- ): boolean {
- if (nextProps.route.state.index === 0) {
- this.props.navigation.setOptions({
- tabBarVisible: true,
- });
- }
- return true;
- }
- }
|