Преглед изворни кода

```
refactor(App): 移除登录成功回调注释

移除handleLoginSuccess函数中的冗余注释代码,保持代码简洁性。

delete(CourseDetail): 删除课程详情页面组件

删除整个CourseDetail.vue文件,该组件不再被使用。

delete(MyLearning): 删除我的学习页面组件

删除MyLearning.vue文件,该功能模块已被重构替换。

delete(MyLearningHome): 删除我的学习主页组件

删除MyLearningHome.vue文件,相关路由结构已调整。

delete(HomeOld): 删除旧版首页组件

删除HomeOld.vue文件,已迁移至新版首页实现。

feat(workflowTrade): 优化工作流交易页面UI样式

- 为搜索按钮和创建按钮添加渐变效果类名gradient
- 将分类标签从el-button替换为el-tag组件,提升标签显示效果
- 为报名按钮添加渐变样式类,统一视觉风格

refactor(router): 清理废弃的路由配置

移除课程详情、我的学习等废弃的路由配置,精简路由表结构。
```

zhangningning пре 1 недеља
родитељ
комит
f00306cca7

+ 0 - 1
src/App.vue

@@ -119,7 +119,6 @@ const openLoginDialog = () => {
 // 处理登录成功
 const handleLoginSuccess = () => {
   console.log('登录成功')
-  // 可以在这里处理登录后的逻辑,比如更新用户信息、刷新页面等
 }
 //
 function goMyLearning() {

+ 0 - 290
src/pages/CourseDetail.vue

@@ -1,290 +0,0 @@
-<template>
-  <div class="course-detail-page" v-if="currentCourse">
-    <!-- <el-page-header @back="goBack">
-      <template #content>{{ currentCourse.title }}</template>
-    </el-page-header> -->
-    <Breadcrumb />
-    
-    <div class="course-detail">
-      <div class="course-main">
-        <div class="course-video">
-          <!-- 视频播放器占位 -->
-          <div class="video-player">
-            <VideoPlayer 
-              ref="videoPlayer"
-              :src="currentVideoUrl"
-              :poster="currentCourse.cover"
-              @play="onPlayerPlay"
-              @pause="onPlayerPause"
-              @ended="onPlayerEnded"
-              @timeupdate="onPlayerTimeupdate"
-              @loadedmetadata="onPlayerLoadedmetadata"
-              @error="onPlayerError"
-              @ready="onPlayerReady"
-            />
-            <!-- <img :src="currentCourse.cover" :alt="currentCourse.title">
-            <div class="play-button">▶</div> -->
-          </div>
-          
-          <div class="video-info">
-            <h2>{{ currentCourse.title }}</h2>
-            <div class="course-meta">
-              <span>讲师:{{ currentCourse.teacher }}</span>
-              <span>价格:¥{{ currentCourse.price }}</span>
-            </div>
-            <p class="course-desc">{{ currentCourse.description }}</p>
-            <el-button type="primary" size="large">立即学习</el-button>
-          </div>
-        </div>
-        
-        <div class="course-chapters">
-          <h3>课程章节</h3>
-          <el-collapse>
-            <el-collapse-item 
-              v-for="chapter in currentCourseChapters" 
-              :key="chapter.id" 
-              :title="chapter.title"
-               @click="playVideo(video)"
-            >
-              <div 
-                v-for="video in chapter.videos" 
-                :key="video.id" 
-                class="chapter-video"
-              >
-                <el-icon><VideoPlay /></el-icon>
-                {{ video.title }} ({{ video.duration }})
-              </div>
-            </el-collapse-item>
-          </el-collapse>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { onMounted,ref } from 'vue'
-import { useRoute, useRouter } from 'vue-router'
-import { useCourseStore } from '@/pinia/courseStore'
-import { VideoPlay } from '@element-plus/icons-vue'
-import VideoPlayer from '@/components/VideoPlayer.vue'
-import DGTMessage from '@/utils/message'
-
-const route = useRoute()
-const router = useRouter()
-const courseStore = useCourseStore()
-
-const courseId = route.params.id
-const currentCourse = ref(null)
-const currentCourseChapters = ref(null)
-
-const videoPlayer = ref(null)
-// const currentVideoUrl = ref('')
-// const currentVideoUrl = ref('http://jcxxpt.oss-cn-beijing.aliyuncs.com/common/2025/12/19/actmOvmq0xOBc8448561c73a066a523821c6f7ae4868_20251219094240A008.mp4')
-// const currentVideoUrl = ref('http://baomiai.oss-cn-shanghai.aliyuncs.com/video/2025/12/30/123_20251226133117A047_20251230095248A001.mp4?response-content-disposition=inline&response-content-type=video%2Fmp4&x-oss-date=20251230T015258Z&x-oss-expires=7200&x-oss-signature-version=OSS4-HMAC-SHA256&x-oss-credential=LTAI5tG5dEtkqwDGcU6AtaYE%2F20251230%2Fcn-shanghai%2Foss%2Faliyun_v4_reque')
-const currentVideoUrl = ref('http://baomiai.oss-cn-shanghai.aliyuncs.com/video/2025/12/30/123_20251226133117A047_20251230095248A001.mp4?response-content-disposition=inline&x-oss-date=20251230T015720Z&x-oss-expires=7199&x-oss-signature-version=OSS4-HMAC-SHA256&x-oss-credential=LTAI5tG5dEtkqwDGcU6AtaYE%2F20251230%2Fcn-shanghai%2Foss%2Faliyun_v4_request&x-oss-signature=f93c20421dcfdc6822cd03d42ae66f8a28acd2c4d25c79ce16e2312537eabaa5')
-const currentPlayingVideoId = ref(null)
-const currentVideoDuration = ref(0)
-const currentPlayTime = ref(0)
-
-
-onMounted(() => {
-  courseStore.fetchCourseDetail(courseId)
-  courseStore.fetchCourseChapters(courseId)
-  
-  currentCourse.value = courseStore.currentCourse
-  currentCourseChapters.value = courseStore.currentCourseChapters
-})
-
-const goBack = () => {
-  router.back()
-}
-
-
-
-// 播放指定视频
-const playVideo = (video) => {
-  if (!video) return
-  
-  // 更新当前播放的视频ID
-  currentPlayingVideoId.value = video.id
-  
-  // 这里可以根据video.id从API获取实际的视频地址
-  // 暂时使用模拟地址
-  const videoUrl = `https://example.com/videos/${video.id}.mp4`
-  
-  // 更新视频源
-  currentVideoUrl.value = videoUrl
-  
-  // 播放视频
-  if (videoPlayer.value) {
-    videoPlayer.value.play()
-  }
-}
-
-// 播放器事件处理
-const onPlayerPlay = () => {
-  console.log('视频开始播放')
-}
-
-const onPlayerPause = () => {
-  console.log('视频暂停')
-}
-
-const onPlayerEnded = () => {
-  console.log('视频播放结束')
-  
-  // 自动播放下一个视频
-  playNextVideo()
-}
-
-const onPlayerTimeupdate = (time) => {
-  currentPlayTime.value = time
-  // 这里可以保存播放进度
-  console.log('当前播放时间:', time)
-}
-
-const onPlayerLoadedmetadata = (duration) => {
-  currentVideoDuration.value = duration
-  console.log('视频时长:', duration)
-}
-
-const onPlayerError = (error) => {
-  console.error('视频播放错误:', error)
-  DGTMessage.error('视频播放失败,请稍后再试')
-}
-
-const onPlayerReady = (player) => {
-  console.log('播放器就绪', player)
-  // 可以在这里进行高级操作
-}
-
-// 播放下一个视频
-const playNextVideo = () => {
-  if (!currentCourseChapters.value || currentPlayingVideoId.value === null) return
-  
-  // 查找当前播放视频的位置
-  let currentIndex = -1
-  let chapterIndex = -1
-  
-  for (let i = 0; i < currentCourseChapters.value.length; i++) {
-    const chapter = currentCourseChapters.value[i]
-    const index = chapter.videos.findIndex(v => v.id === currentPlayingVideoId.value)
-    
-    if (index !== -1) {
-      chapterIndex = i
-      currentIndex = index
-      break
-    }
-  }
-  
-  // 如果找到当前视频
-  if (chapterIndex !== -1 && currentIndex !== -1) {
-    const currentChapter = currentCourseChapters.value[chapterIndex]
-    
-    // 如果当前章节还有下一个视频
-    if (currentIndex < currentChapter.videos.length - 1) {
-      playVideo(currentChapter.videos[currentIndex + 1])
-    } 
-    // 如果是当前章节最后一个视频,且有下一个章节
-    else if (chapterIndex < currentCourseChapters.value.length - 1) {
-      playVideo(currentCourseChapters.value[chapterIndex + 1].videos[0])
-    }
-  }
-}
-
-// 格式化时间
-const formatTime = (seconds) => {
-  if (!seconds || isNaN(seconds)) return '00:00'
-  
-  const minutes = Math.floor(seconds / 60)
-  const secs = Math.floor(seconds % 60)
-  return `${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`
-}
-</script>
-
-<style scoped lang="scss">
-
-.course-detail {
-  .course-video {
-    display: flex;
-    gap: 20px;
-    margin-bottom: 40px;
-    // height: 500px; /* 设置容器高度,可根据需要调整 */
-    
-    @media (max-width: 768px) {
-      flex-direction: column;
-    }
-    
-    .video-player {
-      flex: 2;
-      position: relative;
-      // height: 500px;
-      
-      img {
-        width: 100%;
-        height: auto;
-        border-radius: 8px;
-      }
-      
-      .play-button {
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        transform: translate(-50%, -50%);
-        width: 80px;
-        height: 80px;
-        background: rgba(0,0,0,0.5);
-        color: white;
-        border-radius: 50%;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        font-size: 30px;
-        cursor: pointer;
-      }
-    }
-    
-    .video-info {
-      flex: 1;
-      
-      h2 {
-        font-size: 1.8rem;
-        margin-bottom: 15px;
-      }
-      
-      .course-meta {
-        margin-bottom: 15px;
-        color: #666;
-        
-        span {
-          display: block;
-          margin-bottom: 5px;
-        }
-      }
-      
-      .course-desc {
-        margin-bottom: 20px;
-        line-height: 1.6;
-      }
-    }
-  }
-  
-  .course-chapters {
-    h3 {
-      font-size: 1.5rem;
-      margin-bottom: 15px;
-    }
-    
-    .chapter-video {
-      padding: 10px;
-      border-bottom: 1px solid #eee;
-      cursor: pointer;
-      
-      &:hover {
-        background-color: #f5f5f5;
-      }
-    }
-  }
-}
-</style>

+ 0 - 166
src/pages/HomeOld.vue

@@ -1,166 +0,0 @@
-<template>
-  <div class="home-page container">
-    <!-- 使用 BlockNote 编辑器 -->
-    <BlockNoteEditor v-model="editorContent" @getHtml="getHtml" :editable="true"/>
-    <!-- <div v-html="editorContent_html"></div> -->
-    <div class="banner">
-      <h1>欢迎来到视频学习平台</h1>
-      <p>发现优质课程,提升你的技能</p>
-    </div>
-    
-    <div class="course-list">
-      <h2>热门课程</h2>
-      <div class="course-grid">
-        <div 
-          v-for="course in courseList" 
-          :key="course.id" 
-          class="course-card"
-          @click="goToCourseDetail(course.id, course.title)"
-        >
-          <img :src="course.cover" :alt="course.title" class="course-cover">
-          <div class="course-info">
-            <h3>{{ course.title }}</h3>
-            <p>讲师:{{ course.teacher }}</p>
-            <div class="course-price">¥{{ course.price }}</div>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { onMounted,ref } from 'vue'
-import { useRouter } from 'vue-router'
-import { useCourseStore } from '../pinia/courseStore'
-
-// 导入封装好的 BlockNote 组件
-import BlockNoteEditor from '@/components/BlockNoteEditor.vue';
-
-// 绑定编辑器内容
-// [
-//   {
-//     type: "paragraph",
-//     content: [{ type: "text", text: "只读模式" }]
-//   }
-// ]
-
-const editorContent = ref(
-  [
-    {
-      type: "paragraph",
-      content: [{ type: "text", text: "只读模式" }]
-    },
-    {
-    "id": "378ce968-02c2-4856-888b-c35a355aa84b",
-    "type": "codeBlock",
-    "props": {
-        "language": "text"
-    },
-    "content": [],
-    "children": []
-    }
-  ]
-);
-const editorContent_html = ref();
-
-const router = useRouter()
-const courseStore = useCourseStore()
-const courseList = ref([])
-
-onMounted(() => {
-  console.log('Home mounted')
-  courseStore.fetchCourseList()
-  courseList.value = courseStore.courseList;
-})
-
-const getHtml = (html) => {
-  editorContent_html.value = html
-}
-
-const goToCourseDetail = (id,title) => {
-  //增加参数名称
-  router.push({
-    path: `/course/${id}`,
-    query: {
-      title: title
-    }
-  })
-}
-
-</script>
-
-<style scoped lang="scss">
-
-.banner {
-  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-  color: white;
-  padding: 60px 20px;
-  text-align: center;
-  border-radius: 8px;
-  margin-bottom: 40px;
-  
-  h1 {
-    font-size: 2.5rem;
-    margin-bottom: 10px;
-  }
-  
-  p {
-    font-size: 1.2rem;
-    opacity: 0.9;
-  }
-}
-
-.course-list {
-  h2 {
-    font-size: 1.8rem;
-    margin-bottom: 20px;
-    border-bottom: 2px solid #eee;
-    padding-bottom: 10px;
-  }
-  
-  .course-grid {
-    display: grid;
-    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
-    gap: 20px;
-  }
-  
-  .course-card {
-    border: 1px solid #eee;
-    border-radius: 8px;
-    overflow: hidden;
-    cursor: pointer;
-    transition: transform 0.3s;
-    
-    &:hover {
-      transform: translateY(-5px);
-      box-shadow: 0 5px 15px rgba(0,0,0,0.1);
-    }
-    
-    .course-cover {
-      width: 100%;
-      height: 180px;
-      object-fit: cover;
-    }
-    
-    .course-info {
-      padding: 15px;
-      
-      h3 {
-        margin-bottom: 8px;
-        font-size: 1.1rem;
-      }
-      
-      p {
-        color: #666;
-        margin-bottom: 10px;
-      }
-      
-      .course-price {
-        color: #e63946;
-        font-weight: bold;
-      }
-    }
-  }
-}
-</style>

+ 0 - 324
src/pages/MyLearning.vue

@@ -1,324 +0,0 @@
-<template>
-  <div class="my-learning-page">
-    <!-- <el-page-header content="我的学习"></el-page-header> -->
-    <!-- <Breadcrumb /> -->
-    
-    <!-- 学习统计卡片 -->
-    <div class="learning-stats">
-      <el-card shadow="hover" class="stat-card">
-        <div class="stat-item">
-          <!-- <i class="el-icon-video-play"></i> -->
-          <el-icon><VideoPlay /></el-icon>
-          <div class="stat-info">
-            <p class="stat-label">已购课程</p>
-            <p class="stat-value">{{ myCourses.length }}</p>
-          </div>
-        </div>
-      </el-card>
-      
-      <el-card shadow="hover" class="stat-card">
-        <div class="stat-item">
-          <el-icon><Clock /></el-icon>
-          <div class="stat-info">
-            <p class="stat-label">学习时长</p>
-            <p class="stat-value">{{ studyTime }} 小时</p>
-          </div>
-        </div>
-      </el-card>
-      
-      <el-card shadow="hover" class="stat-card">
-        <div class="stat-item">
-          <el-icon><Check /></el-icon>
-          <div class="stat-info">
-            <p class="stat-label">已完成课程</p>
-            <p class="stat-value">{{ completedCourses }}</p>
-          </div>
-        </div>
-      </el-card>
-    </div>
-    
-    <!-- 已购课程列表 -->
-    <div class="my-courses">
-      <h2>我的课程</h2>
-      <div v-if="myCourses.length === 0" class="no-courses">
-        <el-empty description="你还没有购买任何课程"></el-empty>
-        <el-button type="primary" @click="$router.push('/')">去选课</el-button>
-      </div>
-      
-      <div v-else class="course-list">
-        <el-card 
-          v-for="course in myCourses" 
-          :key="course.id" 
-          class="my-course-card"
-        >
-          <div class="course-header">
-            <img :src="course.cover" :alt="course.title" class="course-cover">
-            <div class="course-info">
-              <h3>{{ course.title }}</h3>
-              <p>讲师:{{ course.teacher }}</p>
-              <div class="progress-container">
-                <el-progress class="flex_1 gap10"
-                  :percentage="course.progress" 
-                  :status="course.progress === 100 ? 'success' : ''"
-                ></el-progress>
-                <!-- <span class="progress-text">{{ course.progress }}%</span> -->
-              </div>
-            </div>
-          </div>
-          
-          <div class="course-actions">
-            <el-button 
-              type="primary" 
-              @click="continueLearning(course.id)"
-            >
-              <el-icon><VideoPlay /></el-icon>
-              继续学习
-            </el-button>
-            <el-button 
-              type="text" 
-              @click="toggleCollect(course.id)"
-            >
-              <el-icon><StarFilled /></el-icon>
-              {{ course.isCollected ? '取消收藏' : '收藏' }}
-            </el-button>
-          </div>
-        </el-card>
-      </div>
-      
-      <!-- 最近学习记录 -->
-      <div class="recent-learning" v-if="recentRecords.length > 0">
-        <h2>最近学习</h2>
-        <el-table :data="recentRecords" border style="width: 100%">
-          <el-table-column label="课程" prop="courseTitle"></el-table-column>
-          <el-table-column label="最近学习视频" prop="videoTitle"></el-table-column>
-          <el-table-column label="学习时间" prop="studyTime"></el-table-column>
-          <el-table-column label="操作">
-            <template #default="scope">
-              <el-button 
-                type="text" 
-                @click="continueLearning(scope.row.courseId)"
-              >
-                继续学习
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-// import { VideoPlay, Clock, Check,StarFilled } from '@element-plus/icons-vue'
-// import { ElProgress } from 'element-plus'
-import { ref, computed } from 'vue'
-import { useRouter } from 'vue-router'
-
-const router = useRouter()
-
-// 模拟已购课程数据(实际项目中从 Pinia 或接口获取)
-const myCourses = ref([
-  {
-    id: 1,
-    title: 'Vue 3 从入门到精通',
-    cover: 'https://picsum.photos/400/225?random=1',
-    teacher: '张三',
-    progress: 65, // 学习进度(百分比)
-    isCollected: true // 是否收藏
-  },
-  {
-    id: 2,
-    title: 'JavaScript 高级编程',
-    cover: 'https://picsum.photos/400/225?random=2',
-    teacher: '李四',
-    progress: 30,
-    isCollected: false
-  }
-])
-
-// 模拟最近学习记录
-const recentRecords = ref([
-  {
-    courseId: 1,
-    courseTitle: 'Vue 3 从入门到精通',
-    videoTitle: 'Composition API 基础',
-    studyTime: '2025-01-15 19:30'
-  },
-  {
-    courseId: 2,
-    courseTitle: 'JavaScript 高级编程',
-    videoTitle: '闭包与作用域',
-    studyTime: '2025-01-14 16:45'
-  }
-])
-
-// 计算属性:学习时长(模拟数据,实际可累加视频观看时长)
-const studyTime = computed(() => {
-  // 简单模拟:每个课程进度每10%对应1小时学习时长
-  return myCourses.value.reduce((total, course) => {
-    return total + Math.floor(course.progress / 10)
-  }, 0)
-})
-
-// 计算属性:已完成课程数(进度100%)
-const completedCourses = computed(() => {
-  return myCourses.value.filter(course => course.progress === 100).length
-})
-
-// 继续学习(跳转到课程详情页)
-const continueLearning = (courseId) => {
-  router.push(`/my-learning/course/${courseId}`)
-}
-
-// 收藏/取消收藏课程
-const toggleCollect = (courseId) => {
-  const course = myCourses.value.find(item => item.id === courseId)
-  if (course) {
-    course.isCollected = !course.isCollected
-    // 实际项目中这里需要调用接口保存状态到后端
-  }
-}
-</script>
-
-<style scoped lang="scss">
-
-// 学习统计卡片
-.learning-stats {
-  display: flex;
-  gap: 20px;
-  margin-bottom: 30px;
-  flex-wrap: wrap;
-  
-  .stat-card {
-    flex: 1;
-    min-width: 200px;
-    
-    .stat-item {
-      display: flex;
-      align-items: center;
-      padding: 15px 0;
-      
-      i {
-        font-size: 2rem;
-        color: $primary-color;
-        margin-right: 15px;
-      }
-      
-      .stat-label {
-        color: $text-light-color;
-        font-size: 0.9rem;
-        margin-bottom: 5px;
-      }
-      
-      .stat-value {
-        font-size: 1.8rem;
-        font-weight: bold;
-      }
-    }
-  }
-}
-
-// 我的课程列表
-.my-courses {
-  h2 {
-    font-size: 1.5rem;
-    margin-bottom: 15px;
-    border-bottom: 2px solid $border-color;
-    padding-bottom: 10px;
-  }
-  
-  .no-courses {
-    text-align: center;
-    padding: 50px 0;
-    
-    .el-empty {
-      margin-bottom: 20px;
-    }
-  }
-  
-  .course-list {
-    display: grid;
-    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
-    gap: 20px;
-  }
-  
-  .my-course-card {
-    display: flex;
-    flex-direction: column;
-    height: 100%;
-    
-    .course-header {
-      display: flex;
-      gap: 15px;
-      margin-bottom: 15px;
-      
-      .course-cover {
-        width: 120px;
-        height: 80px;
-        object-fit: cover;
-        border-radius: 4px;
-      }
-      
-      .course-info {
-        flex: 1;
-        
-        h3 {
-          font-size: 1.1rem;
-          margin-bottom: 8px;
-          display: -webkit-box;
-          -webkit-line-clamp: 1;
-          -webkit-box-orient: vertical;
-          overflow: hidden;
-        }
-        
-        p {
-          color: $text-light-color;
-          font-size: 0.9rem;
-          margin-bottom: 8px;
-        }
-        
-        .progress-container {
-          display: flex;
-          align-items: center;
-          // gap: 10px;
-          
-          .progress-text {
-            font-size: 0.8rem;
-            color: $text-light-color;
-          }
-        }
-      }
-    }
-    
-    .course-actions {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin-top: auto;
-    }
-  }
-}
-
-// 最近学习记录
-.recent-learning {
-  margin-top: 40px;
-  
-  h2 {
-    font-size: 1.5rem;
-    margin-bottom: 15px;
-    border-bottom: 2px solid $border-color;
-    padding-bottom: 10px;
-  }
-}
-
-// 响应式调整
-@media (max-width: 768px) {
-  .learning-stats {
-    flex-direction: column;
-  }
-  
-  .my-courses .course-list {
-    grid-template-columns: 1fr;
-  }
-}
-</style>

+ 0 - 220
src/pages/MyLearningHome.vue

@@ -1,220 +0,0 @@
-<template>
-  <div class="my-learning-page container">
-    <router-view />
-  </div>
-</template>
-
-<script setup>
-// import { VideoPlay, Clock, Check,StarFilled } from '@element-plus/icons-vue'
-// import { ElProgress } from 'element-plus'
-import { ref, computed } from 'vue'
-import { useRouter } from 'vue-router'
-
-const router = useRouter()
-
-// 模拟已购课程数据(实际项目中从 Pinia 或接口获取)
-const myCourses = ref([
-  {
-    id: 1,
-    title: 'Vue 3 从入门到精通',
-    cover: 'https://picsum.photos/400/225?random=1',
-    teacher: '张三',
-    progress: 65, // 学习进度(百分比)
-    isCollected: true // 是否收藏
-  },
-  {
-    id: 2,
-    title: 'JavaScript 高级编程',
-    cover: 'https://picsum.photos/400/225?random=2',
-    teacher: '李四',
-    progress: 30,
-    isCollected: false
-  }
-])
-
-// 模拟最近学习记录
-const recentRecords = ref([
-  {
-    courseId: 1,
-    courseTitle: 'Vue 3 从入门到精通',
-    videoTitle: 'Composition API 基础',
-    studyTime: '2025-01-15 19:30'
-  },
-  {
-    courseId: 2,
-    courseTitle: 'JavaScript 高级编程',
-    videoTitle: '闭包与作用域',
-    studyTime: '2025-01-14 16:45'
-  }
-])
-
-// 计算属性:学习时长(模拟数据,实际可累加视频观看时长)
-const studyTime = computed(() => {
-  // 简单模拟:每个课程进度每10%对应1小时学习时长
-  return myCourses.value.reduce((total, course) => {
-    return total + Math.floor(course.progress / 10)
-  }, 0)
-})
-
-// 计算属性:已完成课程数(进度100%)
-const completedCourses = computed(() => {
-  return myCourses.value.filter(course => course.progress === 100).length
-})
-
-// 继续学习(跳转到课程详情页)
-const continueLearning = (courseId) => {
-  router.push(`/my-learning/course/${courseId}`)
-}
-
-// 收藏/取消收藏课程
-const toggleCollect = (courseId) => {
-  const course = myCourses.value.find(item => item.id === courseId)
-  if (course) {
-    course.isCollected = !course.isCollected
-    // 实际项目中这里需要调用接口保存状态到后端
-  }
-}
-</script>
-
-<style scoped lang="scss">
-
-// 学习统计卡片
-.learning-stats {
-  display: flex;
-  gap: 20px;
-  margin-bottom: 30px;
-  flex-wrap: wrap;
-  
-  .stat-card {
-    flex: 1;
-    min-width: 200px;
-    
-    .stat-item {
-      display: flex;
-      align-items: center;
-      padding: 15px 0;
-      
-      i {
-        font-size: 2rem;
-        color: $primary-color;
-        margin-right: 15px;
-      }
-      
-      .stat-label {
-        color: $text-light-color;
-        font-size: 0.9rem;
-        margin-bottom: 5px;
-      }
-      
-      .stat-value {
-        font-size: 1.8rem;
-        font-weight: bold;
-      }
-    }
-  }
-}
-
-// 我的课程列表
-.my-courses {
-  h2 {
-    font-size: 1.5rem;
-    margin-bottom: 15px;
-    border-bottom: 2px solid $border-color;
-    padding-bottom: 10px;
-  }
-  
-  .no-courses {
-    text-align: center;
-    padding: 50px 0;
-    
-    .el-empty {
-      margin-bottom: 20px;
-    }
-  }
-  
-  .course-list {
-    display: grid;
-    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
-    gap: 20px;
-  }
-  
-  .my-course-card {
-    display: flex;
-    flex-direction: column;
-    height: 100%;
-    
-    .course-header {
-      display: flex;
-      gap: 15px;
-      margin-bottom: 15px;
-      
-      .course-cover {
-        width: 120px;
-        height: 80px;
-        object-fit: cover;
-        border-radius: 4px;
-      }
-      
-      .course-info {
-        flex: 1;
-        
-        h3 {
-          font-size: 1.1rem;
-          margin-bottom: 8px;
-          display: -webkit-box;
-          -webkit-line-clamp: 1;
-          -webkit-box-orient: vertical;
-          overflow: hidden;
-        }
-        
-        p {
-          color: $text-light-color;
-          font-size: 0.9rem;
-          margin-bottom: 8px;
-        }
-        
-        .progress-container {
-          display: flex;
-          align-items: center;
-          // gap: 10px;
-          
-          .progress-text {
-            font-size: 0.8rem;
-            color: $text-light-color;
-          }
-        }
-      }
-    }
-    
-    .course-actions {
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-      margin-top: auto;
-    }
-  }
-}
-
-// 最近学习记录
-.recent-learning {
-  margin-top: 40px;
-  
-  h2 {
-    font-size: 1.5rem;
-    margin-bottom: 15px;
-    border-bottom: 2px solid $border-color;
-    padding-bottom: 10px;
-  }
-}
-
-// 响应式调整
-@media (max-width: 768px) {
-  .learning-stats {
-    flex-direction: column;
-  }
-  
-  .my-courses .course-list {
-    grid-template-columns: 1fr;
-  }
-}
-</style>

+ 6 - 6
src/pages/workflowTrade/workflowTrade.vue

@@ -12,12 +12,12 @@
               :placeholder="$t('common.qingshuruyaosousuodegongzuoliu')"
               class="search-input"
             />
-            <button class="search-btn bg_color_primary" @click.stop.prevent="getList('init')">
+            <button class="search-btn bg_color_primary gradient" @click.stop.prevent="getList('init')">
               <img :src="searchIcon" alt="" class="icon-search">
               {{$t('common.shousuo')}}
             </button>
           </div>
-          <button class="create-btn bg_color_primary" @click.stop.prevent="goWorkflowAdd">
+          <button class="create-btn bg_color_primary gradient" @click.stop.prevent="goWorkflowAdd">
             <img :src="addIcon" alt="" class="icon-add">
             {{$t('common.fabuxuqiu')}}
           </button>
@@ -91,9 +91,9 @@
               <div class="font_size24 color_price bold">¥{{item.budgetMin}}-{{item.budgetMax}}</div>
             </div>
             <div class="gap10 mt10">
-              <el-button type="primary" size="large" plain>{{item.categoryName1}}</el-button>
-              <el-button type="primary" size="large" plain>{{item.categoryName2}}</el-button>
-              <el-button type="primary" size="large" plain>{{item.categoryName3}}</el-button>
+              <el-tag type="primary" plain>{{item.categoryName1}}</el-tag>
+              <el-tag type="primary" plain>{{item.categoryName2}}</el-tag>
+              <el-tag type="primary" plain>{{item.categoryName3}}</el-tag>
               <div class="gap5">
                 <img :src="yuangong" alt="" style="width: 16px; height: 16px;">
                 <span class="font_size14">{{item.questApplyCount || 0}} {{$t('common.renbaoming')}}</span>
@@ -112,7 +112,7 @@
                 <div class="font_size16 bold">{{item.nickName}}</div>
                 <div class="font_size14 gray mt2">{{item.createTime}} {{$t('common.publish')}}</div>
               </div>
-              <el-button type="primary" size="large" 
+              <el-button type="primary" size="large" class="gradient"
               v-if="item.applyStatus === '1'"
               @click="isLogin({callback: openLoginDialog,t}) && submitSignUp({questId: item.questId,questUserId: item.questUserId},t)">
                 <img :src="zaixianbaomingIcon" alt="" class="mr10" style="width: 16px; height: 16px;">

+ 0 - 39
src/router/index.js

@@ -1,10 +1,5 @@
 import { createRouter, createWebHistory } from 'vue-router'
 import Home from '../pages/Home.vue'
-import CourseDetail from '../pages/CourseDetail.vue'
-import MyLearning from '../pages/MyLearning.vue'
-import MyLearningHome from '../pages/MyLearningHome.vue'
-import Layout from '@/components/Layout.vue'
-import { pa } from 'element-plus/es/locales.mjs'
 
 const routes = [
   {
@@ -179,40 +174,6 @@ const routes = [
     component: () => import('@/pages/Agreement.vue'),
     meta: { title: 'common.agreement' }
   },
-
-
-
-
-
-
-
-  // 一下是demon内容
-  {
-    path: '/course/:id',
-    name: 'CourseDetail2',
-    component: CourseDetail,
-    meta: { title: 'route.courseDetail' }
-  },
-  {
-    path: '/my-learning',
-    name: 'MyLearningHome',
-    component: Layout,
-    meta: { title: 'route.myLearning' },
-    children: [
-      {
-        path: '',
-        name: 'MyLearning',
-        component: MyLearning,
-        meta: { title: 'route.myLearning' }
-      },
-      {
-        path: 'course/:id',
-        name: 'MyLearningCourseDetail',
-        component: CourseDetail,
-        meta: { title: 'route.myLearningCourseDetail' }
-      }
-    ]
-  },
   // 404 路由
   {
     path: '/:pathMatch(.*)*',