|
@@ -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') {
|