From a1d59f779b907be59f66b2b58d25d8649e2e9b14 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Wed, 27 Mar 2024 15:29:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 2 +- pages/learning/index.vue | 49 +++++++++++++++++++--------- pages/learningCenter/clockRecord.vue | 2 +- pages/special/grade_list.vue | 9 +++-- 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/manifest.json b/manifest.json index 9610d23..1f96b0b 100644 --- a/manifest.json +++ b/manifest.json @@ -129,7 +129,7 @@ "desc" : "用于小程序首页位置展示" } }, - "requiredPrivateInfos":["getLocation"] + "requiredPrivateInfos" : [ "getLocation" ] }, "mp-alipay" : { "usingComponents" : true diff --git a/pages/learning/index.vue b/pages/learning/index.vue index 8f94246..40522ca 100644 --- a/pages/learning/index.vue +++ b/pages/learning/index.vue @@ -169,16 +169,18 @@ import store from "@/store"; }); }, checkRecord() { - uni.navigateTo({ - url: `/pages/learningCenter/clockRecord?clockDays=${this.learningData.user_study.days}&todayClock=${this.learningData.user_clock_in.list.length > 0}`, - }) + this.$util.checkLogin(() => { + uni.navigateTo({ + url: `/pages/learningCenter/clockRecord?clockDays=${this.learningData.user_study.days}&todayClock=${this.learningData.user_clock_in.list.length > 0}`, + }) + }, true); }, changeCate() { - // this.$util.checkLogin(() => { + this.$util.checkLogin(() => { uni.navigateTo({ url: '/pages/store/goodsCate?type=learning' }); - // }, true) + }, true) }, toMoreCourse(key) { if (key === 'offline_courses') { @@ -192,20 +194,37 @@ import store from "@/store"; } }, handleReciteClick(item) { - uni.navigateTo({ - url: `/pages/learningCenter/recite?id=${item.id}` - }) + this.$util.checkLogin(() => { + uni.navigateTo({ + url: `/pages/learningCenter/recite?id=${item.id}` + }) + }, true); }, handleQestionClick(item) { - uni.navigateTo({ - url: `/pages/learningCenter/brushQuestion?id=${item.id}` - }) + this.$util.checkLogin(() => { + uni.navigateTo({ + url: `/pages/learningCenter/brushQuestion?id=${item.id}` + }) + }, true); }, toPractice(id) { - uni.navigateTo({ - url: `/pages/special/question_index?id=${id}&is_analysis=${1}`, - }); - } + this.$util.checkLogin(() => { + uni.navigateTo({ + url: `/pages/special/question_index?id=${id}&is_analysis=${1}`, + }); + }, true); + }, + handleSpecialClick(item, type) { + const url = item.is_light + ? '/pages/special/single_details?id=' + (type ? item.s_id : item.id) + : '/pages/special/details?id=' + (type ? item.s_id : item.id); + + // this.$util.checkLogin(() => { + uni.navigateTo({ + url, + }); + // }, this.showLoginPage); + }, }, }; diff --git a/pages/learningCenter/clockRecord.vue b/pages/learningCenter/clockRecord.vue index 4a003ec..2d1ab56 100644 --- a/pages/learningCenter/clockRecord.vue +++ b/pages/learningCenter/clockRecord.vue @@ -95,7 +95,7 @@ ); uni.hideLoading(); this.recordList = this.recordList.concat(data); - console.log(this.recordList); + console.log(JSON.stringify(this.recordList)); this.finished = data.length < this.limit; this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多"; }, diff --git a/pages/special/grade_list.vue b/pages/special/grade_list.vue index 0f6dc89..50bf285 100644 --- a/pages/special/grade_list.vue +++ b/pages/special/grade_list.vue @@ -221,12 +221,13 @@ export default { }, // 触摸过程 drawMove(id, e) { - console.log('过程',e.changedTouches[0]); + console.log('过程',e.changedTouches); var endX = e.changedTouches[0].clientX; let diff = endX - this.clientX; console.log(diff); if (Math.abs(diff) <= 60 && diff < 0) { + console.log(this.$refs.box_center); let box_center = this.$refs.box_center[id] // console.log(diff); box_center.$el.style.left = diff + 'px' @@ -235,10 +236,9 @@ export default { }, // 结束触摸 drawEnd(id, e) { - // console.log('结束',e.changedTouches[0]); + console.log('结束',e.changedTouches[0]); var endX = e.changedTouches[0].clientX; let diff = endX - this.clientX; - let box_center = this.$refs.box_center[id] if (Math.abs(diff) > 20) { // console.log('移动',diff,id,e); if (diff < 0) { @@ -255,6 +255,7 @@ export default { this.$set(this, "gradeList", []); this.page = 1; this.loadend = false; + this.activeHeaderMask = -1; this.getGradeList(); }); } else if (this.active === 2) { @@ -266,6 +267,7 @@ export default { this.$set(this, "gradeList", []); this.page = 1; this.loadend = false; + this.activeHeaderMask = -1; this.getGradeList(); }) } else { @@ -275,6 +277,7 @@ export default { this.$set(this, "gradeList", []); this.page = 1; this.loadend = false; + this.activeHeaderMask = -1; this.getGradeList(); }) .catch((err) => {