render basic data in ticket detail

This commit is contained in:
2024-03-12 12:14:45 +08:00
parent a1aa63635f
commit cd076cd5a4
6 changed files with 81 additions and 13 deletions
+4 -4
View File
@@ -6,12 +6,12 @@ import Taro from '@tarojs/taro';
import moment from 'moment';
import { getUrl } from '.';
export function getTicketInfo(that: TicketDetail) {
export function getTicketInfo(that: TicketDetail, id: number) {
Taro.request({
url: getUrl('/tickets/info'),
method: 'GET',
data: {
id: that.state.id,
id: id,
},
})
.then(res => {
@@ -30,7 +30,7 @@ export function getTicketInfo(that: TicketDetail) {
device: data.device,
deviceModel: data.deviceModel,
description: data.description,
createdTime: moment(),
createdTime: moment(data.createdTime as string),
status: data.status,
};
const notes: Array<TicketNote> = [];
@@ -40,7 +40,7 @@ export function getTicketInfo(that: TicketDetail) {
op: item.op,
type: item.type,
content: item.content,
createdTime: moment(),
createdTime: moment(item.createdTime as string),
});
});
that.setState({