Ver código fonte

问题修改

dsy 2 meses atrás
pai
commit
43233bba1a

+ 1 - 1
.env

@@ -11,4 +11,4 @@ VUE_APP_BookWebSI = '/GCLSBookWebSI/ServiceInterface'
 VUE_APP_EepServer = '/EEPServer/SI'
 
 #version
-VUE_APP_VERSION = '2026.06.24'
+VUE_APP_VERSION = '2026.06.26'

+ 1 - 1
.env.production

@@ -1,2 +1,2 @@
 # base api
-VUE_APP_EEP = 'http://eep.helxsoft.cn/'
+VUE_APP_EEP = 'https://eep.utschool.cn/'

+ 11 - 1
packages/BookEep.vue

@@ -33,6 +33,8 @@ import CoursewarePreview from '@/views/book/courseware/preview/CoursewarePreview
 
 import { isTrue } from '@/utils/validate';
 import { buildCoursewareStyle } from '@/views/book/courseware/preview/common/utils/coursewareStyle';
+import { updateBaseURL } from '@/utils/http';
+import { getLocalStore } from '@/utils/auth';
 
 export default {
   name: 'BookEep',
@@ -146,6 +148,12 @@ export default {
       },
     },
   },
+  created() {
+    const origin = window.location.origin;
+    if (origin && origin.indexOf('localhost') === -1) {
+      updateBaseURL(`${origin}/`);
+    }
+  },
   methods: {
     backTop() {
       this.$refs.previewMain.scrollTo({
@@ -236,6 +244,8 @@ export default {
 $total-width: $courseware-width + $courseware-left-margin + $courseware-right-margin;
 
 .common-preview {
+  min-width: calc($total-width);
+
   .main-container {
     position: relative;
     flex: 1;
@@ -343,7 +353,7 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
 
   .audit-content {
     display: flex;
-    min-width: 1810px;
+    min-width: calc($total-width);
     height: calc(100vh - 166px);
 
     &_org {

+ 1 - 1
packages/package.json

@@ -1,6 +1,6 @@
 {
   "name": "eep-ui",
-  "version": "0.0.4",
+  "version": "0.0.6",
   "main": "eep/eep-ui.umd.js",
   "style": "eep/eep-ui.css",
   "exports": {

+ 5 - 4
src/utils/http.js

@@ -2,11 +2,11 @@ import axios from 'axios';
 import store from '@/store';
 import router from '@/router';
 
-import { getToken, getLocalStore } from '@/utils/auth';
+import { getToken } from '@/utils/auth';
 import { Message } from 'element-ui';
 
 const service = axios.create({
-  baseURL: getLocalStore('server_address') || process.env.VUE_APP_EEP,
+  baseURL: process.env.VUE_APP_EEP,
   timeout: 300000,
 });
 
@@ -141,7 +141,8 @@ export const http = {
 
 /**
  * 更新axios的baseURL
+ * @param {string} address 新的baseURL地址
  */
-export function updateBaseURL() {
-  service.defaults.baseURL = getLocalStore('server_address') || process.env.VUE_APP_EEP;
+export function updateBaseURL(address = '') {
+  service.defaults.baseURL = address || process.env.VUE_APP_EEP;
 }

+ 1 - 0
src/views/book/courseware/preview/CoursewarePreview.vue

@@ -185,6 +185,7 @@ export default {
     return {
       getDragStatus: () => false,
       bookInfo: this.bookInfo,
+      getCoursewareId: () => this.courseware_id,
     };
   },
   props: {

+ 1 - 0
src/views/book/courseware/preview/components/common/PreviewMixin.js

@@ -207,6 +207,7 @@ const mixin = {
         backgroundPosition: bcImgUrl ? `${pos.left}% ${pos.top}%` : '',
         backgroundImage: bcImgUrl ? `url(${bcImgUrl})` : '',
         backgroundColor: bcImgUrl ? `rgba(255, 255, 255, ${1 - back?.image_opacity / 100})` : '',
+        overflowY: 'auto',
       };
 
       if (back) {

+ 10 - 1
src/views/book/courseware/preview/components/fill/FillPreview.vue

@@ -109,7 +109,13 @@
       <div v-if="showLang" class="lang">
         {{ data.multilingual.find((item) => item.type === getLang())?.translation }}
       </div>
-      <PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @judgeCorrect="judgeCorrect" @retry="retry" />
+      <PreviewOperation
+        :is-show-retry="isHasFill"
+        :is-show-answer="isHasFill"
+        @showAnswerAnalysis="showAnswerAnalysis"
+        @judgeCorrect="judgeCorrect"
+        @retry="retry"
+      />
     </div>
 
     <WriteDialog :visible.sync="writeVisible" @confirm="handleWriteConfirm" />
@@ -189,6 +195,9 @@ export default {
         color: unifiedAttrib.text_color || undefined,
       };
     },
+    isHasFill() {
+      return this.data.model_essay.some((li) => li.type === 'input');
+    },
   },
   watch: {
     'data.model_essay': {

+ 2 - 1
src/views/book/courseware/preview/components/video_interaction/ExercisePreview.vue

@@ -32,6 +32,7 @@ export default {
       modal: false,
     };
   },
+  inject: ['getCoursewareId'],
   props: ['exercise_id', 'feed_back'],
   data() {
     return {
@@ -93,7 +94,7 @@ export default {
       this.loading = true;
       let data = {
         exercise_id: this.exercise_id,
-        courseware_id: this.$route.query.id,
+        courseware_id: this.getCoursewareId(),
       };
       GetCoursewareExerciseView(data)
         .then((res) => {

+ 3 - 8
src/views/login/index.vue

@@ -236,7 +236,7 @@ export default {
         user_name: '',
         password: '',
         is_password_md5: 'true',
-        server_address: getLocalStore('server_address') || 'https://eep.utschool.cn', // 服务器地址
+        server_address: 'https://eep.utschool.cn', // 服务器地址
         verification_code_image_id: '',
         verification_code_image_text: '',
       },
@@ -274,11 +274,7 @@ export default {
   },
   methods: {
     init() {
-      const isInitSeverAddress = getLocalStore('isInitSeverAddress');
-      if (!isInitSeverAddress) {
-        setLocalStore('server_address', this.fixedServerAddress);
-        setLocalStore('isInitSeverAddress', true);
-      }
+      this.updateServerAddress();
       this.updateVerificationCode();
       this.getLogo();
     },
@@ -342,8 +338,7 @@ export default {
       this.showUseragreement = false;
     },
     updateServerAddress() {
-      setLocalStore('server_address', this.form.server_address);
-      updateBaseURL();
+      updateBaseURL(this.form.server_address);
     },
     // 忘记密码
     forgotPwd() {

+ 0 - 2
src/views/personal_workbench/template_list/preview/CommonPreview.vue

@@ -496,14 +496,12 @@ $total-width: $courseware-width + $courseware-left-margin + $courseware-right-ma
       width: $courseware-left-margin;
       min-width: $courseware-left-margin;
       max-width: $courseware-left-margin;
-      background-color: $courseware-bgColor;
     }
 
     .preview-right {
       width: $courseware-right-margin;
       min-width: $courseware-right-margin;
       max-width: $courseware-right-margin;
-      background-color: $courseware-bgColor;
     }
 
     &.no-audit {

+ 1 - 6
vue.config.js

@@ -69,12 +69,7 @@ module.exports = defineConfig({
   },
   configureWebpack: {
     name,
-    externals: isLibBuild
-      ? {
-          vue: 'vue',
-          'vue-router': 'vue-router',
-        }
-      : {},
+    externals: isLibBuild ? { vue: 'vue', 'vue-router': 'vue-router' } : {},
     // 在库模式下,入口输出文件名是固定的(例如 eep-ui.umd.js)。
     // 使用唯一的区块文件名以防止异步区块发生冲突。
     output: isLibBuild ? { chunkFilename: 'eep-ui.[name].[contenthash:8].js' } : {},