From 8296816e95bc4c4cba378d2e4bc4d0e1d2d14f90 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 08 七月 2024 09:43:07 +0800
Subject: [PATCH] 发版环境

---
 src/components/ExamInfo/index.vue       |    4 +-
 src/views/folder/index.vue              |   12 +++---
 vite.config.electron.js                 |    4 +-
 src/store/modules/exam.js               |    6 +-
 components.d.ts                         |    3 -
 src/api/modules/subject.js              |    0 
 src/views/meet/index.vue                |    8 ++--
 src/views/exam/index.vue                |    6 +-
 /dev/null                               |   41 --------------------
 src/views/exam-list/data-list/index.vue |    4 +-
 src/views/train/data-list/index.vue     |   12 ++---
 src/api/modules/educationResource.js    |    0 
 src/views/resource/index.vue            |    0 
 .env.production                         |    2 
 vite.config.js                          |    4 +-
 15 files changed, 30 insertions(+), 76 deletions(-)

diff --git a/.env.production b/.env.production
index 33da7b4..c9593f6 100644
--- a/.env.production
+++ b/.env.production
@@ -1 +1 @@
-VITE_BASE_API_URL = '';
\ No newline at end of file
+VITE_BASE_API_URL =
diff --git a/components.d.ts b/components.d.ts
index 6086e98..14021a3 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -26,15 +26,12 @@
     ElSlider: typeof import('element-plus/es')['ElSlider']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ExamAudio: typeof import('./src/components/ExamAudio/index.vue')['default']
     ExamInfo: typeof import('./src/components/ExamInfo/index.vue')['default']
     ExamInfoDialog: typeof import('./src/components/ExamInfoDialog/index.vue')['default']
     NormalHeader: typeof import('./src/components/NormalHeader/index.vue')['default']
     PDFViewer: typeof import('./src/components/PDFViewer/index.vue')['default']
-    PDFVIewer: typeof import('./src/components/PDFVIewer/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
     VideoViewer: typeof import('./src/components/VideoViewer/index.vue')['default']
diff --git a/src/api/modules/educationResource.js b/src/api/modules/educationResource.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/api/modules/educationResource.js
diff --git a/src/api/modules/subject.js b/src/api/modules/subject.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/api/modules/subject.js
diff --git a/src/components/ExamInfo/index.vue b/src/components/ExamInfo/index.vue
index 285b3d8..823d52c 100644
--- a/src/components/ExamInfo/index.vue
+++ b/src/components/ExamInfo/index.vue
@@ -4,7 +4,7 @@
     </div>
 
     <div class="audio-container" v-if="activeQuestion.audioFile">
-      <ExamAudio :audioSrc="activeQuestion.audioFile"></ExamAudio>
+      <ExamAudio :audioSrc="'/api/files/' +activeQuestion.audioFile"></ExamAudio>
     </div>
 
     <div class="img-container flex" v-if="activeQuestion.img">
@@ -41,4 +41,4 @@
   }
 }
 
