Browse Source

字段修改

黄琪勇 4 months ago
parent
commit
361e93e87b
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/views/attend-class/component/pptList.tsx

+ 4 - 3
src/views/attend-class/component/pptList.tsx

@@ -2,7 +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';
+import { useRoute } from 'vue-router';
 
 export default defineComponent({
   name: 'pptList',
@@ -18,15 +18,16 @@ export default defineComponent({
   },
   emits: ['initPPT', 'changeSlideIndex', 'init'],
   setup(props, { emit, expose }) {
+    const route = useRoute();
+    const query = route.query;
     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=${
-      userAuth.authSource === 'admin' ? 'PLATFORM' : 'TEACHER'
+      query.fromType === 'PLATFORM' ? 'PLATFORM' : 'TEACHER'
     }`;
     // 上一页下一页
     function handleChangeSlide(type: 'prev' | 'next') {