Browse Source

配合 后台

黄琪勇 5 months ago
parent
commit
9b609461ef
4 changed files with 15 additions and 7 deletions
  1. 4 0
      dev-dist/sw.js
  2. 5 1
      public/version.json
  3. 1 1
      src/utils/urlUtils.ts
  4. 5 5
      src/views/attend-class/component/pptList.tsx

+ 4 - 0
dev-dist/sw.js

@@ -82,7 +82,11 @@ define(['./workbox-88bf3160'], (function (workbox) { 'use strict';
     "revision": "3ca0b8505b4bec776b69afdba2768812"
   }, {
     "url": "index.html",
+<<<<<<< Updated upstream
     "revision": "0.4v8s4holqi"
+=======
+    "revision": "0.m978hf0c288"
+>>>>>>> Stashed changes
   }], {});
   workbox.cleanupOutdatedCaches();
   workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

+ 5 - 1
public/version.json

@@ -1 +1,5 @@
-{"version":1735191389349}
+<<<<<<< Updated upstream
+{"version":1735191389349}
+=======
+{"version":1735270986615}
+>>>>>>> Stashed changes

+ 1 - 1
src/utils/urlUtils.ts

@@ -43,7 +43,7 @@ export function vaildPPTUrl() {
   } else if (/dev/.test(url)) {
     returnUrl = 'https://dev.kt.colexiu.com/classroom-ppt';
   } else if (/localhost/.test(url)) {
-    returnUrl = 'http://192.168.3.122:9527';
+    returnUrl = 'http://localhost:9527';
   } else {
     returnUrl = 'https://mec.colexiu.com/classroom-ppt';
   }

+ 5 - 5
src/views/attend-class/component/pptList.tsx

@@ -2,6 +2,7 @@ import { defineComponent, ref, onMounted, onUnmounted } from 'vue';
 import styles from './pptList.module.less';
 import { vaildPPTUrl } from '/src/utils/urlUtils';
 import { useUserStore } from '/src/store/modules/users';
+import { getAuthForAdmin } from '/src/utils';
 
 export default defineComponent({
   name: 'pptList',
@@ -10,10 +11,6 @@ export default defineComponent({
       type: Object,
       default: () => ({})
     },
-    fromType: {
-      type: String, // 'PLATFORM' | 'TEACHER' | 'CLASS'
-      default: 'TEACHER'
-    },
     instrumentId: {
       type: String,
       default: ''
@@ -22,12 +19,15 @@ export default defineComponent({
   emits: ['initPPT', 'changeSlideIndex', 'init'],
   setup(props, { emit, expose }) {
     const userStore = useUserStore();
+    const userAuth = getAuthForAdmin();
     const iframeRef = ref<HTMLIFrameElement>();
     const src = `${vaildPPTUrl()}/#/pptScreen?id=${
       props.pptData.id
     }&instrumentId=${props.instrumentId}&Authorization=${
       userStore.getToken
-    }&hideFullScreen=true&fromType=${props.fromType}`;
+    }&hideFullScreen=true&fromType=${
+      userAuth.authSource === 'admin' ? 'PLATFORM' : 'TEACHER'
+    }`;
     // 上一页下一页
     function handleChangeSlide(type: 'prev' | 'next') {
       iframeRef.value?.contentWindow?.postMessage(