2025.03.22 ~ 2025.03.23 工作代码提交

This commit is contained in:
sx 2025-03-24 08:48:41 +08:00
parent c5707aab24
commit fb6497f198
4 changed files with 102 additions and 3 deletions

View File

@ -600,6 +600,20 @@ const video = {
method: 'POST',
})
},
/**
* 推流历史
* @param {Object} param
*/
getVideoPushList(param) {
return util.request({
url: `/video/videoPushRecord/listById`,
load: true,
query: param.query,
data: param.data,
method: 'GET',
})
},
}
export default video

View File

@ -472,7 +472,8 @@
"path": "pages/index/dataCenter/pushHistory",
"style": {
"navigationBarTitleText": "历史推流",
"navigationBarBackgroundColor": "#fff"
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
}
},
{

View File

@ -1,13 +1,97 @@
<script setup>
//
//
import api from '@/api/index.js'
//
import util from '@/common/js/util.js'
import {
ref,
reactive,
} from 'vue'
import {
onLoad,
onPullDownRefresh,
onReachBottom,
} from '@dcloudio/uni-app'
//
import videoMenu from '@/components/index/videoMenu.vue';
//
const list = reactive({
data: [],
pageNum: 1,
pageSize: 18,
total: 0,
})
onLoad(() => {
//
getList()
})
onPullDownRefresh(() => {
//
refreshList()
})
onReachBottom(() => {
//
getMoreList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.total <= list.data.length) return
list.pageNum++
getList()
}
//
function getList() {
api.video.getVideoPushList({
query: {
pageNum: list.pageNum,
pageSize: list.pageSize,
},
}).then(rs => {
if (rs.code == 200) {
//
if (list.pageNum == 1) list.data.length = 0
//
list.data.push(...rs.rows.map(node => {
return node.video
}))
console.log('list', list)
//
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
//
uni.stopPullDownRefresh()
})
}
//
function handleVideo() {
//
}
</script>
<template>
<view class="appbw">
<view class="listBox">
<videoMenu :list="list.data" mode="menu" @item="handleVideo" />
<videoMenu :list="list.data" mode="list" @item="handleVideo" />
</view>
</view>
</template>

View File

@ -47,7 +47,7 @@
//
function refreshList() {
scrollLog.homePageSize = 1
scrollLog.s = 1
getList()
}