diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 8b5bdf3..b176fae 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -98,7 +98,7 @@ export default { password: this.loginForm.password } this.login(data).then(() => { - let redirect = decodeURIComponent(this.$route.query.redirect || '/') + let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : '/index' this.$router.replace(redirect) }).catch(() => {}) } diff --git a/src/pages/achievement/assessment/index.vue b/src/pages/achievement/assessment/index.vue index aee75c6..6a4c70f 100644 --- a/src/pages/achievement/assessment/index.vue +++ b/src/pages/achievement/assessment/index.vue @@ -17,7 +17,9 @@
@@ -74,19 +76,24 @@ export default { tabs: [ { id: 1, - name: '单选题' + name: '单选题', + show: true },{ id: 2, - name: '多选题' + name: '多选题', + show: true },{ id: 3, - name: '填空题' + name: '判断题', + show: true },{ id: 4, - name: '判断题' + name: '简答题', + show: true },{ id: 5, - name: '简答题' + name: '填空题', + show: true } ], active: 1, @@ -112,6 +119,12 @@ export default { this.time = res.time this.ranking = res.ranking this.allData = res.data + let tabs = this.tabs + res.data.list1.length || (tabs[0].show = false) + res.data.list2.length || (tabs[1].show = false) + res.data.list3.length || (tabs[2].show = false) + res.data.list4.length || (tabs[3].show = false) + res.data.list5.length || (tabs[4].show = false) this.curType = this.allData.list1 this.handleOptions() }) diff --git a/src/pages/achievement/list/examResults.vue b/src/pages/achievement/list/examResults.vue index 043b88c..43e5c9c 100644 --- a/src/pages/achievement/list/examResults.vue +++ b/src/pages/achievement/list/examResults.vue @@ -72,7 +72,7 @@ export default { 'setInfo' ]), getData() { - this.$post(`${this.api.getMyAchievement}?userId=${this.userId}&pageSize=${this.pageSize}&pageNum=${this.page}`).then(res => { + this.$post(`${this.api.getMyAchievement}?userId=${this.userId}&pageSize=${this.pageSize}&pageNum=${this.page}&keyword=${this.keyword}`).then(res => { this.listData = res.data.list.list this.total = res.data.list.totalCount }).catch(res => {}) diff --git a/src/pages/achievement/list/practiceResults.vue b/src/pages/achievement/list/practiceResults.vue index e9670d7..93e9d88 100644 --- a/src/pages/achievement/list/practiceResults.vue +++ b/src/pages/achievement/list/practiceResults.vue @@ -6,7 +6,7 @@
- +
@@ -75,7 +75,9 @@ export default { 'setInfo' ]), getData() { - this.$post(`${this.api.practiseAchievement}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => { + let url = `${this.api.practiseAchievement}?userId=${this.userId}&pageNum=${this.page}&pageSize=${this.pageSize}` + if(this.keyword) url = url + `&keyword=${this.keyword}` + this.$post(url).then(res => { this.listData = res.data.list.list this.total = res.data.list.totalCount }).catch(res => {}) @@ -100,7 +102,7 @@ export default { }, show(row){ this.setInfo({ - id: row.practiseId, + id: row.id, }) this.$router.push('practice') } diff --git a/src/pages/achievement/practice/index.vue b/src/pages/achievement/practice/index.vue index 454c1f9..308b39a 100644 --- a/src/pages/achievement/practice/index.vue +++ b/src/pages/achievement/practice/index.vue @@ -13,7 +13,9 @@
@@ -69,19 +71,24 @@ export default { tabs: [ { id: 1, - name: '单选题' + name: '单选题', + show: true },{ id: 2, - name: '多选题' + name: '多选题', + show: true },{ id: 3, - name: '判断题' + name: '判断题', + show: true },{ id: 4, - name: '简答题' + name: '简答题', + show: true },{ id: 5, - name: '填空题' + name: '填空题', + show: true } ], typeNameList: ['单项选择','多项选择','判断题','简答题','填空题'], @@ -119,6 +126,12 @@ export default { } }) this.list = data.list + let tabs = this.tabs + data.list.find(n => n.typeName == '单项选择') || (tabs[0].show = false) + data.list.find(n => n.typeName == '多项选择') || (tabs[1].show = false) + data.list.find(n => n.typeName == '判断题') || (tabs[2].show = false) + data.list.find(n => n.typeName == '简答题') || (tabs[3].show = false) + data.list.find(n => n.typeName == '填空题') || (tabs[4].show = false) this.handleOptions() this.paperName = data.paperName this.userName = data.stuName diff --git a/src/pages/exam/detail/index.vue b/src/pages/exam/detail/index.vue index 05e82f1..574b3f3 100644 --- a/src/pages/exam/detail/index.vue +++ b/src/pages/exam/detail/index.vue @@ -13,7 +13,9 @@
@@ -69,19 +71,24 @@ export default { tabs: [ { id: 1, - name: '单选题' + name: '单选题', + show: true },{ id: 2, - name: '多选题' + name: '多选题', + show: true },{ id: 3, - name: '填空题' + name: '判断题', + show: true },{ id: 4, - name: '判断题' + name: '简答题', + show: true },{ id: 5, - name: '简答题' + name: '填空题', + show: true } ], active: 1, @@ -106,6 +113,12 @@ export default { this.paperName = res.paperName this.time = res.time this.allData = res.data + let tabs = this.tabs + res.data.list1.length || (tabs[0].show = false) + res.data.list2.length || (tabs[1].show = false) + res.data.list3.length || (tabs[2].show = false) + res.data.list4.length || (tabs[3].show = false) + res.data.list5.length || (tabs[4].show = false) this.curType = this.allData.list1 this.handleOptions() }).catch(err => {}) diff --git a/src/pages/exception/error/403/index.vue b/src/pages/exception/error/403/index.vue index 45adc1d..e6576d2 100644 --- a/src/pages/exception/error/403/index.vue +++ b/src/pages/exception/error/403/index.vue @@ -1,23 +1,26 @@ diff --git a/src/pages/exception/error/404/index.vue b/src/pages/exception/error/404/index.vue index 02b30ba..bbb8580 100644 --- a/src/pages/exception/error/404/index.vue +++ b/src/pages/exception/error/404/index.vue @@ -1,23 +1,26 @@ diff --git a/src/pages/practice/do/index.vue b/src/pages/practice/do/index.vue index af2bd94..eb4adf9 100644 --- a/src/pages/practice/do/index.vue +++ b/src/pages/practice/do/index.vue @@ -97,7 +97,7 @@ export default { mixins: [ setBackground,examDo ], data() { return { - identification: this.$store.state.identification, + identification: this.$store.state.practice.identification, subjects: [], singleCount: 0, multipleCount: 0, diff --git a/src/pages/wrongBook/list/index.vue b/src/pages/wrongBook/list/index.vue index 5d87913..a5d8242 100644 --- a/src/pages/wrongBook/list/index.vue +++ b/src/pages/wrongBook/list/index.vue @@ -1,99 +1,93 @@