wrap up detailframework in atcard in repair page

This commit is contained in:
Dawn_Ocean
2024-03-14 16:51:21 +08:00
parent 84507f7214
commit 9931b23337
8 changed files with 68 additions and 35 deletions
+5 -12
View File
@@ -13,20 +13,15 @@ export function getMyTicketList(that: MyTicketPage) {
},
})
.then((res) => {
let former = that.state.rs;
if (!res.data.success) {
that.setState({
rs: {
loading: false,
success: false,
},
rs: former.trans(false),
});
return;
}
that.setState({
rs: {
loading: false,
success: true,
},
rs: former.trans(true),
fixList: res.data.data.list.map(
(item) =>
new TicketListItem(
@@ -40,11 +35,9 @@ export function getMyTicketList(that: MyTicketPage) {
});
})
.catch((reason) => {
let former = that.state.rs;
that.setState({
rs: {
loading: false,
success: false,
},
rs: former.trans(false),
});
console.log(reason);
});