|
@@ -3,6 +3,8 @@ import {
|
|
|
} from '~/api/video'
|
|
|
let rowHeight = 0
|
|
|
let videoContext = null
|
|
|
+let stl = null
|
|
|
+let setTimeoutObj = null
|
|
|
Page({
|
|
|
data: {
|
|
|
videoInfo: {},
|
|
@@ -103,7 +105,7 @@ Page({
|
|
|
this.setData({
|
|
|
'countDown.state': true
|
|
|
})
|
|
|
- setInterval(() => {
|
|
|
+ this.stl = setInterval(() => {
|
|
|
if (this.data.countDown.num == 0) {
|
|
|
clearInterval(this.stl)
|
|
|
this.setData({
|
|
@@ -123,6 +125,7 @@ Page({
|
|
|
}, 1000)
|
|
|
},
|
|
|
startRecording() {
|
|
|
+ console.log('递归');
|
|
|
if (this.data.currentRow == null) {
|
|
|
this.setData({
|
|
|
currentRow: 0
|
|
@@ -132,7 +135,7 @@ Page({
|
|
|
if (!row.readTime) {
|
|
|
return
|
|
|
}
|
|
|
- let setTimeoutObj = setTimeout(() => {
|
|
|
+ this.setTimeoutObj = setTimeout(() => {
|
|
|
this.setData({
|
|
|
currentRow: ++this.data.currentRow
|
|
|
})
|
|
@@ -155,7 +158,8 @@ Page({
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
onUnload() {
|
|
|
-
|
|
|
+ clearTimeout(this.setTimeoutObj)
|
|
|
+ clearInterval(this.stl)
|
|
|
},
|
|
|
onShareAppMessage() {
|
|
|
|