mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-15 21:03:29 +08:00
🏷️ fix(types): 精简 types,清除无用文件
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* @file plugins Mys utils calendar.ts
|
||||
* @description Mys 插件日历工具
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Alpha v0.1.1
|
||||
*/
|
||||
|
||||
import { type CalendarData, type CalendarCard } from "../interface/calendar";
|
||||
|
||||
/**
|
||||
* @description 将日历数据转换为卡片数据
|
||||
* @since Alpha v0.1.1
|
||||
* @param {CalendarData[]} calendarData 日历数据
|
||||
* @returns {CalendarCard[]}
|
||||
*/
|
||||
export function getCalendarCard (calendarData: CalendarData[]): CalendarCard[] {
|
||||
const calendarCard: CalendarCard[] = [];
|
||||
calendarData.forEach((data: CalendarData) => {
|
||||
return calendarCard.push({
|
||||
id: Number(data.id),
|
||||
type: Number(data.break_type),
|
||||
title: data.title,
|
||||
cover: data.img_url,
|
||||
url: data.jump_type === "1" ? data.jump_url : data.content_id,
|
||||
drop_day: data.drop_day,
|
||||
sort_day: JSON.parse(data.sort),
|
||||
contentInfos: data.contentInfos,
|
||||
});
|
||||
});
|
||||
return calendarCard;
|
||||
}
|
||||
Reference in New Issue
Block a user