Przeglądaj źródła

添加视频列表,出错提示

zhuxinbo 5 lat temu
rodzic
commit
1475679a3e

+ 4 - 2
src/router/index.js

@@ -6,8 +6,10 @@ Vue.use(Router)
 
 const originalPush = Router.prototype.push;
 Router.prototype.push = function push(location) {
-  console.log(location,10001000)
-  return originalPush.call(this, location).catch(err => err)
+  console.log(location,10001000,this,Router)
+  if(location.name){
+    return originalPush.call(this, location).catch(err => err)
+  }
 }
 
 export default new Router({

+ 0 - 4
src/store/modules/user.js

@@ -55,8 +55,6 @@ const user = {
           } else {
             reject(response)
           }
-        }).catch(error => {
-          reject(error)
         })
       })
     },
@@ -78,8 +76,6 @@ const user = {
           } else {
             reject(response)
           }
-        }).catch(error => {
-          reject(error)
         })
       })
     },

+ 15 - 18
src/views/modules/Statistics/Statistics.vue

@@ -388,11 +388,9 @@
             :columns="columns"
             :dataSource="dataTable"
             :pagination="false"
-            :rowKey="record => record.statHour"
             :loading="loading"
             bordered
           >
-            <template slot="yesCost" slot-scope="row">{{row}}</template>
           </a-table>
         </a-card>
       </a-col>
