feature/v-xuexi
wangdong 8 months ago
parent 37ad3ae3d0
commit a1d59f779b
  1. 2
      manifest.json
  2. 49
      pages/learning/index.vue
  3. 2
      pages/learningCenter/clockRecord.vue
  4. 9
      pages/special/grade_list.vue

@ -129,7 +129,7 @@
"desc" : "用于小程序首页位置展示" "desc" : "用于小程序首页位置展示"
} }
}, },
"requiredPrivateInfos":["getLocation"] "requiredPrivateInfos" : [ "getLocation" ]
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true

@ -169,16 +169,18 @@ import store from "@/store";
}); });
}, },
checkRecord() { checkRecord() {
uni.navigateTo({ this.$util.checkLogin(() => {
url: `/pages/learningCenter/clockRecord?clockDays=${this.learningData.user_study.days}&todayClock=${this.learningData.user_clock_in.list.length > 0}`, uni.navigateTo({
}) url: `/pages/learningCenter/clockRecord?clockDays=${this.learningData.user_study.days}&todayClock=${this.learningData.user_clock_in.list.length > 0}`,
})
}, true);
}, },
changeCate() { changeCate() {
// this.$util.checkLogin(() => { this.$util.checkLogin(() => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/store/goodsCate?type=learning' url: '/pages/store/goodsCate?type=learning'
}); });
// }, true) }, true)
}, },
toMoreCourse(key) { toMoreCourse(key) {
if (key === 'offline_courses') { if (key === 'offline_courses') {
@ -192,20 +194,37 @@ import store from "@/store";
} }
}, },
handleReciteClick(item) { handleReciteClick(item) {
uni.navigateTo({ this.$util.checkLogin(() => {
url: `/pages/learningCenter/recite?id=${item.id}` uni.navigateTo({
}) url: `/pages/learningCenter/recite?id=${item.id}`
})
}, true);
}, },
handleQestionClick(item) { handleQestionClick(item) {
uni.navigateTo({ this.$util.checkLogin(() => {
url: `/pages/learningCenter/brushQuestion?id=${item.id}` uni.navigateTo({
}) url: `/pages/learningCenter/brushQuestion?id=${item.id}`
})
}, true);
}, },
toPractice(id) { toPractice(id) {
uni.navigateTo({ this.$util.checkLogin(() => {
url: `/pages/special/question_index?id=${id}&is_analysis=${1}`, 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);
},
}, },
}; };
</script> </script>

@ -95,7 +95,7 @@
); );
uni.hideLoading(); uni.hideLoading();
this.recordList = this.recordList.concat(data); this.recordList = this.recordList.concat(data);
console.log(this.recordList); console.log(JSON.stringify(this.recordList));
this.finished = data.length < this.limit; this.finished = data.length < this.limit;
this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多"; this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多";
}, },

@ -221,12 +221,13 @@ export default {
}, },
// //
drawMove(id, e) { drawMove(id, e) {
console.log('过程',e.changedTouches[0]); console.log('过程',e.changedTouches);
var endX = e.changedTouches[0].clientX; var endX = e.changedTouches[0].clientX;
let diff = endX - this.clientX; let diff = endX - this.clientX;
console.log(diff); console.log(diff);
if (Math.abs(diff) <= 60 && diff < 0) { if (Math.abs(diff) <= 60 && diff < 0) {
console.log(this.$refs.box_center);
let box_center = this.$refs.box_center[id] let box_center = this.$refs.box_center[id]
// console.log(diff); // console.log(diff);
box_center.$el.style.left = diff + 'px' box_center.$el.style.left = diff + 'px'
@ -235,10 +236,9 @@ export default {
}, },
// //
drawEnd(id, e) { drawEnd(id, e) {
// console.log('',e.changedTouches[0]); console.log('结束',e.changedTouches[0]);
var endX = e.changedTouches[0].clientX; var endX = e.changedTouches[0].clientX;
let diff = endX - this.clientX; let diff = endX - this.clientX;
let box_center = this.$refs.box_center[id]
if (Math.abs(diff) > 20) { if (Math.abs(diff) > 20) {
// console.log('',diff,id,e); // console.log('',diff,id,e);
if (diff < 0) { if (diff < 0) {
@ -255,6 +255,7 @@ export default {
this.$set(this, "gradeList", []); this.$set(this, "gradeList", []);
this.page = 1; this.page = 1;
this.loadend = false; this.loadend = false;
this.activeHeaderMask = -1;
this.getGradeList(); this.getGradeList();
}); });
} else if (this.active === 2) { } else if (this.active === 2) {
@ -266,6 +267,7 @@ export default {
this.$set(this, "gradeList", []); this.$set(this, "gradeList", []);
this.page = 1; this.page = 1;
this.loadend = false; this.loadend = false;
this.activeHeaderMask = -1;
this.getGradeList(); this.getGradeList();
}) })
} else { } else {
@ -275,6 +277,7 @@ export default {
this.$set(this, "gradeList", []); this.$set(this, "gradeList", []);
this.page = 1; this.page = 1;
this.loadend = false; this.loadend = false;
this.activeHeaderMask = -1;
this.getGradeList(); this.getGradeList();
}) })
.catch((err) => { .catch((err) => {

Loading…
Cancel
Save