须知阅读滚动监听注销

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

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

Loading…
Cancel
Save