nav bar title localization
This commit is contained in:
@@ -2,14 +2,16 @@ import { Component, ReactNode } from 'react';
|
||||
import { View } from '@tarojs/components';
|
||||
import { getCurrentInstance } from '@tarojs/runtime';
|
||||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
|
||||
export default class TicketDetail extends Component {
|
||||
state = {
|
||||
id: 0,
|
||||
};
|
||||
componentDidMount(): void {
|
||||
const navBar = pt.get().navBar;
|
||||
Taro.setNavigationBarTitle({
|
||||
title: '工单详情',
|
||||
title: navBar.ticketDetail,
|
||||
});
|
||||
const { router } = getCurrentInstance();
|
||||
const id = router?.params.id;
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
import { Component, ReactNode } from 'react';
|
||||
import { View } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
import './about.scss';
|
||||
|
||||
export default class SettingsPage extends Component {
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.about,
|
||||
});
|
||||
}
|
||||
render(): ReactNode {
|
||||
return <View></View>;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,13 @@ export default class InformPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.inform,
|
||||
});
|
||||
}
|
||||
|
||||
handleChangePhone(phone: string) {
|
||||
this.setState({
|
||||
phone: phone,
|
||||
|
||||
@@ -14,6 +14,11 @@ export default class MemberPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.member,
|
||||
});
|
||||
}
|
||||
handleChangeStuid(stuid: string) {
|
||||
this.setState({
|
||||
stuid: stuid,
|
||||
|
||||
@@ -69,6 +69,9 @@ export default class SettingsPage extends Component {
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.myTicket,
|
||||
});
|
||||
Taro.request({
|
||||
url: getUrl('/user/mytickets'),
|
||||
method: 'GET',
|
||||
|
||||
@@ -13,6 +13,13 @@ export default class SettingsPage extends Component {
|
||||
isLoading: false,
|
||||
isDisable: false,
|
||||
};
|
||||
|
||||
componentDidMount(): void {
|
||||
Taro.setNavigationBarTitle({
|
||||
title: pt.get().navBar.user.report,
|
||||
});
|
||||
}
|
||||
|
||||
handleChange(report: string) {
|
||||
this.setState({
|
||||
report,
|
||||
|
||||
Reference in New Issue
Block a user