|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@ -1,3 +1,4 @@ |
|||||||
{ |
{ |
||||||
|
"navigationBarTitleText": "登录", |
||||||
"usingComponents": {} |
"usingComponents": {} |
||||||
} |
} |
||||||
|
|||||||
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"navigationBarTitleText": "课表", |
||||||
|
"usingComponents": { |
||||||
|
"van-icon": "@vant/weapp/icon/index", |
||||||
|
"svg-icon": "/components/svg-icon/index" |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,310 @@ |
|||||||
|
.page-title { |
||||||
|
font-size: 32rpx; |
||||||
|
color: rgba(30, 41, 59, 1); |
||||||
|
} |
||||||
|
.page-back { |
||||||
|
font-size: 32rpx; |
||||||
|
color: rgba(30, 41, 59, 1); |
||||||
|
} |
||||||
|
|
||||||
|
.page { |
||||||
|
padding: 0 30rpx; |
||||||
|
.page-header { |
||||||
|
padding-top: 30rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 46rpx; |
||||||
|
.week-wrap { |
||||||
|
flex: 1; |
||||||
|
.week { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 16rpx; |
||||||
|
.icon { |
||||||
|
width: 42rpx; |
||||||
|
height: 42rpx; |
||||||
|
} |
||||||
|
.content { |
||||||
|
font-size: 38rpx; |
||||||
|
color: rgba(17, 24, 39, 1); |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
} |
||||||
|
.school-year { |
||||||
|
margin-top: 8rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(107, 114, 128, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.notify { |
||||||
|
flex-shrink: 0; |
||||||
|
padding: 5rpx 15rpx 5rpx 5rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 6rpx; |
||||||
|
background-color: rgba(247, 248, 250, 1); |
||||||
|
border: 1px solid #fff; |
||||||
|
border-radius: 50rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(74, 184, 253, 1); |
||||||
|
.icon-wrap { |
||||||
|
flex-shrink: 0; |
||||||
|
width: 42rpx; |
||||||
|
height: 42rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
background-color: #fff; |
||||||
|
border-radius: 50rpx; |
||||||
|
.icon { |
||||||
|
width: 22rpx; |
||||||
|
height: 28rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.switch-format { |
||||||
|
flex-shrink: 0; |
||||||
|
padding: 8rpx; |
||||||
|
background-color: rgba(247, 248, 250, 1); |
||||||
|
border: 1px solid #fff; |
||||||
|
border-radius: 16rpx; |
||||||
|
display: flex; |
||||||
|
.icon-wrap { |
||||||
|
width: 50rpx; |
||||||
|
height: 50rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
border-radius: 12rpx; |
||||||
|
.icon { |
||||||
|
width: 26rpx; |
||||||
|
height: 21rpx; |
||||||
|
} |
||||||
|
.icon:last-of-type { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
&.active { |
||||||
|
background-color: #fff; |
||||||
|
.icon { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
.icon:last-of-type { |
||||||
|
display: block; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.calender { |
||||||
|
margin-top: 30rpx; |
||||||
|
padding: 16rpx; |
||||||
|
background: #ffffff; |
||||||
|
box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(74, 172, 219, 0.09); |
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx; |
||||||
|
border: 1rpx solid #f7f8fa; |
||||||
|
display: flex; |
||||||
|
align-content: inherit; |
||||||
|
.item { |
||||||
|
flex: 1; |
||||||
|
padding: 16rpx; |
||||||
|
text-align: center; |
||||||
|
border-radius: 24rpx; |
||||||
|
.week-name { |
||||||
|
font-size: 18rpx; |
||||||
|
color: rgba(148, 163, 184, 1); |
||||||
|
} |
||||||
|
.day { |
||||||
|
margin-top: 8rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(17, 24, 39, 1); |
||||||
|
line-height: 38rpx; |
||||||
|
} |
||||||
|
&.active { |
||||||
|
background-color: rgba(74, 184, 253, 1); |
||||||
|
box-shadow: |
||||||
|
0rpx 8rpx 12rpx -8rpx rgba(74, 184, 253, 0.2), |
||||||
|
0rpx 19rpx 29rpx -6rpx rgba(74, 184, 253, 0.2); |
||||||
|
.week-name { |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
.day { |
||||||
|
color: #fff; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.format1 { |
||||||
|
margin-top: 18rpx; |
||||||
|
.card { |
||||||
|
margin-top: 30rpx; |
||||||
|
display: flex; |
||||||
|
gap: 30rpx; |
||||||
|
.aside { |
||||||
|
flex-shrink: 0; |
||||||
|
padding-top: 15rpx; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
align-items: flex-end; |
||||||
|
.start { |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(17, 24, 39, 1); |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
.line { |
||||||
|
flex-shrink: 0; |
||||||
|
width: 1px; |
||||||
|
height: 29rpx; |
||||||
|
background-color: rgba(148, 163, 184, 1); |
||||||
|
} |
||||||
|
.end { |
||||||
|
font-size: 24rpx; |
||||||
|
color: rgba(148, 163, 184, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.container { |
||||||
|
flex: 1; |
||||||
|
padding: 33rpx; |
||||||
|
border-radius: 24rpx; |
||||||
|
border-left: 10rpx solid rgba(171, 89, 248, 1); |
||||||
|
background-color: rgba(171, 89, 248, 0.1); |
||||||
|
.c-header { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
.title { |
||||||
|
font-size: 32rpx; |
||||||
|
color: rgba(74, 21, 124, 1); |
||||||
|
font-weight: bold; |
||||||
|
.step { |
||||||
|
padding: 6rpx 16rpx; |
||||||
|
font-size: 22rpx; |
||||||
|
color: rgba(103, 31, 171, 1); |
||||||
|
background-color: rgba(171, 89, 248, 0.2); |
||||||
|
border-radius: 242rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.site, |
||||||
|
.teacher { |
||||||
|
padding-top: 16rpx; |
||||||
|
display: flex; |
||||||
|
gap: 12rpx; |
||||||
|
.icon { |
||||||
|
margin-top: 14rpx; |
||||||
|
} |
||||||
|
.content { |
||||||
|
color: rgba(103, 31, 171, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.format2 { |
||||||
|
} |
||||||
|
|
||||||
|
.format3 { |
||||||
|
/* 外层容器 */ |
||||||
|
.schedule-wrap { |
||||||
|
border: 1rpx solid #eee; |
||||||
|
border-radius: 16rpx; |
||||||
|
overflow: hidden; |
||||||
|
} |
||||||
|
/* 表头横向滚动 */ |
||||||
|
.header-scroll { |
||||||
|
width: 100%; |
||||||
|
} |
||||||
|
.header-row { |
||||||
|
display: flex; |
||||||
|
} |
||||||
|
/* 左侧时间列统一宽度 */ |
||||||
|
.time-col { |
||||||
|
width: 160rpx; |
||||||
|
flex-shrink: 0; |
||||||
|
} |
||||||
|
.header-time { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
border-right: 1rpx solid #eee; |
||||||
|
border-bottom: 1rpx solid #eee; |
||||||
|
color: #999; |
||||||
|
} |
||||||
|
/* 每一天的列宽统一 */ |
||||||
|
.day-col { |
||||||
|
width: 120rpx; |
||||||
|
flex-shrink: 0; |
||||||
|
} |
||||||
|
.header-day { |
||||||
|
text-align: center; |
||||||
|
padding: 16rpx 0; |
||||||
|
border-right: 1rpx solid #eee; |
||||||
|
border-bottom: 1rpx solid #eee; |
||||||
|
} |
||||||
|
.header-day .week { |
||||||
|
font-size: 26rpx; |
||||||
|
color: #666; |
||||||
|
} |
||||||
|
.header-day .date { |
||||||
|
font-size: 30rpx; |
||||||
|
margin-top: 4rpx; |
||||||
|
} |
||||||
|
/* 主体横向+纵向滚动 */ |
||||||
|
.body-scroll { |
||||||
|
height: calc(100vh - 160rpx); |
||||||
|
} |
||||||
|
.body-row { |
||||||
|
display: flex; |
||||||
|
} |
||||||
|
/* 左侧课时列表 */ |
||||||
|
.body-time { |
||||||
|
border-right: 1rpx solid #eee; |
||||||
|
} |
||||||
|
.time-item { |
||||||
|
height: 140rpx; /* 单节高度,和课程网格行高一致 */ |
||||||
|
padding: 10rpx; |
||||||
|
border-bottom: 1rpx solid #eee; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
justify-content: center; |
||||||
|
align-items: center; |
||||||
|
color: #666; |
||||||
|
font-size: 24rpx; |
||||||
|
} |
||||||
|
.section-name { |
||||||
|
font-weight: 500; |
||||||
|
} |
||||||
|
.time-range { |
||||||
|
font-size: 22rpx; |
||||||
|
color: #999; |
||||||
|
margin-top: 6rpx; |
||||||
|
} |
||||||
|
/* 课程网格核心:CSS Grid */ |
||||||
|
.grid-container { |
||||||
|
display: flex; |
||||||
|
} |
||||||
|
.grid-day { |
||||||
|
display: grid; |
||||||
|
grid-template-rows: repeat(9, 140rpx); /* 9节课,每行140rpx */ |
||||||
|
border-right: 1rpx solid #eee; |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
/* 课程卡片样式 */ |
||||||
|
.course-card { |
||||||
|
margin: 8rpx; |
||||||
|
border-radius: 8rpx; |
||||||
|
padding: 10rpx; |
||||||
|
color: #333; |
||||||
|
font-size: 24rpx; |
||||||
|
} |
||||||
|
.course-name { |
||||||
|
font-weight: 500; |
||||||
|
line-height: 1.4; |
||||||
|
} |
||||||
|
.course-loc { |
||||||
|
margin-top: 8rpx; |
||||||
|
font-size: 22rpx; |
||||||
|
opacity: 0.8; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,149 @@ |
|||||||
|
const _app = getApp<IAppOption>() |
||||||
|
|
||||||
|
Page({ |
||||||
|
data: { |
||||||
|
scrollX: 0, // 横向滚动偏移量
|
||||||
|
isSyncing: false, // 同步锁,防止双向滚动死循环
|
||||||
|
todayIndex: 1, // 今天对应的索引(周二=1)
|
||||||
|
// 左侧9节课时间段
|
||||||
|
sectionList: [ |
||||||
|
{ index: 1, time: '08:30\n09:15' }, |
||||||
|
{ index: 2, time: '09:20\n10:05' }, |
||||||
|
{ index: 3, time: '10:25\n11:10' }, |
||||||
|
{ index: 4, time: '11:15\n12:00' }, |
||||||
|
{ index: 5, time: '14:00\n14:45' }, |
||||||
|
{ index: 6, time: '14:50\n15:35' }, |
||||||
|
{ index: 7, time: '15:45\n16:30' }, |
||||||
|
{ index: 8, time: '16:35\n17:20' }, |
||||||
|
{ index: 9, time: '17:30\n18:10' }, |
||||||
|
], |
||||||
|
// 周一到周日 日期+课程数据
|
||||||
|
weekList: [ |
||||||
|
{ |
||||||
|
week: '一', |
||||||
|
date: '6/1', |
||||||
|
courseList: [ |
||||||
|
{ |
||||||
|
id: 1, |
||||||
|
name: '公共外语II(英语综合)', |
||||||
|
loc: '日新楼北401', |
||||||
|
start: 1, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#e6f7ff', |
||||||
|
borderColor: '#4ab8fd', |
||||||
|
textColor: '#4ab8fd', |
||||||
|
locColor: '#4ab8fd', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
week: '二', |
||||||
|
date: '6/2', |
||||||
|
courseList: [ |
||||||
|
{ |
||||||
|
id: 2, |
||||||
|
name: '数据库SQL入门', |
||||||
|
loc: '日新楼北401', |
||||||
|
start: 3, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#fff0f0', |
||||||
|
borderColor: '#ff6b6b', |
||||||
|
textColor: '#ff6b6b', |
||||||
|
locColor: '#ff6b6b', |
||||||
|
}, |
||||||
|
{ |
||||||
|
id: 3, |
||||||
|
name: 'BIM建筑信息模型', |
||||||
|
loc: '信息楼507机房', |
||||||
|
start: 5, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#fff8e6', |
||||||
|
borderColor: '#ffa500', |
||||||
|
textColor: '#ffa500', |
||||||
|
locColor: '#ffa500', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ week: '三', date: '6/3', courseList: [] }, |
||||||
|
{ |
||||||
|
week: '四', |
||||||
|
date: '6/4', |
||||||
|
courseList: [ |
||||||
|
{ |
||||||
|
id: 4, |
||||||
|
name: '(美育课)人工智能伦理与哲学', |
||||||
|
loc: '日新楼北301', |
||||||
|
start: 3, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#e6fff0', |
||||||
|
borderColor: '#52c41a', |
||||||
|
textColor: '#52c41a', |
||||||
|
locColor: '#52c41a', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ week: '五', date: '6/5', courseList: [] }, |
||||||
|
{ |
||||||
|
week: '六', |
||||||
|
date: '6/6', |
||||||
|
courseList: [ |
||||||
|
{ |
||||||
|
id: 5, |
||||||
|
name: '体育与健康2(健美操)', |
||||||
|
loc: 'D6体育馆三', |
||||||
|
start: 7, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#e6f0ff', |
||||||
|
borderColor: '#4ab8fd', |
||||||
|
textColor: '#4ab8fd', |
||||||
|
locColor: '#4ab8fd', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
week: '日', |
||||||
|
date: '6/7', |
||||||
|
courseList: [ |
||||||
|
{ |
||||||
|
id: 6, |
||||||
|
name: '创新思维', |
||||||
|
loc: '日新楼北301', |
||||||
|
start: 1, |
||||||
|
rowNum: 2, |
||||||
|
bgColor: '#f5e6ff', |
||||||
|
borderColor: '#b37feb', |
||||||
|
textColor: '#b37feb', |
||||||
|
locColor: '#b37feb', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
onLoad() {}, |
||||||
|
// 滑动表头时,同步主体滚动
|
||||||
|
onHeaderScroll(e) { |
||||||
|
if (this.data.isSyncing) return |
||||||
|
this.setData({ |
||||||
|
isSyncing: true, |
||||||
|
scrollX: e.detail.scrollLeft, |
||||||
|
}) |
||||||
|
// 延迟解锁同步锁,避免双向触发循环
|
||||||
|
setTimeout(() => { |
||||||
|
this.setData({ isSyncing: false }) |
||||||
|
}, 80) |
||||||
|
}, |
||||||
|
|
||||||
|
// 滑动课程主体时,同步表头滚动
|
||||||
|
onBodyScroll(e) { |
||||||
|
if (this.data.isSyncing) return |
||||||
|
this.setData({ |
||||||
|
isSyncing: true, |
||||||
|
scrollX: e.detail.scrollLeft, |
||||||
|
}) |
||||||
|
setTimeout(() => { |
||||||
|
this.setData({ isSyncing: false }) |
||||||
|
}, 80) |
||||||
|
}, |
||||||
|
}) |
||||||
|
|
||||||
|
export {} |
||||||
@ -0,0 +1,142 @@ |
|||||||
|
<navbar fixed customStyle="background:{{background}};"> |
||||||
|
<van-icon class="page-back" name="arrow-left" slot="left" /> |
||||||
|
<view class="page-title" slot="title">SIC+ 课表</view> |
||||||
|
</navbar> |
||||||
|
<view class="page" style="padding-top: {{pageTop}}px;"> |
||||||
|
<view class="page-header"> |
||||||
|
<view class="week-wrap"> |
||||||
|
<view class="week"> |
||||||
|
<image class="icon" src="/images/icon69.png"></image> |
||||||
|
<view class="content">第14周</view> |
||||||
|
<image class="icon" src="/images/icon70.png"></image> |
||||||
|
</view> |
||||||
|
<view class="school-year">2025-2026 第1学期</view> |
||||||
|
</view> |
||||||
|
<view class="notify"> |
||||||
|
<view class="icon-wrap"> |
||||||
|
<image class="icon" src="/images/icon71.png"></image> |
||||||
|
</view> |
||||||
|
提醒我 |
||||||
|
</view> |
||||||
|
<view class="switch-format"> |
||||||
|
<view class="icon-wrap active"> |
||||||
|
<image class="icon" src="/images/icon74.png"></image> |
||||||
|
<image class="icon" src="/images/icon72.png"></image> |
||||||
|
</view> |
||||||
|
<view class="icon-wrap"> |
||||||
|
<image class="icon" src="/images/icon73.png"></image> |
||||||
|
<image class="icon" src="/images/icon75.png"></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="calender"> |
||||||
|
<view class="item {{index==2 && 'active'}}" wx:for="{{7}}" wx:key="index"> |
||||||
|
<view class="week-name">一</view> |
||||||
|
<view class="day">6/1</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<view class="format1" wx:if="{{false}}"> |
||||||
|
<view class="card" wx:for="{{20}}" wx:key="index"> |
||||||
|
<view class="aside"> |
||||||
|
<view class="start">08:00</view> |
||||||
|
<view class="line"></view> |
||||||
|
<view class="end">09:35</view> |
||||||
|
</view> |
||||||
|
<view class="container"> |
||||||
|
<view class="c-header"> |
||||||
|
<view class="title">微积分 (Calculus)</view> |
||||||
|
<view class="step">第1-2节</view> |
||||||
|
</view> |
||||||
|
<view class="site"> |
||||||
|
<svg-icon class="icon" width="18rpx" height="18rpx" src="/images/svg1.svg"></svg-icon> |
||||||
|
<view class="content">博学楼4教室</view> |
||||||
|
</view> |
||||||
|
<view class="teacher"> |
||||||
|
<svg-icon class="icon" width="18rpx" height="18rpx" src="/images/svg2.svg"></svg-icon> |
||||||
|
<view class="content">李老师</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<view class="format2" wx:else> |
||||||
|
<!-- 顶部日期表头 --> |
||||||
|
<view class="schedule-header"> |
||||||
|
<view class="header-time">时间</view> |
||||||
|
<view class="header-days"> |
||||||
|
<view wx:for="{{weekList}}" wx:key="date" class="day-header {{index === todayIndex ? 'active' : ''}}"> |
||||||
|
<view class="day-week">{{item.week}}</view> |
||||||
|
<view class="day-date">{{item.date}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<!-- 课程主体区域 --> |
||||||
|
<scroll-view scroll-x class="schedule-body"> |
||||||
|
<view class="body-row"> |
||||||
|
<!-- 左侧节次列 --> |
||||||
|
<view class="body-time"> |
||||||
|
<view wx:for="{{sectionList}}" wx:key="index" class="time-slot"> |
||||||
|
<view class="slot-name">第{{item.index}}节</view> |
||||||
|
<view class="slot-range">{{item.time}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<!-- 右侧课程网格 --> |
||||||
|
<view class="body-grid"> |
||||||
|
<view wx:for="{{weekList}}" wx:key="date" class="day-column"> |
||||||
|
<view |
||||||
|
wx:for="{{item.courseList}}" |
||||||
|
wx:key="id" |
||||||
|
class="course-block" |
||||||
|
style="background-color: {{item.bgColor}}; border-color: {{item.borderColor}}; top: {{(item.start - 1) * 140}}rpx; height: {{item.rowNum * 140 - 2}}rpx;" |
||||||
|
> |
||||||
|
<view class="course-title" style="color: {{item.textColor}}">{{item.name}}</view> |
||||||
|
<view class="course-loc" style="color: {{item.locColor}}">{{item.loc}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</scroll-view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<view class="format3"> |
||||||
|
<view class="schedule-wrap"> |
||||||
|
<!-- 顶部表头:绑定滚动事件 --> |
||||||
|
<scroll-view scroll-x class="header-scroll" bindscroll="onHeaderScroll" scroll-left="{{scrollX}}"> |
||||||
|
<view class="header-row"> |
||||||
|
<view class="time-col header-time">时间</view> |
||||||
|
<view wx:for="{{weekList}}" wx:key="date" class="day-col header-day"> |
||||||
|
<view class="week">{{item.week}}</view> |
||||||
|
<view class="date">{{item.date}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</scroll-view> |
||||||
|
|
||||||
|
<!-- 主体内容:绑定滚动事件,同步横向偏移 --> |
||||||
|
<scroll-view scroll-x scroll-y class="body-scroll" bindscroll="onBodyScroll" scroll-left="{{scrollX}}"> |
||||||
|
<view class="body-row"> |
||||||
|
<view class="time-col body-time"> |
||||||
|
<view wx:for="{{sectionList}}" wx:key="index" class="time-item"> |
||||||
|
<view class="section-name">第{{item.index}}节</view> |
||||||
|
<view class="time-range">{{item.time}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="grid-container"> |
||||||
|
<view wx:for="{{weekList}}" wx:key="date" class="day-col grid-day"> |
||||||
|
<view |
||||||
|
wx:for="{{item.courseList}}" |
||||||
|
wx:key="id" |
||||||
|
class="course-card" |
||||||
|
style="background:{{item.bgColor}}; grid-row: {{item.start}} / span {{item.rowNum}}" |
||||||
|
> |
||||||
|
<view class="course-name">{{item.name}}</view> |
||||||
|
<view class="course-loc">{{item.loc}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</scroll-view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||