6.27 修改

This commit is contained in:
jl-zhoujl2
2022-06-27 15:22:15 +08:00
parent f17ebf9c5d
commit 39fc4276ec
9 changed files with 118 additions and 62 deletions

View File

@ -1,10 +1,10 @@
import React, { useEffect, useState } from 'react';
import '../Style/ld_style.less';
import { Input, List, Pagination } from 'antd';
import list_pic from '@/assets/topic/listNewsPic01.jpg'
import topic_activity_default2 from '@/assets/topic/topic_activity_default2.jpg'
import time_icon from '@/assets/topic/timeIcon.png'
import { getGracefulList } from './service';
import { getImageUrl } from '../utils';
import { formatTime, getImageUrl } from '../utils';
import { history } from 'umi';
const { Search } = Input;
@ -41,7 +41,7 @@ const PersonInfor: React.FC<{}> = () => {
const getGracefulData = () => {
getGracefulList().then(async res => {
if (res?.code == 200) {
const data = await getImageUrl(res?.data, 'image');
const data = await getImageUrl(res?.data, 'image', topic_activity_default2);
setGracefulList(data);
}
})
@ -75,7 +75,7 @@ const PersonInfor: React.FC<{}> = () => {
<span className="text"><span></span></span>
<div className="search-box">
<Search
placeholder="输入姓名/邮箱/电话"
placeholder="输入标题"
allowClear
enterButton="搜索"
style={{ width: 322 }}
@ -86,10 +86,9 @@ const PersonInfor: React.FC<{}> = () => {
<List
itemLayout="horizontal"
pagination={{
onChange: page => {
console.log(page);
},
pageSize: 2,
size: 'small',
showTotal: (total) => `${total}`,
pageSize: 10,
}}
dataSource={gracefulList}
renderItem={item => (
@ -98,13 +97,12 @@ const PersonInfor: React.FC<{}> = () => {
<img src={item.imageUrl} />
<p className="tit" onClick={() => clickTitle(item)}>{item.title}</p>
<p className="detail">{item.content}</p>
<span className="time"><img src={time_icon} />{item.sendTime}</span>
<span className="time"><img src={time_icon} />{item.createTime}</span>
</div>
</List.Item>
)}
/>
</div>
<Pagination size="small" total={50} showSizeChanger showQuickJumper />
</div>
)
}