From c10e6765530b305f11465650bb7deb3d7fb580a9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 25 Dec 2020 11:52:08 +0800 Subject: [PATCH] . --- src/api/index.js | 13 +- src/layouts/header/index.vue | 7 +- src/libs/util.js | 32 +- src/pages/account/login/index.vue | 7 +- src/pages/achievement/detail/index.vue | 10 +- .../achievement/list/practiceResults.vue | 42 ++- src/pages/achievement/practice/index.vue | 279 ++++++++++++++ src/pages/practice/list/randomPractice.vue | 29 +- src/pages/practice/randomDo/index.vue | 353 ++++++++++++++++++ src/router/modules/achievement.js | 6 + src/router/modules/practice.js | 5 + src/setting.js | 2 +- .../lib/{background.scss => _background.scss} | 0 src/styles/lib/{border.scss => _border.scss} | 0 src/styles/lib/{box.scss => _box.scss} | 0 src/styles/lib/{cursor.scss => _cursor.scss} | 0 .../lib/{display.scss => _display.scss} | 0 src/styles/lib/{flex.scss => _flex.scss} | 0 src/styles/lib/{float.scss => _float.scss} | 0 .../lib/{font-size.scss => _font-size.scss} | 0 .../{font-weight.scss => _font-weight.scss} | 0 .../{line-height.scss => _line-height.scss} | 0 src/styles/lib/{link.scss => _link.scss} | 0 .../lib/{overflow.scss => _overflow.scss} | 0 .../lib/{position.scss => _position.scss} | 0 src/styles/lib/{size.scss => _size.scss} | 0 .../lib/{text-align.scss => _text-align.scss} | 0 .../lib/{text-color.scss => _text-color.scss} | 0 ...rtical-align.scss => _vertical-align.scss} | 0 .../lib/{visibility.scss => _visibility.scss} | 0 .../{white-space.scss => _white-space.scss} | 0 src/styles/lib/index.scss | 2 +- src/styles/pages/tree.scss | 104 ++++++ src/styles/var.scss | 24 ++ vue.config.js | 3 + 35 files changed, 867 insertions(+), 51 deletions(-) create mode 100644 src/pages/achievement/practice/index.vue create mode 100644 src/pages/practice/randomDo/index.vue rename src/styles/lib/{background.scss => _background.scss} (100%) rename src/styles/lib/{border.scss => _border.scss} (100%) rename src/styles/lib/{box.scss => _box.scss} (100%) rename src/styles/lib/{cursor.scss => _cursor.scss} (100%) rename src/styles/lib/{display.scss => _display.scss} (100%) rename src/styles/lib/{flex.scss => _flex.scss} (100%) rename src/styles/lib/{float.scss => _float.scss} (100%) rename src/styles/lib/{font-size.scss => _font-size.scss} (100%) rename src/styles/lib/{font-weight.scss => _font-weight.scss} (100%) rename src/styles/lib/{line-height.scss => _line-height.scss} (100%) rename src/styles/lib/{link.scss => _link.scss} (100%) rename src/styles/lib/{overflow.scss => _overflow.scss} (100%) rename src/styles/lib/{position.scss => _position.scss} (100%) rename src/styles/lib/{size.scss => _size.scss} (100%) rename src/styles/lib/{text-align.scss => _text-align.scss} (100%) rename src/styles/lib/{text-color.scss => _text-color.scss} (100%) rename src/styles/lib/{vertical-align.scss => _vertical-align.scss} (100%) rename src/styles/lib/{visibility.scss => _visibility.scss} (100%) rename src/styles/lib/{white-space.scss => _white-space.scss} (100%) create mode 100644 src/styles/pages/tree.scss create mode 100644 src/styles/var.scss 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 @@ - - - - - + + +