Browse Source

Merge remote-tracking branch 'origin/test' into test

syh 5 năm trước cách đây
mục cha
commit
d17f964ab0

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 18117 - 0
package-lock.json


+ 0 - 1
src/main.js

@@ -16,7 +16,6 @@ import '@/utils/filter' // base filter
 import Print from 'vue-print-nb-jeecg'
 import Print from 'vue-print-nb-jeecg'
 /*import '@babel/polyfill'*/
 /*import '@babel/polyfill'*/
 import VueApexCharts from 'vue-apexcharts'
 import VueApexCharts from 'vue-apexcharts'
-
 import preview from 'vue-photo-preview'
 import preview from 'vue-photo-preview'
 import 'vue-photo-preview/dist/skin.css'
 import 'vue-photo-preview/dist/skin.css'
 
 

+ 67 - 10
src/views/modules/Statistics/Statistics.vue

@@ -34,7 +34,6 @@
 .vm-video-list .ant-comment-inner {
 .vm-video-list .ant-comment-inner {
   padding: 0;
   padding: 0;
 }
 }
-
 </style>
 </style>
 <template>
 <template>
   <div class="vm-video-list">
   <div class="vm-video-list">
@@ -43,7 +42,13 @@
         <div class="panel-heading">{{ title }}</div>
         <div class="panel-heading">{{ title }}</div>
       </a-row>
       </a-row>
     </a-row>
     </a-row>
-    <a-row class="image-list" :gutter="16" style="padding:0 8px"></a-row>
+    <a-row class="image-list" :gutter="16" style="padding:0 8px">
+      <a-col :span="12">
+        <div id="chart">
+          <apexchart width="50%" height="300" type="bar" :options="options" :series="series"></apexchart>
+        </div>
+      </a-col>
+    </a-row>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -62,19 +67,71 @@ export default {
   data: function() {
   data: function() {
     return {
     return {
       title: '报表统计',
       title: '报表统计',
-      statistics:[]
+      statistics: [],
+      showData: null,
+      options: {
+        chart: {
+          id: 'vuechart-example'
+        },
+        xaxis: {
+          categories: []
+        }
+      },
+      series: [
+        {
+          name: 'series-1',
+          data: []
+        }
+      ]
+    }
+  },
+  methods: {
+    updateChart() {
+      //   const max = 90
+      //   const min = 20
+      getAccountReport().then(res => {
+        for (const key in res) {
+          this.options.series[0].data.push(res[key])
+        }
+        console.log(res)
+      })
+      const newData = this.series[0].data.map(() => {
+        return Math.floor(Math.random() * (max - min + 1)) + min
+      })
+      this.series = [
+        {
+          data: newData
+        }
+      ]
     }
     }
   },
   },
-  methods: {},
   watch: {},
   watch: {},
   mounted: function() {
   mounted: function() {
     this.$nextTick(() => {
     this.$nextTick(() => {
-        getAccountReport().then(res=>{
-            if(res.code == 0){
-                console.log(res)
-                // this.statistics = res
-            }
-        })
+      getAccountReport().then(res => {
+        var dataNew = []
+        var dataX = []
+        for (const key in res.bytedance) {
+          dataNew.push(res.bytedance[key])
+          dataX.push(key)
+        }
+        var indexX = dataX.findIndex(v => v === 'cost')
+        dataX.splice(indexX, 1)
+        dataNew.splice(indexX, 1)
+        this.series = [
+          {
+            data: dataNew
+          }
+        ]
+        this.options = {
+          chart: {
+            id: 'vuechart-example'
+          },
+          xaxis: {
+            categories: dataX
+          }
+        }
+      })
     })
     })
   }
   }
 }
 }

+ 21 - 0
src/views/modules/kuaishoucomment/commentManage.vue

