du
2025-04-10 97cf80e3d1dbd933437c1f930d78065f62e82739
字幕查看
已修改1个文件
37 ■■■■■ 文件已修改
easegen-front/src/views/myCourse/index.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
easegen-front/src/views/myCourse/index.vue
@@ -95,14 +95,7 @@
            >
              {{t('myCourse.downloadVideo')}}
            </el-button>
            <el-button
              v-if="scope.row.subtitlesUrl"
              link
              type="primary"
              @click="handleDownload(scope.row.subtitlesUrl,scope.row.courseName)"
            >
              {{t('myCourse.downloadSubtitles')}}
            </el-button>
          </template>
          <template v-if=" scope.row.status == 3">
            <el-button
@@ -113,13 +106,16 @@
              {{t('myCourse.resynthesize')}}
            </el-button>
          </template>
          <el-button
            link
            type="primary"
            @click="openSubtitleDialog(scope.row.id)"
          >
            字幕
          </el-button>
          <template v-if="scope.row.status == 2">
            <el-button
              link
              type="primary"
              @click="openSubtitleDialog(scope.row.id)"
            >
              字幕
            </el-button>
          </template>
          <el-button
            link
            type="danger"
@@ -213,6 +209,14 @@
            resize="none"
          />
          <el-button
            style="margin-top: 20px;float: right;margin-left: 20px"
            type="primary"
            :disabled="!subtitleForm.subtitlesUrl"
            @click="handleDownload(subtitleForm.subtitlesUrl,subtitleForm.courseName)"
          >
            {{t('myCourse.downloadSubtitles')}}
          </el-button>
          <el-button
            style="margin-top: 20px;float: right"
            type="primary"
            @click="saveSubtitles"
@@ -221,6 +225,7 @@
          >
            保存字幕
          </el-button>
        </div>
      </el-form-item>
@@ -419,6 +424,8 @@
    }
    if (videoDetail.subtitlesStatus === 2) { // 2 表示字幕已生成
      if (videoDetail.subtitlesUrl) {
        subtitleForm.subtitlesUrl = videoDetail.subtitlesUrl
        subtitleForm.courseName=videoDetail.courseName
        try {
          // 尝试从URL获取字幕内容
          const response = await fetch(videoDetail.subtitlesUrl)