From b898d79f8db424b25f049c215edaa91fd391ef17 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Tue, 26 Mar 2024 17:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/learning.js | 4 ++++ pages/learning/index.vue | 24 ++++-------------------- pages/store/goodsCate.vue | 20 +++++++++++++------- pages/topic/problem_index.vue | 6 ++++-- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/api/learning.js b/api/learning.js index c3faca6..712d962 100644 --- a/api/learning.js +++ b/api/learning.js @@ -22,4 +22,8 @@ export function getDateRecordList(params){ export function reciteClock(params){ return http.get("/clearance/recite", params) +} + +export function changeCategory(params){ + return http.get("/clearance/study", params) } \ No newline at end of file diff --git a/pages/learning/index.vue b/pages/learning/index.vue index 48a2176..8922f4f 100644 --- a/pages/learning/index.vue +++ b/pages/learning/index.vue @@ -120,13 +120,6 @@ import store from "@/store"; data() { return { loading: false, - myExam: { - examName: '职业技能考试', - grade_id: 1, - subject_id: 7, - examTime: '2024-1-12', - examDays: 180, - }, indexMenu: [ { menuName: '视频课', key: 'video' }, { menuName: '直播课', key: 'live' }, @@ -141,15 +134,7 @@ import store from "@/store"; return store.getters.position; }, }, - watch: { - myExam: { - deep: true, - handler() { - this.getLearningData(); - }, - } - }, - onLoad() { + onShow() { this.getLearningData(); }, onPageScroll(e) { @@ -167,7 +152,6 @@ import store from "@/store"; async getLearningData() { try { const { data } = await getLearningData({ - subject_id: this.myExam.subject_id, city: this.position, }); console.log(data); @@ -199,11 +183,11 @@ import store from "@/store"; toMoreCourse(key) { if (key === 'offline_courses') { uni.navigateTo({ - url: `/pages/activity/activity_list?gradeId=${this.myExam.gradeId}&subjectId=${this.myExam.subjectId}` + url: `/pages/activity/activity_list?gradeId=${this.learningData.exam.gradeId}&subjectId=${this.learningData.exam.subjectId}` }); } else { uni.navigateTo({ - url: `/pages/special/search?gradeId=${this.myExam.grade_id}&subjectId=${this.myExam.subject_id}&specialType=${ key === 'live' ? 4 : 3}` + url: `/pages/special/search?gradeId=${this.learningData.exam.grade_id}&subjectId=${this.learningData.exam.subject_id}&specialType=${ key === 'live' ? 4 : 3}` }) } }, @@ -219,7 +203,7 @@ import store from "@/store"; }, toPractice(id) { uni.navigateTo({ - url: `/pages/topic/problem_index?id=${id}`, + url: `/pages/special/question_index?id=${id}&is_analysis=${1}`, }); } }, diff --git a/pages/store/goodsCate.vue b/pages/store/goodsCate.vue index 0881e09..1bb0261 100644 --- a/pages/store/goodsCate.vue +++ b/pages/store/goodsCate.vue @@ -28,6 +28,7 @@