@@ -0,0 +1,21 @@
+<template>
+    <a-button @click="qrbegin('add')" type="primary" icon="plus">
+      账号授权
+    </a-button>
+</template>
+
+<script>
+    export default {
+        name: "commentManage",
+        methods: {
+          qrbegin(){
+
+          }
+        },
+    }
+
+</script>
+
+<style scoped>
+
+</style>

+ 29 - 18
src/views/modules/video/video.vue

@@ -148,6 +148,7 @@
 import ARow from 'ant-design-vue/es/grid/Row'
 import ARow from 'ant-design-vue/es/grid/Row'
 import ACol from 'ant-design-vue/es/grid/Col'
 import ACol from 'ant-design-vue/es/grid/Col'
 import axios from 'axios'
 import axios from 'axios'
+var interval, objTimer
 import {
 import {
   getLoginQr,
   getLoginQr,
   getUserList,
   getUserList,
@@ -190,6 +191,7 @@ export default {
     handleChange(value) {
     handleChange(value) {
       this.ksid = value
       this.ksid = value
       this.dataShow = []
       this.dataShow = []
+      clearInterval(interval)
       this.getVideoList(value, null)
       this.getVideoList(value, null)
       //   this.getTest()
       //   this.getTest()
     },
     },
@@ -222,6 +224,7 @@ export default {
     },
     },
     getVideoList(ksid, pcursor) {
     getVideoList(ksid, pcursor) {
       var that = this
       var that = this
+
       getVideoList({ ksid: ksid, pcursor: pcursor }).then(res => {
       getVideoList({ ksid: ksid, pcursor: pcursor }).then(res => {
         if (res.code == 0) {
         if (res.code == 0) {
           var data = res.result.data.publicFeeds.list.map(item => {
           var data = res.result.data.publicFeeds.list.map(item => {
@@ -233,25 +236,29 @@ export default {
           this.pcursor = res.result.data.publicFeeds.pcursor
           this.pcursor = res.result.data.publicFeeds.pcursor
           this.dataShow.push(...data)
           this.dataShow.push(...data)
           var i = 0
           var i = 0
-          //   for (let i = 0; i < data.length; i++) {
-          setInterval(() => {
-            if (i < that.dataShow.length) {
-              setTimeout(
-                that.getCommentList(ksid, that.dataShow[i].photoId).then(dataOne => {
-                  console.log(dataOne)
-                  if (dataOne) {
-                    that.dataShow[i].commentList = dataOne
-                  }
-                  //   commentList
+          interval = setInterval(() => {
+            if (i <= that.dataShow.length) {
+              ;(function(a) {
+                setTimeout(function() {
+                  that.getCommentList(ksid, that.dataShow[a].photoId).then(dataOne => {
+                    if (dataOne && that.dataShow[a]) {
+                      that.dataShow[a].commentList = dataOne.commentList
+                    } else {
+                      that.dataShow[a].commentList = []
+                    }
+                  })
+                }, 0)
+                if (that.dataShow.length == 0) {
+                  clearInterval(interval)
+                  i = 0
+                } else {
                   i++
                   i++
-                }),
-                0
-              )
+                }
+              })(i)
             } else {
             } else {
+              clearInterval(interval)
             }
             }
-          }, 3000)
-
-          //   }
+          }, 10000)
         }
         }
       })
       })
     },
     },
@@ -259,7 +266,7 @@ export default {
       return new Promise(function(resolve) {
       return new Promise(function(resolve) {
         getCommentList({ ksid: ksid, photoId: photoId, pcursor: null }).then(res => {
         getCommentList({ ksid: ksid, photoId: photoId, pcursor: null }).then(res => {
           if (res.code == 0) {
           if (res.code == 0) {
-            resolve(res.result.data.shortVideoCommentList.commentList)
+            resolve(res.result.data.shortVideoCommentList)
           }
           }
         })
         })
       })
       })
@@ -334,6 +341,10 @@ export default {
     }
     }
   },
   },
   watch: {},
   watch: {},
+  distoryed() {
+    clearInterval(interval)
+    window.clearInterval(objTimer)
+  },
   mounted: function() {
   mounted: function() {
     this.$nextTick(() => {
     this.$nextTick(() => {
       var that = this
       var that = this
@@ -341,7 +352,7 @@ export default {
       //   getAccountReport().then(res => {
       //   getAccountReport().then(res => {
       //     console.log(res)
       //     console.log(res)
       //   })
       //   })
-      window.setInterval(() => {
+      objTimer = window.setInterval(() => {
         if (that.showCode) {
         if (that.showCode) {
           setTimeout(function() {
           setTimeout(function() {
             getLoginStatus({ requestId: that.requestId }).then(res => {
             getLoginStatus({ requestId: that.requestId }).then(res => {

+ 14 - 17
src/views/template/creative/modules/material.vue

@@ -139,7 +139,7 @@
       <a-button @click="addTitle">添加创意标题</a-button>
       <a-button @click="addTitle">添加创意标题</a-button>
       <br />
       <br />
       <div v-for="(item,index) of titleData" :key="index">
       <div v-for="(item,index) of titleData" :key="index">
-        <a-input style="width:55%" v-model="item.text" class="rending-all"></a-input>
+        <a-input style="width:55%" v-model="item.text" class="rending-all" @change="judge(item)"></a-input>
         <a-icon
         <a-icon
           type="delete"
           type="delete"
           style="margin-left:20px;cursor: pointer;"
           style="margin-left:20px;cursor: pointer;"
@@ -163,7 +163,6 @@ import { postAction, getAction, getPackage } from '@/api/manage'
 import moment from 'moment'
 import moment from 'moment'
 import AFormItem from 'ant-design-vue/es/form/FormItem'
 import AFormItem from 'ant-design-vue/es/form/FormItem'
 import $ from 'jquery'
 import $ from 'jquery'
-
 export default {
 export default {
   name: 'BaseForm',
   name: 'BaseForm',
   props: {
   props: {
@@ -233,25 +232,23 @@ export default {
   },
   },
   methods: {
   methods: {
     judge(item) {
     judge(item) {
-      var left = item.text.split('{')
-      var right = item.text.split('}')
-      console.log(left)
-      if (item.countTag == 0) {
-        return
-      } else {
-        if (left.length != 3 && right.lenght != 3) {
-          item.countTag -= 1
-        }
+      var re = /{(.*?)}/g
+      var array = []
+      var temp
+      while ((temp = re.exec(item.text))) {
+        array.push(temp[1])
       }
       }
+      console.log(array)
+      item.countTag = array.length
     },
     },
     getChange(item, tag, index) {
     getChange(item, tag, index) {
-      item.countTag++
+      this.judge(item)
       if (item.text == '') {
       if (item.text == '') {
         item.countTag = 0
         item.countTag = 0
       }
       }
       if (item.countTag >= 2) {
       if (item.countTag >= 2) {
         this.$message.error('最多插入两条词包')
         this.$message.error('最多插入两条词包')
-        item.countTag = 2
+        // item.countTag = 2
         return
         return
       }
       }
       var node = document.getElementsByClassName('rending')[index]
       var node = document.getElementsByClassName('rending')[index]
@@ -283,13 +280,13 @@ export default {
       }
       }
     },
     },
     getChangeAllTitle(item, tag, index) {
     getChangeAllTitle(item, tag, index) {
-      item.titleMany++
+      this.judge(item)
       if (item.text == '') {
       if (item.text == '') {
-        item.titleMany = 0
+        item.countTag = 0
       }
       }
-      if (item.titleMany >= 2) {
+      if (item.countTag >= 2) {
         this.$message.error('最多插入两条词包')
         this.$message.error('最多插入两条词包')
-        item.titleMany = 2
+        // item.countTag = 2
         return
         return
       }
       }
       var node = document.getElementsByClassName('rending-all')[index]
       var node = document.getElementsByClassName('rending-all')[index]

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 12633 - 0
yarn.lock