render basic data in ticket detail
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user