add avatar in notecard

main
Dawn_Ocean 2024-03-21 11:08:10 +08:00
parent 7ae5d8758a
commit 3de05c7cfc
4 changed files with 24 additions and 10 deletions

View File

@ -12,7 +12,7 @@
"isConfirmed": false,
"notes": [
{
"avatar": "https://....jpg",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
"id": 21368,
"op": "宇航员",
"type": 0,
@ -20,7 +20,7 @@
"createdTime": "2024-03-07T19:52:48.523305"
},
{
"avatar": "https://....jpg",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
"id": 21370,
"op": "宇航员",
"type": 2,
@ -28,7 +28,7 @@
"createdTime": "2024-03-07T19:58:27.838816"
},
{
"avatar": "https://....jpg",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
"id": 21373,
"op": "宇航员",
"type": 2,
@ -36,7 +36,7 @@
"createdTime": "2024-03-07T20:28:12.070707"
},
{
"avatar": "https://....jpg",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
"id": 21374,
"op": "宇航员",
"type": 2,

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,13 +35,25 @@ export default class NoteCard extends Component<NoteCardProps, {}> {
}
return (
<View style={{ marginTop: '40rpx', marginBottom: '40rpx' }}>
<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>
);
}
}

View File

@ -12,6 +12,7 @@ export class TicketInfo {
}
export class TicketNote {
avatar: string;
id: number;
op: string;
type: 0 | 1 | 2;

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,