Forráskód Böngészése

1、oboc 登录页改进 2、填空题知只显示正确答案

dsy 1 hónapja
szülő
commit
c505150a01

+ 9 - 80
src/views/book/courseware/preview/components/fill/FillPreview.vue

@@ -125,65 +125,6 @@
               <span v-else :key="j" v-html="convertText(sanitizeHTML(li.content))"></span>
             </template>
             <template v-if="li.type === 'input'">
-              <template v-if="data.property.fill_type === fillTypeList[0].value">
-                <el-input
-                  :key="j"
-                  v-model="li.content"
-                  :disabled="disabled"
-                  :class="[data.property.fill_font, ...computedAnswerClass(li.mark)]"
-                  :style="[{ width: Math.max(80, li.content.length * 21.3) + 'px' }]"
-                />
-              </template>
-
-              <template v-else-if="data.property.fill_type === fillTypeList[1].value">
-                <el-popover :key="j" placement="top" trigger="click">
-                  <div class="word-list">
-                    <span
-                      v-for="{ content, mark } in data.word_list"
-                      :key="mark"
-                      class="word-item"
-                      @click="handleSelectWord(content, mark, li)"
-                    >
-                      {{ content }}
-                    </span>
-                  </div>
-
-                  <el-input
-                    slot="reference"
-                    v-model="li.content"
-                    :readonly="true"
-                    :class="[data.property.fill_font, ...computedAnswerClass(li.mark)]"
-                    class="pinyin"
-                    :style="[{ width: Math.max(80, li.content.length * 21.3) + 'px' }]"
-                  />
-                </el-popover>
-              </template>
-
-              <template v-else-if="data.property.fill_type === fillTypeList[2].value">
-                <span :key="j" class="write-click" @click="handleWriteClick(li.mark)">
-                  <img
-                    v-show="li.write_base64"
-                    style="background-color: #f4f4f4"
-                    :src="li.write_base64"
-                    alt="write-show"
-                  />
-                </span>
-              </template>
-
-              <template v-else-if="data.property.fill_type === fillTypeList[3].value">
-                <SoundRecordBox
-                  ref="record"
-                  :key="j"
-                  type="mini"
-                  :many-times="false"
-                  class="record-box"
-                  :attrib="data.unified_attrib"
-                  :answer-record-list="data.audio_answer_list"
-                  :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
-                  @handleWav="handleMiniWav($event, li.mark)"
-                />
-              </template>
-
               <span v-show="computedAnswerText(li.mark).length > 0" :key="`answer-${j}`" class="right-answer">
                 {{ computedAnswerText(li.mark) }}
               </span>
@@ -431,7 +372,7 @@ export default {
       let answerValue = answerOption.value;
       let isRight = selectValue === answerValue;
       if (isRight) return '';
-      return `${answerValue}`;
+      return `${answerValue}`;
     },
     // 重做
     retry() {
@@ -526,16 +467,6 @@ export default {
         }
       }
 
-      & + .right-answer {
-        position: relative;
-        left: -4px;
-        display: inline-block;
-        height: 32px;
-        line-height: 28px;
-        vertical-align: bottom;
-        border-bottom: 1px solid $font-color;
-      }
-
       :deep input.el-input__inner {
         padding: 0;
         font-size: 16pt;
@@ -548,16 +479,14 @@ export default {
       }
     }
 
-    .popper-list {
-      & + .right-answer {
-        position: relative;
-        left: -4px;
-        display: inline-block;
-        height: 32px;
-        line-height: 28px;
-        vertical-align: bottom;
-        border-bottom: 1px solid $font-color;
-      }
+    .right-answer {
+      position: relative;
+      display: inline-block;
+      height: 32px;
+      margin: 0 4px;
+      line-height: 32px;
+      vertical-align: bottom;
+      border-bottom: 1px solid $font-color;
     }
   }
 

+ 4 - 0
src/views/oboc/index.vue

@@ -5,6 +5,7 @@
 <script>
 import { obocCheckIdentityCode } from '@/api/app';
 import { setToken, setLocalStore } from '@/utils/auth';
+import { updateBaseURL } from '@/utils/http';
 
 export default {
   name: 'OBOCPage',
@@ -23,6 +24,9 @@ export default {
     };
   },
   created() {
+    if (process.env.NODE_ENV === 'production') {
+      updateBaseURL(`${window.location.origin}/`);
+    }
     this.checkIdentityCode();
   },
   methods: {

+ 2 - 3
src/web_preview/index.vue

@@ -22,7 +22,7 @@
           <el-checkbox v-model="chinese" true-label="zh-Hant" false-label="zh-Hans">繁体</el-checkbox>
         </span>
         <span class="link">
-          <el-checkbox v-model="showPinYin" :true-label="true" :false-label="false">拼音</el-checkbox>
+          <el-checkbox v-model="showPinYin" true-label="true" false-label="false">拼音</el-checkbox>
         </span>
         <div class="operator">
           <slot name="operator" :courseware="courseware_info"></slot>
@@ -345,7 +345,6 @@
 <script>
 import CoursewarePreview from '@/views/book/courseware/preview/CoursewarePreview.vue';
 import { isTrue } from '@/utils/validate';
-import { getConfig, getToken } from '@/utils/auth';
 import MindMap from '@/components/MindMap.vue';
 import VideoPlay from '@/views/book/courseware/preview/components/common/VideoPlay.vue';
 import AudioPlay from '@/views/book/courseware/preview/components/common/AudioPlay.vue';
@@ -489,7 +488,7 @@ export default {
       langList: [],
       lang: 'ZH',
       chinese: 'zh-Hans',
-      showPinYin: false,
+      showPinYin: 'false',
       isJudgeCorrect: false,
       unified_attrib: {},
       curSelectId: this.id,