浏览代码

修改字段

zhuxinbo 5 年之前
父节点
当前提交
c07d313a6e
共有 2 个文件被更改,包括 92 次插入76 次删除
  1. 22 29
      src/views/modules/Statistics/Statistics.vue
  2. 70 47
      src/views/modules/video/video.vue

+ 22 - 29
src/views/modules/Statistics/Statistics.vue

@@ -407,6 +407,8 @@ import moment from 'moment'
 import countTo from 'vue-count-to'
 import { getAccountReport, getKsAccountReport, getKsDetail, getReportList } from '@api/video.js'
 import { getAction, postAction } from '@/api/manage'
+var upDate
+
 // 引入基本模板
 let echarts = require('echarts/lib/echarts')
 // 引入柱状图组件
@@ -843,16 +845,7 @@ export default {
           bottom: '2%',
           containLabel: true
         },
-        toolbox: {
-          left: 'right',
-          feature: {
-            dataZoom: {
-              yAxisIndex: 'none'
-            },
-            restore: {},
-            saveAsImage: {}
-          }
-        },
+
         xAxis: {
           type: 'category',
           data: dataDate,
@@ -1244,7 +1237,7 @@ export default {
         })
       } else if (type == 'photoClick') {
         dataLegend = ['封面点击数']
-         dataElse = data.map(item => {
+        dataElse = data.map(item => {
           if (item.now) {
             return { proportion: (item.now.photoClickProportion * 100).toFixed(2) + '%', statHour: item.statHour }
           } else {
@@ -1253,18 +1246,18 @@ export default {
         })
       } else if (type == 'photoShow') {
         dataLegend = ['封面曝光数']
-         dataElse = data.map(item => {
+        dataElse = data.map(item => {
           if (item.now) {
-            return { proportion: (item.now.photoShowProportion * 100).toFixed(2) + '%', statHour: item.statHour }
+            return { proportion: (item.now.showProportion * 100).toFixed(2) + '%', statHour: item.statHour }
           } else {
             return { proportion: 0, statHour: item.statHour }
           }
         })
       } else if (type == 'aclick') {
         dataLegend = ['素材曝光数']
-         dataElse = data.map(item => {
+        dataElse = data.map(item => {
           if (item.now) {
-            return { proportion: (item.now.aclickProportion * 100).toFixed(2) + '%', statHour: item.statHour }
+            return { proportion: (item.now.aClickProportion * 100).toFixed(2) + '%', statHour: item.statHour }
           } else {
             return { proportion: 0, statHour: item.statHour }
           }
@@ -1375,16 +1368,7 @@ export default {
           bottom: '2%',
           containLabel: true
         },
-        toolbox: {
-          left: 'right',
-          feature: {
-            dataZoom: {
-              yAxisIndex: 'none'
-            },
-            restore: {},
-            saveAsImage: {}
-          }
-        },
+
         xAxis: {
           type: 'category',
           data: dataDate,
@@ -1449,11 +1433,20 @@ export default {
   mounted: function() {
     this.$nextTick(() => {
       var that = this
-      this.drawLine(1)
-      this.getKsDetail(1).then(res => {
-        this.drawPie('cost', res)
+      that.drawLine(1)
+      that.getKsDetail(1).then(res => {
+        that.drawPie('cost', res)
       })
-      this.getReportList(1, that.allValue)
+      that.getReportList(1, that.allValue)
+      upDate = window.setInterval(() => {
+        setTimeout(() => {
+          that.drawLine(1)
+          that.getKsDetail(1).then(res => {
+            that.drawPie('cost', res)
+          })
+          that.getReportList(1, that.allValue)
+        }, 0)
+      }, 1000000)
     })
   }
 }

+ 70 - 47
src/views/modules/video/video.vue

@@ -1,4 +1,4 @@
-<style>
+<style lang="scss" scoped>
 @media (min-width: 1024px) {
   .checkbox_item_container {
     width: 70%;
@@ -45,10 +45,11 @@
   filter: blur(20px);
   z-index: 2;
 }
+</style>
+<style lang="scss">
 .ant-comment-content-detail {
   word-wrap: break-word;
   word-break: normal;
-
 }
 .ant-comment-content-detail p {
   word-wrap: break-word;
@@ -210,18 +211,32 @@
     >
       <a-icon type="arrow-up" style="font-size:30px" />
     </div>
-    <a-modal title="扫描二维码登录" v-model="showCode" :width="300" @cancel="showCode = false">
-      <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">
+      <div style="display:flex;
+  justify-content: space-around">
         <div
-          style="width:200px;height:200px;position:absolute;background:rgba(255,255,255,.9);text-align:center;padding:60px 15px"
-          v-show="showShare"
-        >
-          <div style="margin-bottom:5px">
-            <img :src="url" alt />
+          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" />
+          <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 style="margin-bottom:5px">
+              <img :src="url" alt />
+            </div>
+            <p>{{showTitle}}</p>
+            <span @click="addUser" style="color:red;cursor: pointer;" v-show="showSpan">刷新</span>
           </div>
-          <p>{{showTitle}}</p>
-          <span @click="addUser" style="color:red;cursor: pointer;" v-show="showSpan">刷新</span>
         </div>
       </div>
     </a-modal>
@@ -348,6 +363,7 @@ export default {
       this.showCode = true
       getLoginQr().then(res => {
         if (res.code == 0) {
+          this.showShare = false
           this.qrcode = res.result.qrcode
           this.requestId = res.result.requestId
         }
@@ -524,13 +540,53 @@ export default {
     backAdd(item, items) {
       console.log(item, items)
       // authorId  commentId
-      item.keyword = '回复' + items.authorName
+      item.keyword = '回复' + items.authorName + ':'
       this.length = item.keyword.length
       this.repltTo = items.authorId
       this.replyToCommentId = items.commentId
+    },
+    setInterOut() {
+      var that = this
+      if (that.showCode) {
+        setTimeout(function() {
+          getLoginStatus({ requestId: that.requestId }).then(res => {
+            if (res.code == 0) {
+              if (res.result) {
+                if (res.result.status == 1) {
+                  that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                  that.showShare = false
+                } else {
+                  that.url = 'http://static.yximgs.com/s1/i/qr-timeout.36ec907.svg'
+                  that.showShare = true
+                  that.showSpan = true
+                  that.showTitle = res.result.msg
+                  if (res.result.status == 3) {
+                    that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                    that.showSpan = false
+                    that.showCode = false
+                    that.getUserList()
+                  } else if (res.result.status == 2) {
+                    that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
+                    that.showSpan = false
+                  }
+                }
+              }
+            }
+          })
+        }, 0)
+      }
+    }
+  },
+  watch: {
+    showCode(n, o) {
+      console.log(n, o)
+      if (!n) {
+        window.clearInterval(objTimer)
+      } else {
+        objTimer = window.setInterval(this.setInterOut, 1000)
+      }
     }
   },
-  watch: {},
   distoryed() {
     clearInterval(interval)
     window.clearInterval(objTimer)
@@ -539,39 +595,6 @@ export default {
     this.$nextTick(() => {
       var that = this
       this.getUserList()
-      //   getAccountReport().then(res => {
-      //     console.log(res)
-      //   })
-      objTimer = window.setInterval(() => {
-        if (that.showCode) {
-          setTimeout(function() {
-            getLoginStatus({ requestId: that.requestId }).then(res => {
-              if (res.code == 0) {
-                if (res.result) {
-                  if (res.result.status == 1) {
-                    that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
-                    that.showShare = false
-                  } else {
-                    that.url = 'http://static.yximgs.com/s1/i/qr-timeout.36ec907.svg'
-                    that.showShare = true
-                    that.showSpan = true
-                    that.showTitle = res.result.msg
-                    if (res.result.status == 3) {
-                      that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
-                      that.showSpan = false
-                      that.showCode = false
-                      that.getUserList()
-                    } else if (res.result.status == 2) {
-                      that.url = 'http://static.yximgs.com/s1/i/qr-confirm.f32a3c5.svg'
-                      that.showSpan = false
-                    }
-                  }
-                }
-              }
-            })
-          }, 0)
-        }
-      }, 1000)
       window.onscroll = function() {
         that.scollTop = that.getScrollTop()
         if (that.ksid) {