选课调整

This commit is contained in:
hebo 2025-09-03 17:20:13 +08:00
parent 8d74c22698
commit f50635b6e1
2 changed files with 17 additions and 1 deletions

View File

@ -189,11 +189,27 @@ onMounted(async () => {
xqId = res.result.dqXq.id;
zcList.value = result.zcList;
sjList.value = result.sjList;
//
const today = dayjs();
const currentWeekday = today.day(); // 0-60
const currentWeekdayIndex = currentWeekday === 0 ? 6 : currentWeekday - 1; // 1-71
//
let zc = zcList.value.find((item:any) => item.djz === dqZc);
if (!zc) {
zc = zcList.value[0];
}
//
selectWeek(zc);
//
if (rqList.value && rqList.value.length > 0) {
//
const targetIndex = Math.min(currentWeekdayIndex, rqList.value.length - 1);
selectDay(targetIndex);
}
});
</script>

View File

@ -24,7 +24,7 @@
<view class="course-time"
>上课时间{{ courseDetail.studyTime }}</view
>
<view class="course-price">
<view class="course-price" v-if="courseDetail.price > 0">
金额<text class="price-value">¥{{ courseDetail.price }}</text>
</view>
</view>