Sfoglia il codice sorgente

update VideoPost.vue

reghao 2 settimane fa
parent
commit
e6f7c82559
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 3 3
      src/api/vod.js
  2. 1 1
      src/views/post/VideoPost.vue

+ 3 - 3
src/api/vod.js

@@ -1,4 +1,4 @@
-import { get, post, delete0 } from '@/utils/request'
+import { get, post } from '@/utils/request'
 
 const videoApi = {
   videoPostApi: '/api/content/post/video',
@@ -62,8 +62,8 @@ export function deleteVideoPost(payload) {
 }
 
 // 获取视频贴列表
-export function getVideoPosts(page) {
-  return get(videoApi.videoPostApi + '/list?page=' + page)
+export function getVideoPosts(queryParams) {
+  return get(videoApi.videoPostApi + '/list', queryParams)
 }
 
 export function getVideoPost(videoId) {

+ 1 - 1
src/views/post/VideoPost.vue

@@ -241,7 +241,7 @@ export default {
     getData() {
       this.loading = true
       // 注意:这里建议给后端接口也加上 scope 参数,此处假设你原有接口支持
-      getVideoPosts(this.queryInfo.pn, this.queryInfo.scope).then(resp => {
+      getVideoPosts(this.queryInfo).then(resp => {
         if (resp.code === 0) {
           this.dataList = resp.data.list
           this.totalSize = resp.data.totalSize