Selaa lähdekoodia

bug - add `office` tips for all paper download

hehaitao 1 vuosi sitten
vanhempi
commit
7f224a52c8

+ 2 - 0
src/api/webApi/webQue.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import store from "@/store";
 // 题库中心接口
 // 教学阶段列表
 export function pharseList() {
@@ -741,6 +742,7 @@ export function zytbFilter(batch) {
 // /prod-api/front/v2/papers/downloadRealPaper
 // 下载真題试卷
 export function downloadRealPaper(paperId, period) {
+  period = store.getters.period || period || ''
   const baseURL = process.env.VUE_APP_BASE_API
   const downloadUrl = baseURL + '/front/v2/papers/downloadRealPaper?paperId=' + paperId + "&period=" + period
   window.location.href = downloadUrl

+ 2 - 1
src/views/questioncenter/PaperPreview.vue

@@ -71,7 +71,8 @@ export default {
         this.msgSuccess('收藏成功')
       })
     },
-    paperDownLoad(paperId) {
+    async paperDownLoad(paperId) {
+      await this.$alert('如有图片和公式不完整,请用 word 打开')
       downloadRealPaper(paperId, this.period)
     }
   }

+ 2 - 1
src/views/questioncenter/components/paper-actions-mixin.js

@@ -38,7 +38,8 @@ export default {
       // ali video is a guid with no suffix.
       return videoSuffixes.some(s => url.endsWith(s)) || !url.includes('.')
     },
-    paperDownLoad(item) {
+    async paperDownLoad(item) {
+      await this.$alert('如有图片和公式不完整,请用 word 打开')
       const {id: paperId, paperSource, filename} = item
       if (paperSource == MxConst.enum.paper.paperSource.oss) {
         const ossFullPath = this._combineOssPath(item)