hookehuyr

refactor: 移除未使用的组件和注释代码,优化导航点击处理

移除首页和学习详情页中未使用的标签导航和直播卡片组件
将社区导航改为显示提示而非跳转
修复视频播放器的可选链访问问题
<!--
* @Date: 2025-03-20 20:36:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-21 10:20:44
* @LastEditTime: 2025-06-10 15:27:23
* @FilePath: /mlaj/src/components/layout/BottomNav.vue
* @Description: 文件描述
-->
......@@ -40,6 +40,7 @@
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useAuth } from '@/contexts/auth'
import { showToast } from 'vant'
const route = useRoute()
const router = useRouter()
......@@ -74,7 +75,8 @@ const isActive = (path) => {
const handleNavClick = (item) => {
if (item.path === '/community') {
window.open('https://community.mlaj.com', '_blank')
showToast('功能暂未开放')
// window.open('https://community.mlaj.com', '_blank')
return
}
if (item.path === '/profile' && !currentUser.value) {
......
......@@ -249,7 +249,7 @@
</div>
<!-- Custom Tab Navigation -->
<div class="sticky top-0 bg-white/70 backdrop-blur-lg" style="z-index: 9;">
<!-- <div class="sticky top-0 bg-white/70 backdrop-blur-lg" style="z-index: 9;">
<div class="px-4 border-b border-gray-200">
<div class="flex space-x-6">
<button
......@@ -273,7 +273,7 @@
</button>
</div>
</div>
</div>
</div> -->
<!-- Content Based on Active Tab -->
<div class="px-4 mt-5" ref="contentRef">
......
......@@ -24,7 +24,7 @@
</div>
<!-- Today's Live -->
<div class="px-4 mb-4">
<!--<div class="px-4 mb-4">
<div class="flex items-center mb-2">
<h2 class="font-medium">今日直播</h2>
<div
......@@ -38,7 +38,7 @@
</div>
</div>
<!-- Live Stream Cards -->
<!~~ Live Stream Cards ~~>
<div class="grid grid-cols-2 gap-4">
<LiveStreamCard
v-for="stream in liveStreams"
......@@ -46,7 +46,7 @@
:stream="stream"
/>
</div>
</div>
</div>-->
<!-- Value Online Courses -->
<div class="px-4 mb-4">
......
......@@ -23,7 +23,7 @@
</div>
<!-- 视频播放器 -->
<VideoPlayer v-show="isPlaying" ref="videoPlayerRef"
:video-url="courseFile.list.length ? courseFile['list'][0]['url'] : ''" :autoplay="false"
:video-url="courseFile?.list?.length ? courseFile['list'][0]['url'] : ''" :autoplay="false"
@onPlay="handleVideoPlay" @onPause="handleVideoPause" />
</div>
<div v-if="course.course_type === 'audio'" class="w-full relative"
......