-</style>
\ No newline at end of file
+</style>
diff --git a/src/components/PDFVIewer/index.vue b/src/components/PDFVIewer/index.vue
deleted file mode 100644
index bb10852..0000000
--- a/src/components/PDFVIewer/index.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-<template>
-  <div class="pdf-container">
-    <iframe :src="fileUrl" width="100%" height="100%"></iframe>
-  </div>
-</template>
-
-<script setup>
-import { ref, onMounted } from 'vue';
-
-const props = defineProps({
-  pdfUrl: {
-    type: String,
-    required: true
-  }
-});
-const viewerUrl = '/pdfjs/web/viewer.html?file='; // pdfjs鏂囦欢鍦板潃
-
-const fileUrl = ref('');
-
-
-const renderPDF = () => {
-  fileUrl.value = viewerUrl + encodeURIComponent(props.pdfUrl);
-};
-
-onMounted(() => {
-  renderPDF();
-})
-
-</script>
-
-<style lang="scss" scoped>
-.pdf-container {
-  width: 100%;
-  height: 100%;
-
-  .pdf-canvas {
-    width: 100%;
-    height: 100%;
-  }
-}
-</style>
\ No newline at end of file
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index 854eb4b..82a9c9c 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -3,7 +3,7 @@
 export const useExamStore = defineStore('exam', () => {
   const examInfo = ref(null);
   const examDetail = ref([]);
-  
+
   const examType = ref({
     1: '鍗曢�夐',
     2: '澶氶�夐',
@@ -69,10 +69,10 @@
     answerProgress.value = progress;
   };
 
-  const initExam = () => {
+  const initExam = (questionType) => {
     answerProgress.value = 0;
     currentIndex.value = 0;
-    currentType.value = 1;
+    currentType.value = questionType;
   }
 
 
diff --git a/src/views/exam-list/data-list/index.vue b/src/views/exam-list/data-list/index.vue
index 27708ac..8f1c21c 100644
--- a/src/views/exam-list/data-list/index.vue
+++ b/src/views/exam-list/data-list/index.vue
@@ -88,7 +88,7 @@
       suggestTime: res.data.suggestTime,
     });
     examStore.setExamDetail(res.data.titleList);
-    examStore.initExam();
+    examStore.initExam(res.data.titleList[0].questionType);
     router.push('/exam');
   }).catch(err => {
 
@@ -106,4 +106,4 @@
 .bottom-item {
   margin-right: 30px;
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue
index 591e735..2b3ea60 100644
--- a/src/views/exam/index.vue
+++ b/src/views/exam/index.vue
@@ -177,7 +177,7 @@
 const timeDialog = ref(false);
 
 const { status, message, error, connect, disconnect, sendMessage } = useWebScoket({
-  url: 'ws://192.168.3.64:8000/websocket/' + userInfo.value.id,
+  url: 'wss://42.193.1.25:8000/websocket/' + userInfo.value.id,
   heartBeatData: 'ping'
 });
 
@@ -263,7 +263,7 @@
   resetAllDialog();
 
   disconnect();
-  
+
   submitExam(temp).then(res => {
     returnBack();
   }).catch(() => {
@@ -361,4 +361,4 @@
   background-color: rgba($color: #3680fa, $alpha: 0.2);
   margin-bottom: 20px;
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/folder/index.vue b/src/views/folder/index.vue
index 1901e4e..e9a2f4c 100644
--- a/src/views/folder/index.vue
+++ b/src/views/folder/index.vue
@@ -42,7 +42,7 @@
               </div>
 
               <div class="card-footer flex justify-center mb-7 shrink-0">
-                <el-pagination background layout="prev, pager, next" :total="fileList.length" 
+                <el-pagination background layout="prev, pager, next" :total="fileList.length"
                 :default-page-size="20"
                 :currentPage="currentIndex"
                 :hide-on-single-page="true"
@@ -107,7 +107,7 @@
 const userStore = useUserStore();
 const { userInfo } = storeToRefs(userStore);
 const { status, message, error, connect, disconnect, sendMessage } = useWebScoket({
-  url: 'ws://192.168.3.64:8000/websocket/' + userInfo.value.id,
+  url: 'wss://42.193.1.25:8000/websocket/' + userInfo.value.id,
   heartBeatData: 'ping'
 });
 
@@ -120,7 +120,7 @@
     handle: (item) => {
       console.log(item);
       imageViewer.value = true;
-      imageList.value = [item.contentUrl.url];
+      imageList.value = ['/api/files/'+item.contentUrl.url];
       resendMessage();
     }
   },
@@ -129,7 +129,7 @@
     handle: (item) => {
       console.log(item);
       videoViewer.value = true;
-      videoUrl.value = [item.contentUrl.url];
+      videoUrl.value = ['/api/files/'+item.contentUrl.url];
       resendMessage();
     }
   },
@@ -138,7 +138,7 @@
     handle: (item) => {
       console.log(item);
       pdfViewer.value = true;
-      pdfFile.value = item.contentUrl.url;
+      pdfFile.value = '/api/files/'+item.contentUrl.url;
       resendMessage();
     }
   },
@@ -278,4 +278,4 @@
     }
   }
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/meet/index.vue b/src/views/meet/index.vue
index 8c6c51f..ce1a6d0 100644
--- a/src/views/meet/index.vue
+++ b/src/views/meet/index.vue
@@ -27,7 +27,7 @@
         enabled: false
       },
       whiteboard: {
-        enabled: true
+        enabled: false
       }
     },
     userInfo: {
@@ -36,12 +36,12 @@
   };
   jitsiApi = new JitsiMeetExternalAPI(domain, options);
   jitsiInit();
-  
+
 });
 
 const jitsiInit = () => {
   jitsiApi.addListener('readyToClose', () => {
-    
+
   });
 }
 
@@ -49,4 +49,4 @@
 
 </script>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped></style>
diff --git a/src/views/resource/index.vue b/src/views/resource/index.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/resource/index.vue
diff --git a/src/views/train/data-list/index.vue b/src/views/train/data-list/index.vue
index 70d7102..369cad7 100644
--- a/src/views/train/data-list/index.vue
+++ b/src/views/train/data-list/index.vue
@@ -34,12 +34,10 @@
 </template>
 
 <script setup>
-import { ref } from 'vue';
-import { Timer } from '@element-plus/icons-vue';
-import { storeToRefs } from 'pinia';
-import { useRouter } from 'vue-router';
-import { useUserStore } from '@/store/index.js';
-import { classMeet } from '@/api/modules/meet.js';
+import {storeToRefs} from 'pinia';
+import {useRouter} from 'vue-router';
+import {useUserStore} from '@/store/index.js';
+import {classMeet} from '@/api/modules/meet.js';
 
 const userStore = useUserStore();
 const { userInfo } = storeToRefs(userStore);
@@ -92,4 +90,4 @@
 .list-card {
   border-radius: 10px;
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/vite.config.electron.js b/vite.config.electron.js
index 84001a6..9fe65ed 100644
--- a/vite.config.electron.js
+++ b/vite.config.electron.js
@@ -35,12 +35,12 @@
         proxy: {
             '/api': {
                 // target: 'http://192.168.3.88:8000',
-                target: 'http://192.168.3.64:8000',
+                target: 'localhost:8000',
                 changeOrigin: true,
             }
         }
     },
-    
+
     resolve: {
         alias: {
             '@': resolve(__dirname, './src')
diff --git a/vite.config.js b/vite.config.js
index 3de0950..8d10ea8 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -30,12 +30,12 @@
         proxy: {
             '/api': {
                 // target: 'http://192.168.3.88:8000',
-                target: 'http://192.168.3.64:8000',
+                target: 'http://localhost:8000',
                 changeOrigin: true,
             }
         }
     },
-    
+
     resolve: {
         alias: {
             '@': resolve(__dirname, './src')

--
Gitblit v1.8.0