diff --git a/src/api/index.js b/src/api/index.js index 6e2a54b..2b678e2 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -24,10 +24,14 @@ export default { userinfo:`management/userInfo/getUserInfo`, getAccount:`management/userInfo/getAccount`, - // 成绩管理 + // 考试成绩 getMyAchievement: `user/testPaperRecord/getMyAchievement`, answerDetail:`management/paperRecord/answerDetail`, + // 练习成绩 + practiseAchievement: `/user/testPaperRecord/practiseAchievement`, + reviewDetail:`/management/practise/review/reviewDetail`, + // 我的考试 addGzAnswerDetails: `/user/exam/addGzAnswerDetails`, addTestPaperRecord: `/user/exam/addTestPaperRecord`, @@ -45,4 +49,11 @@ export default { calculationScorePractice: `/user/practise/calculationScore`, enterPractise: `/user/practise/enterPractise`, getMinePractise: `/user/practise/getMinePractise`, + + // 随机练习 + pageRandomPracticeList:`/user/randomPractice/pageRandomPracticeList`, + randomPractice: `/user/randomPractice/randomPractice`, + AddRandomPractiseExamAnswerDetail: `/user/randomPractice/AddRandomPractiseExamAnswerDetail`, + addPractiseRecordRandom: `/user/randomPractice/addPractiseRecord`, + previewPaper:`/management/testPaper/previewPaper`, } \ No newline at end of file diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 4505aac..3f9c0b6 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -39,13 +39,14 @@ export default { }, methods: { + ...mapActions('user', [ + 'logout' + ]), toPerson(){ this.$router.push('/setting/person') }, loginout() { - sessionStorage.removeItem(Setting.usernameKey); - sessionStorage.removeItem(Setting.storeKey); - location.reload() + this.logout() }, back(){ this.$router.back() diff --git a/src/libs/util.js b/src/libs/util.js index 8ab58bd..1c8fb9a 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -1,5 +1,5 @@ -import cookies from './util.cookies'; -import {_local,_session} from './util.db'; +import cookies from './util.cookies' +import {_local,_session} from './util.db' const util = { cookies, @@ -49,6 +49,30 @@ const util = { } return fmt; }, -}; + // 移除数组中指定值 + removeByValue(arr, val) { + for(var i=0; i { this.$router.replace('/index') }) - .catch(() => { - - }) + .catch(() => {}) } - }); + }) }, toReg() { this.isReg = true diff --git a/src/pages/achievement/detail/index.vue b/src/pages/achievement/detail/index.vue index 00378bc..eb087c1 100644 --- a/src/pages/achievement/detail/index.vue +++ b/src/pages/achievement/detail/index.vue @@ -109,8 +109,7 @@ export default { this.curType = this.allData.list1 this.handleOptions() }) - .catch(err => {}); - + .catch(err => {}) }, tabChange(id){ this.active = id @@ -124,7 +123,6 @@ export default { let options = {} for(let i in n){ if(i.includes('option') && n[i]){ - console.log(i.replace('option_','')) options[i.replace('option_','')] = n[i] } } @@ -184,7 +182,7 @@ export default { left: 0; width: 100%; height: 4px; - background-color: #e80909; + background-color: $main-color; } } } @@ -251,8 +249,8 @@ export default { cursor: pointer; &.submit{ color: #fff; - background-color: #e80909; - border-color: #e80909; + background-color: $main-color; + border-color: $main-color; } &:hover{ opacity: .8; diff --git a/src/pages/achievement/list/practiceResults.vue b/src/pages/achievement/list/practiceResults.vue index 371d7e1..4265cb1 100644 --- a/src/pages/achievement/list/practiceResults.vue +++ b/src/pages/achievement/list/practiceResults.vue @@ -24,11 +24,11 @@ {{scope.$index + (page - 1) * pageSize + 1}} - - - - - + + + + + + + \ No newline at end of file diff --git a/src/pages/practice/list/randomPractice.vue b/src/pages/practice/list/randomPractice.vue index 3b845f9..5c7ca67 100644 --- a/src/pages/practice/list/randomPractice.vue +++ b/src/pages/practice/list/randomPractice.vue @@ -29,16 +29,14 @@ - - - - - + + +