add avatar in notecard

This commit is contained in:
Dawn_Ocean
2024-03-21 11:08:10 +08:00
parent 7ae5d8758a
commit 3de05c7cfc
4 changed files with 24 additions and 10 deletions
+18 -6
View File
@@ -1,4 +1,4 @@
import { View } from '@tarojs/components';
import { Image, View } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import { TicketNote, StatusStr } from '@/pages/TicketDetail/TicketNote';
import pt from '@/plain-text';
@@ -35,12 +35,24 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
}
return (
<View style={{ marginTop: '40rpx', marginBottom: '40rpx' }}>
<View className='at-article__p'>{note.op}</View>
<View className='at-article__info'>
{note.createdTime.format(timeFormat)}
<View className='at-row at-row__align--center'>
<View className='at-col at-col-1 at-col--auto'>
<Image
style='width: 70rpx; height: 70rpx; border-radius: 35px;'
src={note.avatar}
mode='aspectFit'
/>
</View>
<View
className='at-col'
style={{ marginTop: '40rpx', marginBottom: '40rpx' }}
>
<View className='at-article__p'>{note.op}</View>
<View className='at-article__info'>
{note.createdTime.format(timeFormat)}
</View>
<View className='at-article__h3'>{message}</View>
</View>
<View className='at-article__h3'>{message}</View>
</View>
);
}
+1
View File
@@ -12,6 +12,7 @@ export class TicketInfo {
}
export class TicketNote {
avatar: string;
id: number;
op: string;
type: 0 | 1 | 2;
+1
View File
@@ -36,6 +36,7 @@ export function getTicketInfo(that: DetailFramework, id: number) {
const notes: Array<TicketNote> = [];
data.notes.map((item) => {
notes.push({
avatar: item.avatar,
id: item.id,
op: item.op,
type: item.type,