فهرست منبع

Merge branch 'master' into NPC-lhd

natasha 3 سال پیش
والد
کامیت
b780f98a1f

+ 3 - 1
.env.development

@@ -11,4 +11,6 @@ VUE_APP_BASE_API = '/dev-api'
 # when you have a large number of pages.
 # Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
 
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+VUE_APP_PDF = '/pdf'

+ 1 - 0
.env.production

@@ -4,3 +4,4 @@ ENV = 'production'
 # base api
 VUE_APP_BASE_API = ''
 
+VUE_APP_PDF = ''

+ 258 - 258
src/api/ajax.js

@@ -1,318 +1,318 @@
 import request from '@/utils/request'
 import { getToken } from '@/utils/auth'
 export function getContent(MethodName, data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 export function getYinbiao(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        // /GCLSHMToolsServer/api/dict/basic
-        url: `/GCLSHMToolsServer/api/dict/basic?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    // /GCLSHMToolsServer/api/dict/basic
+    url: `/GCLSHMToolsServer/api/dict/basic?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 export function getLogin(MethodName, data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 export function getContentFile(
-    MethodName,
-    data
+  MethodName,
+  data
 ) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 export function getStaticContent(MethodName, data) {
-    return request({
-        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
+    method: 'post',
+    data
+  })
 }
 
 //获取分词结果 == gcls.helxsoft.cn/GCLSFCServer/ServiceInterface?userCode=2021052116-QA2HTCS5J6C6ZER&userType=STUDENT&sessionId=S-QPUKZAXLEFESNRBAZ0
 export function getSegContent(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSFCServer/ServiceInterface?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSFCServer/ServiceInterface?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 export function LearnWebSI(MethodName, data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data,
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data,
+  })
 }
 //教材
 export function TextbookAPI(MethodName, data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data,
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data,
+  })
 }
 export function getLearnWebContent(MethodName, data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 // 发送聊天
 export function sendrobot(data) {
-    return request({
-        url: `/GCLSAIServer/unit/utterance`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `/GCLSAIServer/unit/utterance`,
+    method: 'post',
+    data
+  })
 }
 // 语音识别 GCLSAIServer/speech/recognize
 export function speechrecognize(data) {
-    return request({
-        url: `/GCLSAIServer/speech/recognize`,
-        method: 'post',
-        data
-    })
+  return request({
+    url: `/GCLSAIServer/speech/recognize`,
+    method: 'post',
+    data
+  })
 }
 
 //分句
 export function segSentences(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/nlp/chinese/text2Sentences?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/nlp/chinese/text2Sentences?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 //批量分词
 export function BatchSegContent(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/nlp/chinese/text2word?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/nlp/chinese/text2word?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 // 生成拼音
 export function createPinyin(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/nlp/chinese/text2pinyin?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/nlp/chinese/text2pinyin?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 // /GCLSHMToolsServer/api/nlp/hskDict/query
 //
 export function getHZChineseInfo(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/baidu/chineseInfo?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/baidu/chineseInfo?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 
 //音频预处理
 export function prepareTranscribe(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/xunfei/speech/prepareTranscribe?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/xunfei/speech/prepareTranscribe?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 //音频识别结果获取
 export function getWordTime(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/xunfei/speech/getResult?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/xunfei/speech/getResult?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 export function textCreadMp3(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/xunfei/speech/tts?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/xunfei/speech/tts?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }
 export function compareSenTenceTime(data) {
-    let userInfor = getToken();
-    let UserCode = '',
-        UserType = '',
-        SessionID = ''
-    if (userInfor) {
-        let user = JSON.parse(getToken());
-        UserCode = user.user_code;
-        UserType = user.user_type;
-        SessionID = user.session_id;
-    }
-    return request({
-        url: `/GCLSHMToolsServer/api/xunfei/speech/adjustResult?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
-        method: 'post',
-        data
-    })
+  let userInfor = getToken();
+  let UserCode = '',
+    UserType = '',
+    SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSHMToolsServer/api/xunfei/speech/adjustResult?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
 }

+ 12 - 0
src/components/Adult/Preview.vue

@@ -663,6 +663,7 @@ export default {
     // 上一页
     handleNNPEprev() {
       let _this = this;
+      _this.puaseAudio();
       if (_this.queIndex == 0) {
         this.idArr.forEach((item, i) => {
           if (item == _this.currentTreeID) {
@@ -698,9 +699,20 @@ export default {
         });
       }
     },
+    puaseAudio() {
+      let audio = document.getElementsByTagName("audio");
+      audio.forEach((item) => {
+        item.pause();
+      });
+      let video = document.getElementsByTagName("video");
+      video.forEach((item) => {
+        item.pause();
+      });
+    },
     // 下一页
     handleNNPEnext() {
       const _this = this;
+      _this.puaseAudio();
       if (_this.queIndex == _this.queTotal - 1) {
         this.idArr.forEach((item, i) => {
           if (item == _this.currentTreeID) {

+ 26 - 29
src/components/Adult/inputModules/UploadPdf.vue

@@ -1,11 +1,11 @@
 <!--  -->
 <template>
-  <div class="Big-Book-prev-Textdes Tinydemo" v-if="curQue">
+  <div v-if="curQue" class="Big-Book-prev-Textdes Tinydemo">
     <UploadView
-      :changeFillId="changeFillId"
+      :change-fill-id="changeFillId"
       :accept="accept"
-      :filleNumber="1"
-      :fileList="curQue.fileList"
+      :fille-number="1"
+      :file-list="curQue.fileList"
       :type="type"
     />
   </div>
@@ -38,7 +38,22 @@ export default {
   },
   computed: {},
   watch: {},
-  //方法集合
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    if (!this.curQue) {
+      this.initcurQue();
+    }
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {},
+  // 方法集合
   methods: {
     remove() {
       // this.data = null;
@@ -50,24 +65,21 @@ export default {
       this.curQue.fileList = JSON.parse(JSON.stringify(fileList));
       if (fileList.length > 0) {
         this.curQue.data = fileList[0]?.response?.file_info_list[0];
-        this.curQue.data.fileRelativePath =
-          process.env.VUE_APP_BASE_API + this.curQue.data.file_relative_path;
-          this.getNumPages()
+        this.curQue.data.fileRelativePath = this.curQue.data.file_relative_path;
+        this.getNumPages();
       }
     },
     // 获取pdf的页数
     getNumPages() {
       let _this = this;
-      let loadingTask = pdf.createLoadingTask(
-        _this.curQue.data.fileRelativePath
-      );
+      let loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${_this.curQue.data.fileRelativePath}`);
       loadingTask.promise
-        .then((pdff) => {
+        .then(pdff => {
           _this.numPages = pdff.numPages;
           _this.curQue.data.numPages = pdff.numPages;
           this.$forceUpdate();
         })
-        .catch((err) => {
+        .catch(err => {
           this.$message.success("pdf 加载失败", err);
           this.data = null;
           this.curQue.data = null;
@@ -80,22 +92,7 @@ export default {
       data = JSON.parse(JSON.stringify(this.data_structure));
       this.changeCurQue(data);
     },
-  },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-    if (!this.curQue) {
-      this.initcurQue();
-    }
-  },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  beforeCreate() {}, //生命周期 - 创建之前
-  beforeMount() {}, //生命周期 - 挂载之前
-  beforeUpdate() {}, //生命周期 - 更新之前
-  updated() {}, //生命周期 - 更新之后
-  beforeDestroy() {}, //生命周期 - 销毁之前
-  destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  }, // 如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang='scss' scoped>

+ 31 - 57
src/components/Adult/preview/PdfView.vue

@@ -1,86 +1,60 @@
 <template>
-    <div class="pdfView-box">
-        <div class="pdfView">
-            <pdf
-                ref="pdf"
-                :src="curQue.data.fileRelativePath"
-                v-for="i in curQue.data.numPages"
-                :key="i"
-                :page="i"
-                @progress="loadedRatio = $event"
-            >
-            </pdf>
-        </div>
-        <div class="progress" v-show="loadedRatio!==1">
-            <el-progress type="circle" :width="70" color="#53a7ff" :percentage="Math.floor(loadedRatio*100)"></el-progress>
-            <br/>
-            <span>{{remindShow}}</span>
-        </div>
+  <div class="pdfView-box">
+    <div class="pdfView">
+      <pdf
+        v-for="i in curQue.data.numPages"
+        ref="pdf"
+        :key="i"
+        :src="pdfSrc"
+        :page="i"
+        @progress="loadedRatio = $event"
+      />
     </div>
+    <div v-show="loadedRatio!==1" class="progress">
+      <el-progress type="circle" :width="70" color="#53a7ff" :percentage="Math.floor(loadedRatio*100)" />
+      <br>
+      <span>{{ remindShow }}</span>
+    </div>
+  </div>
 </template>
 
 <script>
-//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-//例如:import 《组件名称》from ‘《组件路径》';
 import pdf from "vue-pdf";
 
 export default {
-  //import引入的组件需要注入到对象中才能使用
+  // import引入的组件需要注入到对象中才能使用
   components: { pdf },
   props: ["curQue", "fn_data", "type"],
 
   data() {
-    //这里存放数据
+    // 这里存放数据
     return {
       numPages: null,
       remindShow: "加载文件中,文件较大请耐心等待...",
       loadedRatio: 0,
+      pdfSrc: ''
     };
   },
-  //计算属性 类似于data概念
-  computed: {},
-  //监控data中数据变化
-  watch: {},
-  //方法集合
+  created() {
+    this.getNumPages();
+  },
   methods: {
     getNumPages() {
-      let _this = this;
-      let loadingTask = pdf.createLoadingTask(
-        _this.curQue.data.fileRelativePath
-      );
-      this.$forceUpdate();
-
+      let str = this.curQue.data.fileRelativePath;
+      str.replace(process.env.VUE_APP_BASE_API, '');
+      let loadingTask = pdf.createLoadingTask(`${process.env.VUE_APP_PDF}${str}`);
       loadingTask.promise
-        .then((pdff) => {
+        .then(pdff => {
           console.log("拿到结果");
-          _this.numPages = pdff.numPages;
-          _this.curQue.data.numPages = pdff.numPages;
-          this.$forceUpdate();
+          this.pdfSrc = loadingTask;
+          this.numPages = pdff.numPages;
+          this.curQue.data.numPages = pdff.numPages;
         })
-        .catch((err) => {
+        .catch(err => {
           console.error("pdf 加载失败", err);
         });
     },
   },
-  //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-  },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
-  //生命周期-创建之前
-  beforeCreated() {},
-  //生命周期-挂载之前
-  beforeMount() {},
-  //生命周期-更新之前
-  beforUpdate() {},
-  //生命周期-更新之后
-  updated() {},
-  //生命周期-销毁之前
-  beforeDestory() {},
-  //生命周期-销毁完成
-  destoryed() {},
-  //如果页面有keep-alive缓存功能,这个函数会触发
-  activated() {},
 };
 </script>
 <style scoped>
@@ -99,4 +73,4 @@ export default {
     width: 500px;
     margin-right: -250px;
 }
-</style>
+</style>

+ 15 - 5
src/components/Adult/preview/Voicefullscreen.vue

@@ -108,7 +108,7 @@
             <span
               :class="[
                 'en-icon',
-                item && !item.enwords ? 'disabled' : '',
+                !enwords ? 'disabled' : '',
                 !isShowEN ? 'disabled' : '',
                 isShowEN && bgIndex == 1 ? 'en-icon-yellow' : '',
               ]"
@@ -378,12 +378,13 @@
           </div>
         </div>
         <div style="clear: both; overflow: hidden"></div>
+
         <div
-          v-if="item.enwords"
+          v-if="enwords && isShowEN"
           :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
           :style="{ fontSize: enSize + 'px' }"
         >
-          {{ item.enwords }}
+          {{ enwords }}
         </div>
       </div>
       <div
@@ -584,6 +585,7 @@ export default {
       isRecording: false,
       recordPlaying: false,
       isCollArr: [],
+      enwords: "",
     };
   },
   computed: {
@@ -747,7 +749,13 @@ export default {
       this.getSentence();
     },
     changeStatus(key) {
-      this[key] = !this[key];
+      if (key == "isShowEN") {
+        if (this.enwords) {
+          this[key] = !this[key];
+        }
+      } else {
+        this[key] = !this[key];
+      }
     },
     setStatus() {
       let _this = this;
@@ -821,9 +829,11 @@ export default {
       let item = JSON.parse(JSON.stringify(_this.sentList[_this.curSentIndex]));
       if (item.sentArr) {
         _this.item = item.sentArr;
+        _this.enwords = item.enwords;
       } else {
         _this.item = item;
       }
+
       _this.sentList.forEach((item) => {
         this.isCollArr.push(false);
       });
@@ -1412,7 +1422,7 @@ export default {
       padding: 0 67px;
       .enwords {
         padding: 0 3px;
-        margin-top: 40px;
+        margin-top: 24px;
         color: rgba(0, 0, 0, 0.45);
         font-size: 24px;
         line-height: 32px;

+ 143 - 70
src/components/Adult/preview/WordPhrase.vue

@@ -78,45 +78,94 @@
                 v-else
                 style="width: 16px; height: 16px; margin-left: 8px"
               ></div>
-              <template v-if="sItem.pinyin_site&&(sItem.pinyin_site=='top'||sItem.pinyin_site=='bottom')">
-                  <div class="NPC-word-tab-box">
-                        <span class="NPC-word-tab-common NPC-word-tab-pinyin" :class="[sItem.motif_color?'NPC-word-tab-pinyin-'+themeColor:'']" v-if="sItem.pinyin_site=='top'">
-                            {{ sItem.pinyin }}
-                        </span>
-                        <span class="NPC-word-tab-common NPC-word-tab-word" :class="[sItem.motif_color?'NPC-word-tab-word-'+themeColor:'']">
-                            {{ sItem.new_word }}
-                        </span>
-                        <span class="NPC-word-tab-common NPC-word-tab-pinyin" :class="[sItem.motif_color?'NPC-word-tab-pinyin-'+themeColor:'']" v-if="sItem.pinyin_site=='bottom'">
-                            {{ sItem.pinyin }}
-                        </span>
-                  </div>
-                    <span
-                        class="NPC-word-tab-common NPC-word-tab-cixing"
-                        v-html="sItem.cixing"
-                    ></span>
-                    <span
-                        class="NPC-word-tab-common NPC-word-tab-def"
-                        v-html="sItem.def_str"
-                    ></span>
+              <template
+                v-if="
+                  sItem.pinyin_site &&
+                  (sItem.pinyin_site == 'top' || sItem.pinyin_site == 'bottom')
+                "
+              >
+                <div class="NPC-word-tab-box">
+                  <span
+                    class="NPC-word-tab-common NPC-word-tab-pinyin"
+                    :class="[
+                      sItem.motif_color
+                        ? 'NPC-word-tab-pinyin-' + themeColor
+                        : '',
+                    ]"
+                    v-if="sItem.pinyin_site == 'top'"
+                  >
+                    {{ sItem.pinyin }}
+                  </span>
+                  <span
+                    class="NPC-word-tab-common NPC-word-tab-word"
+                    :class="[
+                      sItem.motif_color
+                        ? 'NPC-word-tab-word-' + themeColor
+                        : '',
+                    ]"
+                  >
+                    {{ sItem.new_word }}
+                  </span>
+                  <span
+                    class="NPC-word-tab-common NPC-word-tab-pinyin"
+                    :class="[
+                      sItem.motif_color
+                        ? 'NPC-word-tab-pinyin-' + themeColor
+                        : '',
+                    ]"
+                    v-if="sItem.pinyin_site == 'bottom'"
+                  >
+                    {{ sItem.pinyin }}
+                  </span>
+                </div>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-cixing"
+                  v-html="sItem.cixing"
+                ></span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-def"
+                  v-html="sItem.def_str"
+                ></span>
               </template>
               <template v-else>
-                    <span class="NPC-word-tab-common NPC-word-tab-pinyin" :class="[sItem.motif_color?'NPC-word-tab-pinyin-'+themeColor:'']" v-if="!sItem.pinyin_site||sItem.pinyin_site=='first'">
-                        {{ sItem.pinyin }}
-                    </span>
-                    <span class="NPC-word-tab-common NPC-word-tab-word" :class="[sItem.motif_color?'NPC-word-tab-word-'+themeColor:'']">
-                        {{ sItem.new_word }}
-                    </span>
-                    <span class="NPC-word-tab-common NPC-word-tab-pinyin" :class="[sItem.motif_color?'NPC-word-tab-pinyin-'+themeColor:'']" v-if="sItem.pinyin_site=='last'">
-                        {{ sItem.pinyin }}
-                    </span>
-                    <span
-                        class="NPC-word-tab-common NPC-word-tab-cixing"
-                        v-html="sItem.cixing"
-                    ></span>
-                    <span
-                        class="NPC-word-tab-common NPC-word-tab-def"
-                        v-html="sItem.def_str"
-                    ></span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-pinyin"
+                  :class="[
+                    sItem.motif_color
+                      ? 'NPC-word-tab-pinyin-' + themeColor
+                      : '',
+                  ]"
+                  v-if="!sItem.pinyin_site || sItem.pinyin_site == 'first'"
+                >
+                  {{ sItem.pinyin }}
+                </span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-word"
+                  :class="[
+                    sItem.motif_color ? 'NPC-word-tab-word-' + themeColor : '',
+                  ]"
+                >
+                  {{ sItem.new_word }}
+                </span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-pinyin"
+                  :class="[
+                    sItem.motif_color
+                      ? 'NPC-word-tab-pinyin-' + themeColor
+                      : '',
+                  ]"
+                  v-if="sItem.pinyin_site == 'last'"
+                >
+                  {{ sItem.pinyin }}
+                </span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-cixing"
+                  v-html="sItem.cixing"
+                ></span>
+                <span
+                  class="NPC-word-tab-common NPC-word-tab-def"
+                  v-html="sItem.def_str"
+                ></span>
               </template>
               <span v-if="curQue.isInfor">
                 <img
@@ -142,6 +191,7 @@
         type="newWordDetail"
       />
     </div>
+    <audio ref="newwordAudio" />
   </div>
 </template>
 
@@ -171,6 +221,7 @@ export default {
       mp3List: [],
       isSuccess: false,
       loading: false,
+      mp3: "",
     };
   },
   //计算属性 类似于data概念
@@ -200,7 +251,6 @@ export default {
       let audio = document.getElementsByTagName("audio");
       audio.forEach((item) => {
         if (item.src != mp3) {
-          // this.audio.pause();
           item.pause();
         }
       });
@@ -247,6 +297,7 @@ export default {
       _this.data = _this.optionRes[_this.detailIndex];
       //_this.getWordLiju(_this.data.new_word);
     },
+
     playNewwords() {
       let _this = this;
       if (_this.playWord) {
@@ -257,7 +308,7 @@ export default {
       let mp3 = _this.mp3List[mp3_index].mp3_list[0].id;
       _this.mp3_index = _this.mp3List[mp3_index].sIndex;
       _this.handlePlayVoice(mp3);
-      _this.audio.addEventListener("ended", function () {
+      _this.$refs.newwordAudio.addEventListener("ended", function () {
         if (mp3_index < leg - 1) {
           mp3_index = mp3_index + 1;
           _this.mp3_index = _this.mp3List[mp3_index].sIndex;
@@ -272,19 +323,19 @@ export default {
         }
       });
     },
-    handlePlayVoice(mp3) {
+    handlePlayVoice3(mp3) {
       let _this = this;
       let audio = document.getElementsByTagName("audio");
       audio.forEach((item) => {
         if (item.src != mp3) {
-          this.audio.pause();
+          item.pause();
         }
       });
       if (!mp3) {
         return;
       }
-      if (!this.audio.paused) {
-        this.audio.pause();
+      if (!_this.audio.paused) {
+        _this.audio.pause();
       } else {
         _this.audio.pause();
         _this.audio.load();
@@ -293,11 +344,33 @@ export default {
         _this.audio.play();
       }
     },
-    stopAudio() {
-      if (this.audio) {
-        this.audio.pause();
+    handlePlayVoice(mp3) {
+      let _this = this;
+
+      let audio = document.getElementsByTagName("audio");
+      audio.forEach((item) => {
+        if (item.src != mp3) {
+          item.pause();
+        }
+      });
+      if (!mp3) {
+        return;
+      }
+      if (!_this.$refs.newwordAudio.paused) {
+        _this.$refs.newwordAudio.pause();
+        _this.mp3_index = -1;
+      } else {
+        setTimeout(() => {
+          _this.$refs.newwordAudio.pause();
+          _this.$refs.newwordAudio.src = mp3;
+          _this.$refs.newwordAudio.load();
+          _this.$refs.newwordAudio.play();
+        }, 10);
       }
     },
+    stopAudio() {
+      this.$refs.newwordAudio.pause();
+    },
     initData() {
       if (this.curQue.type == "NewWord_chs") {
         let resIndex = 0;
@@ -333,13 +406,13 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     let _this = this;
-    _this.audio.addEventListener("play", function () {
+    _this.$refs.newwordAudio.addEventListener("play", function () {
       _this.playClass = "active";
     });
-    _this.audio.addEventListener("pause", function () {
+    _this.$refs.newwordAudio.addEventListener("pause", function () {
       _this.playClass = "";
     });
-    _this.audio.addEventListener("ended", function () {
+    _this.$refs.newwordAudio.addEventListener("ended", function () {
       _this.playClass = "";
     });
   },
@@ -420,14 +493,14 @@ export default {
         margin-top: 4px;
         margin-left: 8px;
       }
-      .NPC-word-tab-box{
-          width: 240px;
-          span{
-              display: block;
-              width: 100%;
-              color: #000000;
-              margin: 2px 0;
-          }
+      .NPC-word-tab-box {
+        width: 240px;
+        span {
+          display: block;
+          width: 100%;
+          color: #000000;
+          margin: 2px 0;
+        }
       }
       .NPC-word-tab-common {
         padding-left: 8px;
@@ -438,28 +511,28 @@ export default {
         font-family: "GB-PINYINOK-B";
         white-space: nowrap;
         font-size: 12px;
-        &.NPC-word-tab-pinyin-red{
-            color: #e35454;
+        &.NPC-word-tab-pinyin-red {
+          color: #e35454;
         }
-        &.NPC-word-tab-pinyin-green{
-            color: #24b99e;
+        &.NPC-word-tab-pinyin-green {
+          color: #24b99e;
         }
-        &.NPC-word-tab-pinyin-brown{
-            color: #bd8865;
+        &.NPC-word-tab-pinyin-brown {
+          color: #bd8865;
         }
       }
       .NPC-word-tab-word {
         font-family: "FZJCGFKTK";
         white-space: nowrap;
         font-size: 16px;
-        &.NPC-word-tab-word-red{
-            color: #e35454;
+        &.NPC-word-tab-word-red {
+          color: #e35454;
         }
-        &.NPC-word-tab-word-green{
-            color: #24b99e;
+        &.NPC-word-tab-word-green {
+          color: #24b99e;
         }
-        &.NPC-word-tab-word-brown{
-            color: #bd8865;
+        &.NPC-word-tab-word-brown {
+          color: #bd8865;
         }
       }
       .NPC-word-tab-cixing {
@@ -467,7 +540,7 @@ export default {
         width: 48px;
         box-sizing: border-box;
         text-align: left;
-        font-style:italic;
+        font-style: italic;
       }
       .NPC-word-tab-def {
         flex: 1;

+ 1 - 1
src/components/Adult/preview/components/AudioRed.vue

@@ -81,7 +81,7 @@ export default {
     _this.audio.addEventListener("play", function () {
       _this.voiceSrc = _this.isCompare
         ? _this.comparePlaySrc
-        : _this.voicePauseSrc;
+        : _this.voicePlaySrc;
       _this.$emit("getPlayStatus", true);
     });
     _this.audio.addEventListener("pause", function () {

+ 55 - 37
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -252,8 +252,8 @@ export default {
       height: "",
       margintop: "",
       wordShow: true,
-      wordShow2: true,
-      wordShow3: true,
+      wordShow2: false,
+      wordShow3: false,
       list1: [],
       list2: [],
       list3: [],
@@ -352,41 +352,60 @@ export default {
         });
     },
     handleExample(list) {
-    let _this = this;
-        // let list1Ora = JSON.parse(JSON.stringify(_this.data.list1))
-        list = list.map((item,index) =>{
-            let position_str = []
-            let sentence = JSON.parse(JSON.stringify(item.sentence))
-            let res = ""
-            for(let i=0;i<item.position_list.length;i++){
-                let part1 = "";
-                let part2 = "";
-                let part3 = "";
-                if(item.position_list.length>1){
-                    if(i==0){
-                        part1 = sentence.substring(0, item.position_list[i].begin);
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end,item.position_list[i+1].begin)
-                    }else if(i==item.position_list.length-1){
-                        part1 = "";
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end)
-                    }else{
-                        part1 = "";
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end,item.position_list[i+1].begin)
-                    }
-                }else{
-                    part1 = sentence.substring(0, item.position_list[i].begin);
-                    part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                    part3 = sentence.substring(item.position_list[i].end)
-                }
-                res +=  part1 + '<span style="color:#DE4444;">' + part2 + "</span>" + part3;
+      let _this = this;
+      // let list1Ora = JSON.parse(JSON.stringify(_this.data.list1))
+      list = list.map((item, index) => {
+        let position_str = [];
+        let sentence = JSON.parse(JSON.stringify(item.sentence));
+        let res = "";
+        for (let i = 0; i < item.position_list.length; i++) {
+          let part1 = "";
+          let part2 = "";
+          let part3 = "";
+          if (item.position_list.length > 1) {
+            if (i == 0) {
+              part1 = sentence.substring(0, item.position_list[i].begin);
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(
+                item.position_list[i].end,
+                item.position_list[i + 1].begin
+              );
+            } else if (i == item.position_list.length - 1) {
+              part1 = "";
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(item.position_list[i].end);
+            } else {
+              part1 = "";
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(
+                item.position_list[i].end,
+                item.position_list[i + 1].begin
+              );
             }
-            item.res = res;
-            return item
-        })
-        return list;
+          } else {
+            part1 = sentence.substring(0, item.position_list[i].begin);
+            part2 = sentence.substring(
+              item.position_list[i].begin,
+              item.position_list[i].end
+            );
+            part3 = sentence.substring(item.position_list[i].end);
+          }
+          res +=
+            part1 + '<span style="color:#DE4444;">' + part2 + "</span>" + part3;
+        }
+        item.res = res;
+        return item;
+      });
+      return list;
     },
 
     initData() {
@@ -433,7 +452,6 @@ export default {
   width: 100%;
   z-index: 999;
   overflow-y: scroll;
-
   .module-inner {
     padding: 30px 0;
     > div {

+ 14 - 5
src/components/Adult/preview/components/Wordcard.vue

@@ -76,11 +76,20 @@
     </p>
     <template v-if="word.detail">
       <span class="word-ben-def">
-        <span>{{
-          word.detail.definition_list && word.detail.definition_list.length > 0
-            ? "本课释义"
-            : "词典释义"
-        }}</span>
+        <span
+          v-if="
+            word.detail.definition_list &&
+            word.detail.definition_list.length > 0
+          "
+          >本课释义</span
+        >
+        <span
+          v-else-if="
+            word.detail.paraphrase && word.detail.paraphrase.length > 0
+          "
+          >词典释义</span
+        >
+        <span v-else>暂无释义</span>
       </span>
       <div
         class="bwc-word-en"

+ 3 - 1
src/utils/request.js

@@ -10,6 +10,8 @@ axios.defaults.dataType = 'json'
 axios.defaults.headers['cache-control'] = 'no-cache'
 axios.defaults.headers['Content-Type'] = 'application/json'
 axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest'
+
+
 // create an axios instance
 const service = axios.create({
   baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
@@ -47,8 +49,8 @@ service.interceptors.response.use(
    * You can also judge the status by HTTP Status Code
    */
   response => {
-    const res = response.data
     // console.log(res)
+    const res = response.data;
     let msg = null
     // if the custom code is not 20000, it is judged as an error.
     if (res.status == 0 || res.status == -2) {

+ 1 - 0
src/views/courseView.vue

@@ -96,6 +96,7 @@ export default {
       _this.chapterId = id;
       _this.chapterName = name;
       _this.isAnswerShow = false;
+
       _this.onGetData();
     },
     // 点击全屏展示 隐藏tree

+ 28 - 20
vue.config.js

@@ -1,22 +1,22 @@
-'use strict'
-const path = require('path')
-const defaultSettings = require('./src/settings.js')
+
+const path = require('path');
+const defaultSettings = require('./src/settings.js');
 const CompressionPlugin = require('compression-webpack-plugin');
 
 function resolve(dir) {
-  return path.join(__dirname, dir)
+  return path.join(__dirname, dir);
 }
 
-const name = defaultSettings.title || '发展汉语' // page title
+const name = defaultSettings.title || '发展汉语'; // page title
 
 // If your port is set to 80,
 // use administrator privileges to execute the command line.
 // For example, Mac: sudo npm run
 // You can change the port by the following methods:
 // port = 9528 npm run dev OR npm run dev --port = 9528
-const port = process.env.port || process.env.npm_config_port || 9560 // dev port
+const port = process.env.port || process.env.npm_config_port || 9560; // dev port
 
-const webpack = require('webpack')
+const webpack = require('webpack');
 
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -33,7 +33,7 @@ module.exports = {
   lintOnSave: false,
   productionSourceMap: false,
   devServer: {
-    port: port,
+    port,
     open: true,
     overlay: {
       warnings: false,
@@ -44,20 +44,28 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         target: `http://gcls.utschool.cn/`,
-        //target: `http://gcls.helxsoft.cn/`,
+        // target: `http://gcls.helxsoft.cn/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
         }
       },
+      [process.env.VUE_APP_PDF]: {
+        // target: 'https://file-kf.helxsoft.cn/',
+        target: 'https://file-cs.helxsoft.cn/',
+        changeOrigin: true,
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_PDF]: ''
+        }
+      }
     },
 
-    after: require('./mock/mock-server.js')
+    // after: require('./mock/mock-server.js')
   },
   configureWebpack: {
     // provide the app's title in webpack's name field, so that
     // it can be accessed in index.html to inject the correct title.
-    name: name,
+    name,
     resolve: {
       alias: {
         '@': resolve('src')
@@ -85,16 +93,16 @@ module.exports = {
       // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
       fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
       include: 'initial'
-    }])
+    }]);
 
     // when there are many pages, it will cause too many meaningless requests
-    config.plugins.delete('prefetch')
+    config.plugins.delete('prefetch');
 
     // set svg-sprite-loader
     config.module
       .rule('svg')
       .exclude.add(resolve('src/icons'))
-      .end()
+      .end();
     config.module
       .rule('icons')
       .test(/\.svg$/)
@@ -105,7 +113,7 @@ module.exports = {
       .options({
         symbolId: 'icon-[name]'
       })
-      .end()
+      .end();
 
     config.when(process.env.NODE_ENV !== 'development', config => {
       config
@@ -115,7 +123,7 @@ module.exports = {
           // `runtime` must same as runtimeChunk name. default is `runtime`
           inline: /runtime\..*\.js$/
         }])
-        .end()
+        .end();
       config.optimization.splitChunks({
         chunks: 'all',
         cacheGroups: {
@@ -138,9 +146,9 @@ module.exports = {
             reuseExistingChunk: true
           }
         }
-      })
+      });
       // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
-      config.optimization.runtimeChunk('single')
-    })
+      config.optimization.runtimeChunk('single');
+    });
   }
-}
+};