|
@@ -159,6 +159,8 @@ export default {
|
|
|
showAudioBox: false,
|
|
|
curTime: 0,
|
|
|
titleTxT: "",
|
|
|
+ readTiem: 0,
|
|
|
+ setIntervalTiem: null,
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -229,7 +231,7 @@ export default {
|
|
|
},
|
|
|
/* 无权限申请开通权限 */
|
|
|
applyAuth() {
|
|
|
- let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary"
|
|
|
+ let istype = this.isType == 2 ? "Researchsummary" : "Minutessummary";
|
|
|
this.hasPermission === 4
|
|
|
? uni.navigateTo({
|
|
|
url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
|
|
@@ -339,14 +341,25 @@ export default {
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
+ this.readTiem = 0;
|
|
|
+ this.setIntervalTiem = setInterval(() => {
|
|
|
+ this.readTiem++;
|
|
|
+ }, 1000);
|
|
|
if (!this.$store.state.isAuth && !this.$store.state.isBind) {
|
|
|
this.getDetilaiList();
|
|
|
}
|
|
|
this.$store.commit("setRouterReport", this.titleTxT);
|
|
|
this.showAudioBox = true;
|
|
|
},
|
|
|
- onHide() {
|
|
|
+ // 页面隐藏/切入后台时触发
|
|
|
+ async onHide() {
|
|
|
this.showAudioBox = false;
|
|
|
+
|
|
|
+ clearInterval(this.setIntervalTiem);
|
|
|
+ },
|
|
|
+ // 页面卸载时触发
|
|
|
+ async onUnload() {
|
|
|
+ clearInterval(this.setIntervalTiem);
|
|
|
},
|
|
|
/**
|
|
|
* 用户点击分享
|