@@ -435,28 +433,28 @@ export default {
       columns: [
         { title: '时间', dataIndex: 'statDate', align: 'center' },
         {
-          title: '总消耗升降值',
+          title: '总消耗缓比',
           dataIndex: 'yesCost',
           scopedSlots: { customRender: 'yesCost' },
           align: 'center'
         },
         { title: '总消耗', dataIndex: 'cost', align: 'center' },
         {
-          title: '封面点击数升降值',
+          title: '封面点击数缓比',
           dataIndex: 'yesPhotoClick',
           scopedSlots: { customRender: 'photoClickProportion' },
           align: 'center'
         },
         { title: '封面点击数', dataIndex: 'photoClick', align: 'center' },
         {
-          title: '封面曝光数升降值',
+          title: '封面曝光数缓比',
           dataIndex: 'yesPhotoShow',
           scopedSlots: { customRender: 'photoShowProportion' },
           align: 'center'
         },
         { title: '封面曝光数', dataIndex: 'photoShow', align: 'center' },
         {
-          title: '素材曝光数升降值',
+          title: '素材曝光数缓比',
           dataIndex: 'yesAclick',
           scopedSlots: { customRender: 'aclickProportion' },
           align: 'center'
@@ -828,11 +826,11 @@ export default {
             if (that.value == 'month') {
               return `${params[0].marker}时间:${params[0].seriesName}-${params[0].name}:${showName}:${params[0].data}  <br/>
             ${params[1].marker}时间:${params[1].seriesName}-${params[0].name}:${showName}:${params[1].data}  <br/>
-            涨跌:${da}<br/> `
+            缓比:${da}<br/> `
             } else {
               return `${params[0].marker}时间:${params[0].seriesName}:${showName}:${params[0].data}  <br/>
             ${params[1].marker}时间:${params[1].seriesName}:${showName}:${params[1].data}  <br/>
-            涨跌:${da}<br/> `
+            缓比:${da}<br/> `
             }
           }
         },
@@ -944,28 +942,28 @@ export default {
           this.columns = [
             { title: '时间', dataIndex: 'statDate', align: 'center' },
             {
-              title: '总消耗升降值',
+              title: '总消耗缓比',
               dataIndex: 'yesCost',
               scopedSlots: { customRender: 'yesCost' },
               align: 'center'
             },
             { title: '总消耗', dataIndex: 'cost', align: 'center' },
             {
-              title: '封面点击数升降值',
+              title: '封面点击数缓比',
               dataIndex: 'yesPhotoClick',
               scopedSlots: { customRender: 'photoClickProportion' },
               align: 'center'
             },
             { title: '封面点击数', dataIndex: 'photoClick', align: 'center' },
             {
-              title: '封面曝光数升降值',
+              title: '封面曝光数缓比',
               dataIndex: 'yesPhotoShow',
               scopedSlots: { customRender: 'photoShowProportion' },
               align: 'center'
             },
             { title: '封面曝光数', dataIndex: 'photoShow', align: 'center' },
             {
-              title: '素材曝光数升降值',
+              title: '素材曝光数缓比',
               dataIndex: 'yesAclick',
               scopedSlots: { customRender: 'aclickProportion' },
               align: 'center'
@@ -1043,28 +1041,28 @@ export default {
         this.columns = [
           { title: '时间', dataIndex: 'statDate', align: 'center' },
           {
-            title: '总消耗升降值',
+            title: '总消耗缓比',
             dataIndex: 'yesCost',
             scopedSlots: { customRender: 'yesCost' },
             align: 'center'
           },
           { title: '总消耗', dataIndex: 'cost', align: 'center' },
           {
-            title: '封面点击数升降值',
+            title: '封面点击数缓比',
             dataIndex: 'yesPhotoClick',
             scopedSlots: { customRender: 'photoClickProportion' },
             align: 'center'
           },
           { title: '封面点击数', dataIndex: 'photoClick', align: 'center' },
           {
-            title: '封面曝光数升降值',
+            title: '封面曝光数缓比',
             dataIndex: 'yesPhotoShow',
             scopedSlots: { customRender: 'photoShowProportion' },
             align: 'center'
           },
           { title: '封面曝光数', dataIndex: 'photoShow', align: 'center' },
           {
-            title: '素材曝光数升降值',
+            title: '素材曝光数缓比',
             dataIndex: 'yesAclick',
             scopedSlots: { customRender: 'aclickProportion' },
             align: 'center'
@@ -1080,7 +1078,6 @@ export default {
           { title: '素材曝光数', dataIndex: 'aclick', align: 'center' }
         ]
       }
-      var columns = []
       switch (checked) {
         case 1:
           arr = [
@@ -1353,7 +1350,7 @@ export default {
               if (params.length > 1) {
                 return `${params[0].marker}今天${params[0].name}时:${params[0].data}  <br/>
               ${params[1].marker}昨天${params[1].name}时:${params[1].data} <br/>
-            涨跌:${da} <br/> `
+            缓比:${da} <br/> `
               } else {
                 return `${params[0].marker}时间:${params[0].name} <br/>
             数值:${params[0].data} `

+ 96 - 59
src/views/modules/video/video.vue

@@ -45,6 +45,42 @@
   filter: blur(20px);
   z-index: 2;
 }
+.tu-title {
+  margin-left: -12px;
+  margin-right: -7px;
+  padding-left: 210px;
+  background: url(//static.yximgs.com/s1/i/qr-bg.77ae5df.jpg) no-repeat;
+  background-size: auto;
+  background-size: 210px;
+  height: 245px;
+  text-align: center;
+}
+.qr-title {
+  display: flex;
+  justify-content: center;
+  position: relative;
+  .img-big {
+    width: 200px;
+    height: 200px;
+    border: 1px solid #f2f2f2;
+  }
+  .reset {
+    width: 200px;
+    height: 200px;
+    position: absolute;
+    background: rgba(255, 255, 255, 0.9);
+    text-align: center;
+    padding: 60px 15px;
+  }
+}
+.back-top {
+  position: fixed;
+  width: 50px;
+  height: 100px;
+  right: 0;
+  bottom: 100px;
+  cursor: pointer;
+}
 </style>
 <style lang="scss">
 .ant-comment-content-detail {
@@ -71,6 +107,9 @@
 .ant-comment-content-author-name {
   width: 100%;
 }
+.xiaoshi .ant-modal-footer {
+  display: none;
+}
 </style>
 <template>
   <div class="vm-video-list">
@@ -204,33 +243,19 @@
         </a-card>
       </a-col>
     </a-row>
-    <div
-      style="position:fixed;width:50px;height:100px;right:0;bottom:100px;cursor: pointer;"
-      v-show="scollTop>300"
-      @click="backTop"
-    >
+    <div class="back-top" v-show="scollTop>300" @click="backTop">
       <a-icon type="arrow-up" style="font-size:30px" />
     </div>
-    <a-modal title="扫描二维码登录" v-model="showCode" @cancel="showCode = false">
-      <div style="display:flex;
-  justify-content: space-around">
-        <div
-          style="margin-left: -12px;margin-right: -7px;padding-left: 210px;background: url(//static.yximgs.com/s1/i/qr-bg.77ae5df.jpg) no-repeat;
-    background-size: auto;
-background-size: 210px;
-height: 245px;
-text-align: center;"
-        ></div>
-        <div style="display: flex;justify-content: center;position:relative">
-          <img :src="qrcode" alt style="width:200px;height:200px;border:1px solid #f2f2f2" />
+    <a-modal title="扫描二维码登录" v-model="showCode" @cancel="showCode = false" class="xiaoshi">
+      <div style="display:flex;justify-content: space-around">
+        <div class="tu-title"></div>
+        <div class="qr-title">
+          <img :src="qrcode" alt class="img-big" />
           <div style="position:absolute;bottom:10px">
             请使用
             <span style="color:#ff5000">快手APP</span>扫码登录
           </div>
-          <div
-            style="width:200px;height:200px;position:absolute;background:rgba(255,255,255,.9);text-align:center;padding:60px 15px"
-            v-show="showShare"
-          >
+          <div class="reset" style v-show="showShare">
             <div style="margin-bottom:5px">
               <img :src="url" alt />
             </div>
@@ -314,7 +339,8 @@ export default {
     scrollGet(item, i, e) {
       var b = document.getElementsByClassName('scrollBox')[i]
       if (b.scrollHeight - b.scrollTop < 250 && item.pcursor != 'no_more') {
-        if (b.scrollHeight - b.scrollTop > 235) {
+        if (b.scrollHeight - b.scrollTop > 235 && item.pcursor != 'no_more') {
+          alert(1)
           this.getCommentList(this.ksid, this.dataShow[i].photoId, item.pcursor).then(dataOne => {
             this.dataShow[i].loading = false
             if (dataOne && this.dataShow[i]) {
@@ -327,11 +353,14 @@ export default {
                 }
               })
               this.dataShow[i].commentList.push(...dataNew)
+              this.dataShow[i].pcursor = pcursor
             } else {
               this.dataShow[i].commentList = []
             }
           })
         }
+      } else {
+        return
       }
     },
     handleChange(value) {
@@ -383,7 +412,6 @@ export default {
           })
           this.pcursor = res.result.data.publicFeeds.pcursor
           this.dataShow.push(...data)
-          var i = 0
           for (let i = 0; i < that.dataShow.length; i++) {
             that.dataShow[i].loading = false
             if (that.dataShow[i].commentCount > 0) {
@@ -391,13 +419,13 @@ export default {
                 that.dataShow[i].loading = false
                 if (dataOne && that.dataShow[i]) {
                   var pcursor = dataOne.pcursor
+                  that.dataShow[i].pcursor = pcursor
                   that.dataShow[i].commentList = dataOne.commentList.map(item => {
                     return {
                       ...item,
                       show: false
                     }
                   })
-                  that.dataShow[i].pcursor = pcursor
                 } else {
                   that.dataShow[i].commentList = []
                 }
@@ -423,25 +451,30 @@ export default {
       return new Promise(resolve => setTimeout(resolve, d))
     },
     remove(allItem, item, index) {
-      console.log(allItem, item)
-      commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
-        this.getCommentList(this.ksid, allItem.photoId, null).then(dataOne => {
-          this.dataShow[index].loading = false
-          this.dataShow[index].commentList = []
-          if (dataOne && this.dataShow[index]) {
-            var pcursor = dataOne.pcursor
-            this.dataShow[index].pcursor = pcursor
-            this.dataShow[index].commentList = dataOne.commentList.map(item => {
-              return {
-                ...item,
-                show: false
-              }
-            })
-          } else {
+      allItem.loading = true
+      if (res.result.result == 109) {
+        this.$message.error('授权已过期,请重新扫码登录')
+        allItem.loading = false
+      } else {
+        commentDelete({ ksid: this.ksid, photoId: allItem.photoId, commentId: item.commentId }).then(res => {
+          this.getCommentList(this.ksid, allItem.photoId, null).then(dataOne => {
+            allItem.loading = false
             this.dataShow[index].commentList = []
-          }
+            if (dataOne && this.dataShow[index]) {
+              var pcursor = dataOne.pcursor
+              this.dataShow[index].pcursor = pcursor
+              this.dataShow[index].commentList = dataOne.commentList.map(item => {
+                return {
+                  ...item,
+                  show: false
+                }
+              })
+            } else {
+              this.dataShow[index].commentList = []
+            }
+          })
         })
-      })
+      }
     },
     getScrollTop: function() {
       var scrollTop = 0,
@@ -505,9 +538,8 @@ export default {
       document.documentElement.scrollTop = 0
     },
     addComment(item, index) {
-      console.log(item)
       var word = item.keyword.substring(this.length)
-      console.log(word)
+      item.loading = true
       var params = {
         ksid: this.ksid,
         photoId: item.photoId,
@@ -516,29 +548,35 @@ export default {
         repltTo: this.repltTo
       }
       commentAdd(params).then(res => {
-        console.log(res)
         if (res.code == 0) {
-          this.getCommentList(this.ksid, item.photoId, null).then(dataOne => {
-            this.dataShow[index].loading = false
-            this.dataShow[index].commentList = []
-            if (dataOne && this.dataShow[index]) {
-              this.dataShow[index].commentList = dataOne.commentList.map(item => {
-                return {
-                  ...item,
-                  show: false
-                }
-              })
-            } else {
+          if (res.result.result == 109) {
+            this.$message.error('授权已过期,请重新扫码登录')
+            item.loading = false
+          } else {
+            this.getCommentList(this.ksid, item.photoId, null).then(dataOne => {
+              item.loading = false
               this.dataShow[index].commentList = []
-            }
-          })
+              if (dataOne && this.dataShow[index]) {
+                var pcursor = dataOne.pcursor
+                this.dataShow[index].pcursor = pcursor
+                this.dataShow[index].commentList = dataOne.commentList.map(item => {
+                  return {
+                    ...item,
+                    show: false
+                  }
+                })
+              } else {
+                this.dataShow[index].commentList = []
+              }
+            })
+          }
+
           this.length = 0
           item.keyword = ''
         }
       })
     },
     backAdd(item, items) {
-      console.log(item, items)
       // authorId  commentId
       item.keyword = '回复' + items.authorName + ':'
       this.length = item.keyword.length
@@ -579,7 +617,6 @@ export default {
   },
   watch: {
     showCode(n, o) {
-      console.log(n, o)
       if (!n) {
         window.clearInterval(objTimer)
       } else {