Showing
1 changed file
with
11 additions
and
1 deletions
| ... | @@ -334,7 +334,7 @@ import { useRoute, useRouter } from 'vue-router' | ... | @@ -334,7 +334,7 @@ import { useRoute, useRouter } from 'vue-router' |
| 334 | import { useCart } from '@/contexts/cart' | 334 | import { useCart } from '@/contexts/cart' |
| 335 | import { useAuth } from '@/contexts/auth' | 335 | import { useAuth } from '@/contexts/auth' |
| 336 | import { useTitle } from '@vueuse/core'; | 336 | import { useTitle } from '@vueuse/core'; |
| 337 | -import { showToast } from 'vant'; | 337 | +import { showToast, showDialog } from 'vant'; |
| 338 | import { formatDate } from '@/utils/tools' | 338 | import { formatDate } from '@/utils/tools' |
| 339 | 339 | ||
| 340 | import AppLayout from '@/components/layout/AppLayout.vue' | 340 | import AppLayout from '@/components/layout/AppLayout.vue' |
| ... | @@ -593,6 +593,16 @@ const goToStudyDetail = (item) => { | ... | @@ -593,6 +593,16 @@ const goToStudyDetail = (item) => { |
| 593 | showToast('购买的课程正在审核中,请稍后再试'); | 593 | showToast('购买的课程正在审核中,请稍后再试'); |
| 594 | return; | 594 | return; |
| 595 | } | 595 | } |
| 596 | + // 检查课程是否在开课时间内, course_start_time 开课时间, course_end_time 停课时间 | ||
| 597 | + if (!course.value.is_in_course_time) { | ||
| 598 | + showDialog({ | ||
| 599 | + title: '温馨提示', | ||
| 600 | + message: `请在指定课程时间: ${course.value.course_start_time} - ${course.value.course_end_time}内操作!`, | ||
| 601 | + confirmButtonText: '知道了', | ||
| 602 | + confirmButtonColor: '#4caf50', | ||
| 603 | + }) | ||
| 604 | + return; | ||
| 605 | + } | ||
| 596 | // 跳转详情 | 606 | // 跳转详情 |
| 597 | router.push(`/studyDetail/${item.id}`) | 607 | router.push(`/studyDetail/${item.id}`) |
| 598 | } | 608 | } | ... | ... |
-
Please register or login to post a comment