须知阅读滚动监听注销

main
xuechunyuan 3 years ago
parent 8a7eeec08f
commit e240403d68
  1. 52
      src/views/Guidance.vue

@ -53,32 +53,32 @@ export default {
},
//
doRead() {
let readBox = this.$refs.scrollView;
console.log(readBox.scrollHeight, parseInt(readBox.scrollTop), readBox.clientHeight)
if (readBox.scrollHeight - parseInt(readBox.scrollTop) !== readBox.clientHeight) {
console.log('未阅读完成');
this.isFlag = false;
} else {
this.isFlag = true;
}
if (!this.isFlag) {
//
lightAppJssdk.notification.alert({
message: "须知未完全阅读,请滑动屏幕完成阅读",
title: "提示",//
buttonName: "继续阅读",
success: function (data) {
//onSuccessbutton
/*回调*/
},
fail: function (data) { //
}
});
}
else {
//
this.$router.replace({ name: 'examination', query: { id: this.$route.query.deptId } })
}
this.$router.replace({ name: 'examination', query: { id: this.$route.query.deptId } });
// let readBox = this.$refs.scrollView;
// console.log(readBox.scrollHeight, parseInt(readBox.scrollTop), readBox.clientHeight)
// if (readBox.scrollHeight - parseInt(readBox.scrollTop) !== readBox.clientHeight) {
// console.log('');
// this.isFlag = false;
// } else {
// this.isFlag = true;
// }
// if (!this.isFlag) {
// //
// lightAppJssdk.notification.alert({
// message: "",
// title: "",//
// buttonName: "",
// success: function (data) {
// /**/
// },
// fail: function (data) { //
// }
// });
// }
// else {
// //
// this.$router.replace({ name: 'examination', query: { id: this.$route.query.deptId } })
// }
},
//
scroll(e) {

Loading…
Cancel
Save