add blank judgement; fixed setstate in render bug

This commit is contained in:
Dawn_Ocean
2024-03-15 14:28:26 +08:00
parent 6b554196b3
commit b41498976e
8 changed files with 123 additions and 94 deletions
@@ -57,6 +57,11 @@ export default class DetailFramework extends Component<
title: navBar.ticketDetail,
});
getTicketInfo(this, this.props.id);
const status = this.state.ticketInfo.status;
this.setState({
current: mapStatusStep.get(status) || 0,
items: pt.get().ticketDetail.stepItems,
});
}
props: Readonly<DetailFrameworkProps> = {
@@ -79,12 +84,6 @@ export default class DetailFramework extends Component<
return <View>Request failed</View>;
}
const status = this.state.ticketInfo.status;
// this.setState({
// current: mapStatusStep.get(status) || 0,
// items: pt.get().ticketDetail.stepItems,
// });
const elements: ShowElements = {
device: this.props.isInfoShow['device'] ? (
<View className='at-article__h1'>