Browse Source

错题库下载

XW 4 months ago
parent
commit
367372cb3f

+ 4 - 4
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesList.vue

@@ -276,7 +276,7 @@ export default {
                     return date && date.valueOf() > Date.now() - 86400000;
                 }
             },
-            joinDate: []
+            joinDate: [],
         }
     },
     async created () {
@@ -710,18 +710,18 @@ export default {
                 return
             }
             let code = this.courseNow.scope === 'private' ? this.courseNow.teacherId : this.courseNow.school
-            let sasData = await this.$tools.getSchoolSas(this.userInfo.azp)
+            let sasData = await this.$api.blob.blobSasRCW({ name: this.userInfo.azp, role: 'school' })
             let quesList = this.topicFilterList.length > 50 ? this.topicFilterList.slice(0, 50) : this.topicFilterList
             pageInfo.data = await this.getAllData(quesList)
             console.log('2222222222', pageInfo.data.length);
             let dataJson = JSON.stringify(pageInfo)
             const blob = new Blob([dataJson], { type: 'application/json' })
             const newFile = new File([blob], 'wrongList.json', { type: 'application/json' });
-            let blobTool = new BlobTool(sasData.url, this.userInfo.azp, sasData.sas, 'school')
+            let blobTool = new BlobTool(sasData.url, this.userInfo.azp, '?' + sasData.sas, 'school')
             let path = `student/${this.userInfo.sub}`
             let curLang = localStorage.getItem("local") || "zh-cn"
             blobTool.upload(newFile, {path, checkSize: false}).then(res => {
-                let blobUrl = encodeURIComponent(res.url + sasData.sas)
+                let blobUrl = encodeURIComponent(res.url + '?' +  sasData.sas)
                 let params = {
                     pageUrl: `https://teammodeltest.blob.core.chinacloudapi.cn/0-public/bookjs/exam/${this.pdfAnsType ? 'index2' : 'index'}.html?url=${blobUrl}&lang=${curLang}`,
                     timeout: 40000,