|
|
|
|
@ -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) { |
|
|
|
|
//onSuccess将在点击button之后回调 |
|
|
|
|
/*回调*/ |
|
|
|
|
}, |
|
|
|
|
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) { |
|
|
|
|
|