|
@@ -20,18 +20,21 @@
|
|
</div>
|
|
</div>
|
|
<div class="calandar row">
|
|
<div class="calandar row">
|
|
<div class="col col-12 col-lg-6 col-xl-6 p-0">
|
|
<div class="col col-12 col-lg-6 col-xl-6 p-0">
|
|
- <h3 class="month-title">1月</h3>
|
|
|
|
- <ImageTitleDescBlock
|
|
|
|
- v-for="(item, index) in daysData"
|
|
|
|
- :key="index"
|
|
|
|
- :title="item.title"
|
|
|
|
- :image="item.image"
|
|
|
|
- :desc="item.desc || item.title"
|
|
|
|
- @click="goDetail(item.id)"
|
|
|
|
- />
|
|
|
|
|
|
+ <scroll-rect class="left-list">
|
|
|
|
+ <h3 class="month-title">{{monthSelected}}月</h3>
|
|
|
|
+ <ImageTitleDescBlock
|
|
|
|
+ v-for="(item, index) in daysData"
|
|
|
|
+ :key="index"
|
|
|
|
+ :title="item.title"
|
|
|
|
+ :image="item.image"
|
|
|
|
+ :desc="item.desc || item.title"
|
|
|
|
+ @click="goDetail(item.id)"
|
|
|
|
+ />
|
|
|
|
+ </scroll-rect>
|
|
</div>
|
|
</div>
|
|
<div class="month-grid col-12 col-lg-6 col-xl-6 p-0">
|
|
<div class="month-grid col-12 col-lg-6 col-xl-6 p-0">
|
|
- <div
|
|
|
|
|
|
+ <scroll-rect
|
|
|
|
+ class="grid"
|
|
v-for="(month, k) in monthData"
|
|
v-for="(month, k) in monthData"
|
|
:key="k"
|
|
:key="k"
|
|
:class="[ monthSelected === month.month ? 'active' : '' ]"
|
|
:class="[ monthSelected === month.month ? 'active' : '' ]"
|
|
@@ -46,7 +49,7 @@
|
|
{{ holiday.title }}
|
|
{{ holiday.title }}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </scroll-rect>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -79,6 +82,7 @@ import ImageTitleDescBlock from '@/components/parts/ImageTitleDescBlock.vue';
|
|
import ThreeImageList from '@/components/parts/ThreeImageList.vue';
|
|
import ThreeImageList from '@/components/parts/ThreeImageList.vue';
|
|
import { usePageAction } from '@/composeable/PageAction';
|
|
import { usePageAction } from '@/composeable/PageAction';
|
|
import CommonContent, { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
|
|
import CommonContent, { GetContentListItem, GetContentListParams } from '@/api/CommonContent';
|
|
|
|
+import CalendarContent from '@/api/fusion/CalendarContent';
|
|
|
|
|
|
const carouselConfig = {
|
|
const carouselConfig = {
|
|
itemsToShow: 1,
|
|
itemsToShow: 1,
|
|
@@ -189,20 +193,19 @@ const monthData = ref<{
|
|
])
|
|
])
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
- const res = await CommonContent.getContentList(new GetContentListParams()
|
|
|
|
- .setModelId(18)
|
|
|
|
- .setMainBodyColumnId(272)
|
|
|
|
- , 1, 50)
|
|
|
|
|
|
+ const res = await CalendarContent.getCalendarList(new GetContentListParams(), 1, 50)
|
|
|
|
+ const year = new Date().getFullYear();
|
|
|
|
|
|
- res.list.forEach(item => {
|
|
|
|
- item.month = Math.floor(Math.random() * 12 + 1);
|
|
|
|
|
|
+ res.list.filter(p =>
|
|
|
|
+ p.dateYear === year
|
|
|
|
+ ).forEach(item => {
|
|
if (!item.desc)
|
|
if (!item.desc)
|
|
item.desc = item.title;
|
|
item.desc = item.title;
|
|
item.title = item.title.substring(0, 10);
|
|
item.title = item.title.substring(0, 10);
|
|
});
|
|
});
|
|
|
|
|
|
res.list.forEach(item => {
|
|
res.list.forEach(item => {
|
|
- monthData.value[item.month as number - 1].holidays.push(item)
|
|
|
|
|
|
+ monthData.value[item.dateMonth - 1].holidays.push(item)
|
|
})
|
|
})
|
|
|
|
|
|
daysData.value = monthData.value[0].holidays as GetContentListItem[];
|
|
daysData.value = monthData.value[0].holidays as GetContentListItem[];
|
|
@@ -226,6 +229,10 @@ const { navTo } = usePageAction();
|
|
.calandar {
|
|
.calandar {
|
|
background-color: $box-color;
|
|
background-color: $box-color;
|
|
|
|
|
|
|
|
+ .left-list {
|
|
|
|
+ height: 750px;
|
|
|
|
+ }
|
|
|
|
+
|
|
.month-title {
|
|
.month-title {
|
|
margin: 24px 24px 0 24px;
|
|
margin: 24px 24px 0 24px;
|
|
}
|
|
}
|
|
@@ -233,13 +240,14 @@ const { navTo } = usePageAction();
|
|
display: grid;
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 25%);
|
|
grid-template-columns: repeat(4, 25%);
|
|
|
|
|
|
- > div {
|
|
|
|
|
|
+ > .grid {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
background-color: $text-color-light;
|
|
background-color: $text-color-light;
|
|
padding: 12px ;
|
|
padding: 12px ;
|
|
border: 1px solid $border-split-color;
|
|
border: 1px solid $border-split-color;
|
|
|
|
+ height: 250px;
|
|
|
|
|
|
h3 {
|
|
h3 {
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
@@ -253,9 +261,17 @@ const { navTo } = usePageAction();
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
- padding: 4px 8px;
|
|
|
|
|
|
+ padding: 0 8px;
|
|
border-radius: 12px;
|
|
border-radius: 12px;
|
|
background-color: rgba(#FF961B, 0.1);
|
|
background-color: rgba(#FF961B, 0.1);
|
|
|
|
+
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ word-break: break-all;
|
|
|
|
+ line-height: 28px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|