|
@@ -45,10 +45,12 @@
|
|
|
@click="monthChange(month.month)"
|
|
@click="monthChange(month.month)"
|
|
|
>
|
|
>
|
|
|
<h3>{{ month.month }}月</h3>
|
|
<h3>{{ month.month }}月</h3>
|
|
|
|
|
+ <p>{{ month.desc }}</p>
|
|
|
<div class="tags">
|
|
<div class="tags">
|
|
|
<span
|
|
<span
|
|
|
v-for="(holiday, index) in month.holidays"
|
|
v-for="(holiday, index) in month.holidays"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
|
|
+ :title="holiday.title"
|
|
|
>
|
|
>
|
|
|
{{ holiday.title }}
|
|
{{ holiday.title }}
|
|
|
</span>
|
|
</span>
|
|
@@ -85,6 +87,7 @@ import ThreeImageList from '@/components/parts/ThreeImageList.vue';
|
|
|
import CalendarContent from '@/api/fusion/CalendarContent';
|
|
import CalendarContent from '@/api/fusion/CalendarContent';
|
|
|
import { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
|
|
import { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
|
|
|
import { ScrollRect } from '@imengyu/vue-scroll-rect';
|
|
import { ScrollRect } from '@imengyu/vue-scroll-rect';
|
|
|
|
|
+import { CalendarUtils, DateUtils } from '@imengyu/imengyu-utils';
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const carouselConfig = {
|
|
const carouselConfig = {
|
|
@@ -138,54 +141,67 @@ const { data: monthData } = await useAsyncData('funCalendarContent2', async () =
|
|
|
|
|
|
|
|
const monthData : {
|
|
const monthData : {
|
|
|
month: number;
|
|
month: number;
|
|
|
|
|
+ desc: string,
|
|
|
holidays: GetContentListItem[];
|
|
holidays: GetContentListItem[];
|
|
|
}[] = [
|
|
}[] = [
|
|
|
{
|
|
{
|
|
|
month: 1,
|
|
month: 1,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 2,
|
|
month: 2,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 3,
|
|
month: 3,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 4,
|
|
month: 4,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 5,
|
|
month: 5,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 6,
|
|
month: 6,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 7,
|
|
month: 7,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 8,
|
|
month: 8,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 9,
|
|
month: 9,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 10,
|
|
month: 10,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 11,
|
|
month: 11,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
month: 12,
|
|
month: 12,
|
|
|
|
|
+ desc: '',
|
|
|
holidays: []
|
|
holidays: []
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
@@ -198,6 +214,11 @@ const { data: monthData } = await useAsyncData('funCalendarContent2', async () =
|
|
|
item.title = item.title.substring(0, 10);
|
|
item.title = item.title.substring(0, 10);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ for (let i = 0; i < monthData.length; i++) {
|
|
|
|
|
+ const startDay = CalendarUtils.solar2lunar(year, i + 1, 1);
|
|
|
|
|
+ const endDay = CalendarUtils.solar2lunar(year, i + 1, DateUtils.getMonthDays(year, i + 1));
|
|
|
|
|
+ monthData[i].desc = `${startDay.IMonthCn}${startDay.IDayCn} - ${endDay.IMonthCn}${endDay.IDayCn}`;
|
|
|
|
|
+ }
|
|
|
res.list.forEach(item => {
|
|
res.list.forEach(item => {
|
|
|
monthData[item.dateMonth - 1]?.holidays?.push(item.toJSON() as any)
|
|
monthData[item.dateMonth - 1]?.holidays?.push(item.toJSON() as any)
|
|
|
})
|
|
})
|
|
@@ -245,6 +266,9 @@ function monthChange(month: number) {
|
|
|
h3 {
|
|
h3 {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
}
|
|
}
|
|
|
|
|
+ p {
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ }
|
|
|
.tags {
|
|
.tags {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
flex-direction: row;
|