fix status display bug in detailframework

This commit is contained in:
Dawn_Ocean
2024-03-22 15:58:53 +08:00
parent 97a8d0570a
commit 24f71ed997
2 changed files with 34 additions and 24 deletions
@@ -9,7 +9,6 @@ import {
import pt from '@/plain-text';
import { RequestState } from '@/service';
import { getTicketInfo } from '@/service/ticketsInfo';
import { FixStatus } from '@/common';
import { AtCard, AtSteps } from 'taro-ui';
import NoteList from '../NoteList/NoteList';
@@ -17,14 +16,6 @@ interface StepItemData {
title: string;
}
const mapStatusStep: Map<FixStatus, 0 | 1 | 2 | 3> = new Map([
[1, 0],
[2, 1],
[3, 2],
[4, 2],
[5, 3],
]);
interface DetailFrameworkState {
current: number;
items: Array<StepItemData>;
@@ -57,11 +48,6 @@ 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> = {