import { basePicUrl, baseUrl, baseFileUrl, baseIconUrl } from '../config/index'; import dayjs from "dayjs"; /** * 工作提醒 */ export function getNotice(data) { if (data.authorPicUrl) data.authorPicUrl = basePicUrl + data.authorPicUrl; if (data.picUrl) data.picUrl = basePicUrl + data.picUrl; data.updateTime = dayjs(data.updateTime).format('YYYY年MM月DD日') return data // return { // title: data.title, // time: dayjs(data.updateTime).format('YYYY年MM月DD日'), // isRead: data.hasRead, // }; } export function getNoticeList(dataList) { return dataList.map(item => { return getNotice(item); }); }