Bladeren bron

修改内容

zhuxinbo 5 jaren geleden
bovenliggende
commit
3540b514fd
2 gewijzigde bestanden met toevoegingen van 12 en 9 verwijderingen
  1. 0 1
      src/views/modules/Statistics/Statistics.vue
  2. 12 8
      src/views/modules/video/video.vue

+ 0 - 1
src/views/modules/Statistics/Statistics.vue

@@ -72,7 +72,6 @@ export default {
         getAccountReport().then(res=>{
             if(res.code == 0){
                 console.log(res)
-                // this.statistics = res
             }
         })
     })

+ 12 - 8
src/views/modules/video/video.vue

@@ -148,7 +148,7 @@
 import ARow from 'ant-design-vue/es/grid/Row'
 import ACol from 'ant-design-vue/es/grid/Col'
 import axios from 'axios'
-var interval
+var interval, objTimer
 import {
   getLoginQr,
   getUserList,
@@ -275,12 +275,12 @@ export default {
       return new Promise(resolve => setTimeout(resolve, d))
     },
     remove(allItem, item, index) {
-      //   console.log(allItem, item)
-      //   allItem.commentList.splice(index, 1)
-      //   //   String ksid,String photoId,Long commentId
-      //   commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
-      //     console.log(res)
-      //   })
+      console.log(allItem, item)
+      allItem.commentList.splice(index, 1)
+      //   String ksid,String photoId,Long commentId
+      commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
+        console.log(res)
+      })
     },
     getScrollTop: function() {
       var scrollTop = 0,
@@ -341,6 +341,10 @@ export default {
     }
   },
   watch: {},
+  distoryed() {
+    clearInterval(interval)
+    window.clearInterval(objTimer)
+  },
   mounted: function() {
     this.$nextTick(() => {
       var that = this
@@ -348,7 +352,7 @@ export default {
       //   getAccountReport().then(res => {
       //     console.log(res)
       //   })
-      window.setInterval(() => {
+      objTimer = window.setInterval(() => {
         if (that.showCode) {
           setTimeout(function() {
             getLoginStatus({ requestId: that.requestId }).then(res => {