hookehuyr

fix(课程详情页): 将审核状态提示从toast改为dialog

统一课程审核状态提示的交互方式,使用dialog替代toast以提升用户体验
......@@ -575,8 +575,13 @@ const toggleSchedule = () => {
*/
const handleViewCourse = () => {
// 检查课程审核状态
if (course.value.is_approval_enable === false) {
showToast('购买的课程正在审核中,请稍后再试');
if (!course.value.is_approval_enable) {
showDialog({
title: '温馨提示',
message: '购买的课程正在审核中,请稍后再试',
confirmButtonText: '知道了',
confirmButtonColor: '#4caf50',
})
return;
}
router.push(`/profile/studyCourse/${course.value.id}`);
......@@ -590,8 +595,13 @@ const goToStudyDetail = (item) => {
return;
}
// 检查课程审核状态
if (course.value.is_approval_enable === false) {
showToast('购买的课程正在审核中,请稍后再试');
if (!course.value.is_approval_enable) {
showDialog({
title: '温馨提示',
message: '购买的课程正在审核中,请稍后再试',
confirmButtonText: '知道了',
confirmButtonColor: '#4caf50',
})
return;
}
// 检查课程是否在开课时间内, course_start_time 开课时间, course_end_time 停课时间
......@@ -666,8 +676,13 @@ const handleCheckInSubmit = async () => {
*/
const goToCheckin = () => {
// 检查课程审核状态
if (course.value.is_approval_enable === false) {
showToast('购买的课程正在审核中,请稍后再试');
if (!course.value.is_approval_enable) {
showDialog({
title: '温馨提示',
message: '购买的课程正在审核中,请稍后再试',
confirmButtonText: '知道了',
confirmButtonColor: '#4caf50',
})
return;
}
if(!default_list.value.length) {
......