Bläddra i källkod

myvideo的loading修改

pzc 4 år sedan
förälder
incheckning
b79ed85a3e
1 ändrade filer med 10 tillägg och 4 borttagningar
  1. 10 4
      src/views/shortVideo/MyVideos.vue

+ 10 - 4
src/views/shortVideo/MyVideos.vue

@@ -91,7 +91,8 @@ export default {
     },
     // 获取正在转码的视频
     getMyVideoProcessingList() {
-      this.isRequest();
+      this.loading = true;
+      // this.isRequest();
       GetMyVideoListByTranscoding({ pageIndex: 1, pageSize: 1000, name: "" })
         .then(({ data }) => {
           if (data.isSuccess) {
@@ -101,8 +102,10 @@ export default {
             this.$toast(data.ResultMsg);
           }
           Toast.clear();
+          this.loading = false;
         })
         .catch(error => {
+          this.loading = false;
           Toast.clear();
         })
     },
@@ -110,13 +113,13 @@ export default {
     // 获取已发布的视频列表
     getMyVideoList() {
       this.loading = true;
-      this.isRequest();
+      // this.isRequest();
       getDoctorProduction(this.videoParams)
         .then(({ data }) => {
           // return;
+          this.loading = false;
           if (data.isSuccess) {
             Toast.clear();
-            this.loading = false;
             this.videoListTotal = data.pager.totalItemCount;
             if (data.resultObject.length === 0 && this.videoParams.pageIndex === 1) {
               this.isShow = true;
@@ -134,7 +137,10 @@ export default {
             Toast('服务器异常,请稍后重试');
           }
         })
-        .catch(err => { Toast.clear() })
+        .catch(err => { 
+          Toast.clear()
+          this.loading = false;
+        })
     },
 
     // 跳转视频播放页面