ソースを参照

ppt类型字段

黄琪勇 1 ヶ月 前
コミット
77e8edb863
2 ファイル変更6 行追加3 行削除
  1. 5 2
      src/queryParams/index.ts
  2. 1 1
      src/store/pptWork.ts

+ 5 - 2
src/queryParams/index.ts

@@ -1,5 +1,4 @@
 import { reactive } from "vue"
-import router from "@/router"
 
 /** 维护其他系统过来的特殊字段  这里用来记录,以免其他系统传过来的参数混乱 不好维护 */
 export type queryParamsType = {
@@ -7,12 +6,14 @@ export type queryParamsType = {
   fromType: "PLATFORM" | "TEACHER" | "CLASS"
   instrumentId: string
   lessonCoursewareKnowledgeId: string
+  pptResourcesType: "PLATFORM" | "TEACHER" | "CLASS"
 }
 const queryParams = reactive<queryParamsType>({
   hideFullScreen: false, // 隐藏预览时候的全屏按钮
   fromType: "TEACHER", // 用于区分老师端 平台,或者学生端
   lessonCoursewareKnowledgeId: "", // 课件id 老师端带过来查相关课件
-  instrumentId: "" // 传过来的乐器值,用于ppt里面云教练带什么乐器
+  instrumentId: "", // 传过来的乐器值,用于ppt里面云教练带什么乐器
+  pptResourcesType: "TEACHER" // ppt查看资源类型 用来查询ppt数据  学生端有多种场景资源数据
 })
 
 export function initQueryParams() {
@@ -20,10 +21,12 @@ export function initQueryParams() {
   if (paramsFromUrl) {
     const hideFullScreen = !!paramsFromUrl.get("hideFullScreen")
     const fromType = paramsFromUrl.get("fromType")
+    const pptResourcesType = paramsFromUrl.get("pptResourcesType")
     const lessonCoursewareKnowledgeId = paramsFromUrl.get("lessonCoursewareKnowledgeId")
     const instrumentId = paramsFromUrl.get("instrumentId")
     queryParams.hideFullScreen = hideFullScreen
     fromType && (queryParams.fromType = fromType as any)
+    pptResourcesType && (queryParams.pptResourcesType = pptResourcesType as any)
     lessonCoursewareKnowledgeId && (queryParams.lessonCoursewareKnowledgeId = lessonCoursewareKnowledgeId as any)
     instrumentId && (queryParams.instrumentId = instrumentId as any)
   }

+ 1 - 1
src/store/pptWork.ts

@@ -29,7 +29,7 @@ const useStore = defineStore("pptWork", {
     async initPPTData() {
       if (this.id) {
         LoadingBar.loading(true, "资源加载中,请稍等...")
-        const res = await httpAjaxErrMsg(getTeacherChapterKnowledgeMaterial, this.id, queryParams.fromType)
+        const res = await httpAjaxErrMsg(getTeacherChapterKnowledgeMaterial, this.id, queryParams.pptResourcesType)
         if (res.code === 200) {
           const { dataJson, chapterLessonCoursewareName } = res.data || {}
           const { coverImg, jsonUrl } = JSON.parse(dataJson)