Browse Source

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

syh 5 năm trước cách đây
mục cha
commit
c933cec678
4 tập tin đã thay đổi với 930 bổ sung547 xóa
  1. 119 119
      src/api/video.js
  2. 746 392
      src/views/modules/Statistics/Statistics.vue
  3. 62 33
      src/views/modules/video/video.vue
  4. 3 3
      vue.config.js

+ 119 - 119
src/api/video.js

@@ -1,120 +1,120 @@
-
-import {axios} from '@/utils/request'
-
-
-//获取登陆账户已经绑定过的快手账户列表
-export function getUserList() {
-    return axios({
-      url: "/ks/web/user/list",
-      method: 'post',
-      //   params: parameter
-    })
-}
-
-// 获取登陆二维码
-export function getLoginQr() {
-    return axios({
-      url: "/ks/web/login/qr",
-      method: 'post',
-      //   params: parameter
-    })
-}
-
-// 获取登陆状态
-// /ks/web/login/status
-// 参数 String requestId
-export function getLoginStatus(parameter) {
-    return axios({
-      url: "/ks/web/login/status",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取视频列表
-// /ks/web/video/list
-// 参数 String ksid,String pcursor
-export function getVideoList(parameter) {
-    return axios({
-      url: "/ks/web/video/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取评论列表
-// /ks/web/comment/list
-// 参数 String ksid,String photoId,String pcursor
-export function getCommentList(parameter) {
-    return axios({
-      url: "/ks/web/comment/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 删除单条评论
-// /ks/web/comment/delete
-// 参数 String ksid,String photoId,Long commentId
-export function commentDelete(parameter) {
-    return axios({
-      url: "/ks/web/comment/delete",
-      method: 'post',
-      params: parameter
-    })
-}
-
-// 获取子评论列表
-// /ks/web/subcomment/list
-// 参数 String ksid,String photoId,Long rootCommentId,String pcursor
-export function getSubcommentList(parameter) {
-    return axios({
-      url: "/ks/web/subcomment/list",
-      method: 'post',
-      params: parameter
-    })
-}
-
-//评论添加接口
-///ks/web/comment/add
-// String ksid, String photoId,String principalId,String content, Long replyToCommentId,Long repltTo
-export function commentAdd(parameter) {
-    return axios({
-      url: "/ks/web/comment/add",
-      method: 'post',
-      params: parameter
-    })
-}
-
-
-
-//头条当前账号下的数据集合
-// /ctop/report/accountReport
-export function getAccountReport() {
-    return axios({
-      url: "/ctop/report/accountReport",
-      method: 'get',
-    //   params: parameter
-    })
-}
-
-
-//快手当前账号下的数据集合
-export function getKsAccountReport(parameter) {
-    return axios({
-      url: "/ctop/report/kuaiShou/accountReport",
-      method: 'post',
-      data: parameter
-    })
-}
-
-// 当日明细
-// /accountReport/kuaiShou/accountDetailReport
-//快手当前账号下的数据集合
-export function getKsDetail(parameter) {
-    return axios({
-      url: "/ctop/report/kuaiShou/accountDetailReport",
-      method: 'post',
-      data: parameter
-    })
+
+import {axios} from '@/utils/request'
+
+
+//获取登陆账户已经绑定过的快手账户列表
+export function getUserList() {
+    return axios({
+      url: "/ks/web/user/list",
+      method: 'post',
+      //   params: parameter
+    })
+}
+
+// 获取登陆二维码
+export function getLoginQr() {
+    return axios({
+      url: "/ks/web/login/qr",
+      method: 'post',
+      //   params: parameter
+    })
+}
+
+// 获取登陆状态
+// /ks/web/login/status
+// 参数 String requestId
+export function getLoginStatus(parameter) {
+    return axios({
+      url: "/ks/web/login/status",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取视频列表
+// /ks/web/video/list
+// 参数 String ksid,String pcursor
+export function getVideoList(parameter) {
+    return axios({
+      url: "/ks/web/video/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取评论列表
+// /ks/web/comment/list
+// 参数 String ksid,String photoId,String pcursor
+export function getCommentList(parameter) {
+    return axios({
+      url: "/ks/web/comment/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 删除单条评论
+// /ks/web/comment/delete
+// 参数 String ksid,String photoId,Long commentId
+export function commentDelete(parameter) {
+    return axios({
+      url: "/ks/web/comment/delete",
+      method: 'post',
+      params: parameter
+    })
+}
+
+// 获取子评论列表
+// /ks/web/subcomment/list
+// 参数 String ksid,String photoId,Long rootCommentId,String pcursor
+export function getSubcommentList(parameter) {
+    return axios({
+      url: "/ks/web/subcomment/list",
+      method: 'post',
+      params: parameter
+    })
+}
+
+//评论添加接口
+///ks/web/comment/add
+// String ksid, String photoId,String content, Long replyToCommentId,Long repltTo
+export function commentAdd(parameter) {
+    return axios({
+      url: "/ks/web/comment/add",
+      method: 'post',
+      params: parameter
+    })
+}
+
+
+
+//头条当前账号下的数据集合
+// /ctop/report/accountReport
+export function getAccountReport() {
+    return axios({
+      url: "/ctop/report/accountReport",
+      method: 'get',
+    //   params: parameter
+    })
+}
+
+
+//快手当前账号下的数据集合
+export function getKsAccountReport(parameter) {
+    return axios({
+      url: "/ctop/report/kuaiShou/accountReport",
+      method: 'post',
+      data: parameter
+    })
+}
+
+// 当日明细
+// /accountReport/kuaiShou/accountDetailReport
+//快手当前账号下的数据集合
+export function getKsDetail(parameter) {
+    return axios({
+      url: "/ctop/report/kuaiShou/accountDetailReport",
+      method: 'post',
+      data: parameter
+    })
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 746 - 392
src/views/modules/Statistics/Statistics.vue


+ 62 - 33
src/views/modules/video/video.vue

@@ -45,6 +45,19 @@
   filter: blur(20px);
   z-index: 2;
 }
+.ant-comment-content-detail {
+  word-wrap: break-word;
+  word-break: normal;
+}
+.vm-video-list .ant-card-actions li span {
+  width: 90%;
+}
+.vm-video-list .ant-card-actions li .ant-input-group {
+  width: 100%;
+}
+.vm-video-list .ant-card-actions li .ant-input-group-addon {
+  width: 0;
+}
 </style>
 <template>
   <div class="vm-video-list">
@@ -99,9 +112,12 @@
             />
           </div>
           <template class="ant-card-actions" slot="actions">
-            <a-icon type="setting" />
+            <!-- <a-icon type="setting" />
             <a-icon type="edit" />
-            <a-icon type="ellipsis" />
+            <a-icon type="ellipsis" />-->
+            <a-input placeholder="请输入评论内容" v-model="item.keyword" style="width:100%">
+              <div slot="addonAfter" @click="addComment(item,index)">评论</div>
+            </a-input>
           </template>
           <div style="position:relative">
             <div
@@ -110,19 +126,19 @@
             >
               <img src="./images/loading.gif" alt />
             </div>
-            <div style="height:200px;overflow:auto;" v-if="item.commentList.length>0">
+            <div style="height:200px;overflow-y:auto;" v-if="item.commentList.length>0">
               <a-comment v-for="(items,idx) of item.commentList" :key="idx">
                 <a slot="author">
                   <input type="checkbox" />
                   {{items.authorName}}
                 </a>
-                <p
-                  slot="content"
-                  style="display: flex;justify-content: space-between;white-space: nowrap;"
-                >
-                  {{items.content}}
-                  <span @click="remove(item,items,idx)" style="margin-right:5px">删除</span>
-                </p>
+                <div slot="content" style="display: flex;justify-content: space-between;">
+                  <p>{{items.content}}</p>
+                  <div>
+                    <span style="margin-right:5px" @click="backAdd(item,items)">回复</span>
+                    <span @click="remove(item,items,idx)" style="margin-right:5px">删除</span>
+                  </div>
+                </div>
               </a-comment>
             </div>
             <div
@@ -162,7 +178,7 @@ import {
   getVideoList,
   getCommentList,
   commentDelete,
-  getAccountReport
+  commentAdd
 } from '@api/video.js'
 export default {
   name: 'videoList',
@@ -190,7 +206,9 @@ export default {
       ksid: null,
       pullRefreshss: true, // 代表可以进行下拉加载,false代表不能
       scollY: null, // 离底部距离有多少
-      pcursor: null
+      pcursor: null,
+      repltTo: 0,
+      replyToCommentId: 0
     }
   },
   methods: {
@@ -237,36 +255,27 @@ export default {
             return {
               ...item,
               commentList: [],
-              loading: true
+              loading: true,
+              keyword: ''
             }
           })
           this.pcursor = res.result.data.publicFeeds.pcursor
           this.dataShow.push(...data)
           var i = 0
-          interval = setInterval(() => {
-            if (i <= that.dataShow.length) {
-              ;(function(a) {
-                setTimeout(function() {
-                  that.getCommentList(ksid, that.dataShow[a].photoId).then(dataOne => {
-                    that.dataShow[a].loading = false
-                    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
+          for (let i = 0; i < that.dataShow.length; i++) {
+            if (that.dataShow[i].commentCount > 0) {
+              that.getCommentList(ksid, that.dataShow[i].photoId).then(dataOne => {
+                that.dataShow[i].loading = false
+                if (dataOne && that.dataShow[i]) {
+                  that.dataShow[i].commentList = dataOne.commentList
                 } else {
-                  i++
+                  that.dataShow[i].commentList = []
                 }
-              })(i)
+              })
             } else {
-              clearInterval(interval)
+              that.dataShow[i].loading = false
             }
-          }, 10000)
+          }
         }
       })
     },
@@ -346,6 +355,26 @@ export default {
         // 其他时候把下拉刷新置为true
         _this.pullRefreshss = true
       }
+    },
+    addComment(item, index) {
+      console.log(item)
+      var params = {
+        ksid: this.ksid,
+        photoId: item.photoId,
+        content: item.keyword,
+        replyToCommentId: this.replyToCommentId,
+        repltTo: this.repltTo
+      }
+      commentAdd(params).then(res => {
+        console.log(res)
+      })
+    },
+    backAdd(item, items) {
+      console.log(item, items)
+      // authorId  commentId
+      item.keyword = '回复' + items.authorName
+      this.repltTo = items.authorId
+      this.replyToCommentId = items.commentId
     }
   },
   watch: {},

+ 3 - 3
vue.config.js

@@ -64,9 +64,9 @@ module.exports = {
          }
        },*/
       '/jeecg-boot': {
-        target: 'http://localhost:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.43.23:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
+        // target: 'http://192.168.2.130:8080', //请求本地 需要jeecg-boot后台项目
+        target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         ws: false,
         changeOrigin: true
       },