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

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

@ -169,16 +169,18 @@ import store from "@/store";
});
},
checkRecord() {
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) {
this.$util.checkLogin(() => {
uni.navigateTo({
url: `/pages/learningCenter/recite?id=${item.id}`
})
}, true);
},
handleQestionClick(item) {
this.$util.checkLogin(() => {
uni.navigateTo({
url: `/pages/learningCenter/brushQuestion?id=${item.id}`
})
}, true);
},
toPractice(id) {
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);
},
},
};
</script>

@ -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 ? "已全部加载完" : "上拉加载更多";
},

@ -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) => {

Loading…
Cancel
Save