hookehuyr

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

统一课程审核状态提示的交互方式,使用dialog替代toast以提升用户体验
...@@ -575,8 +575,13 @@ const toggleSchedule = () => { ...@@ -575,8 +575,13 @@ const toggleSchedule = () => {
575 */ 575 */
576 const handleViewCourse = () => { 576 const handleViewCourse = () => {
577 // 检查课程审核状态 577 // 检查课程审核状态
578 - if (course.value.is_approval_enable === false) { 578 + if (!course.value.is_approval_enable) {
579 - showToast('购买的课程正在审核中,请稍后再试'); 579 + showDialog({
580 + title: '温馨提示',
581 + message: '购买的课程正在审核中,请稍后再试',
582 + confirmButtonText: '知道了',
583 + confirmButtonColor: '#4caf50',
584 + })
580 return; 585 return;
581 } 586 }
582 router.push(`/profile/studyCourse/${course.value.id}`); 587 router.push(`/profile/studyCourse/${course.value.id}`);
...@@ -590,8 +595,13 @@ const goToStudyDetail = (item) => { ...@@ -590,8 +595,13 @@ const goToStudyDetail = (item) => {
590 return; 595 return;
591 } 596 }
592 // 检查课程审核状态 597 // 检查课程审核状态
593 - if (course.value.is_approval_enable === false) { 598 + if (!course.value.is_approval_enable) {
594 - showToast('购买的课程正在审核中,请稍后再试'); 599 + showDialog({
600 + title: '温馨提示',
601 + message: '购买的课程正在审核中,请稍后再试',
602 + confirmButtonText: '知道了',
603 + confirmButtonColor: '#4caf50',
604 + })
595 return; 605 return;
596 } 606 }
597 // 检查课程是否在开课时间内, course_start_time 开课时间, course_end_time 停课时间 607 // 检查课程是否在开课时间内, course_start_time 开课时间, course_end_time 停课时间
...@@ -666,8 +676,13 @@ const handleCheckInSubmit = async () => { ...@@ -666,8 +676,13 @@ const handleCheckInSubmit = async () => {
666 */ 676 */
667 const goToCheckin = () => { 677 const goToCheckin = () => {
668 // 检查课程审核状态 678 // 检查课程审核状态
669 - if (course.value.is_approval_enable === false) { 679 + if (!course.value.is_approval_enable) {
670 - showToast('购买的课程正在审核中,请稍后再试'); 680 + showDialog({
681 + title: '温馨提示',
682 + message: '购买的课程正在审核中,请稍后再试',
683 + confirmButtonText: '知道了',
684 + confirmButtonColor: '#4caf50',
685 + })
671 return; 686 return;
672 } 687 }
673 if(!default_list.value.length) { 688 if(!default_list.value.length) {
......