2025.03.22 ~ 2025.03.23 工作代码提交
This commit is contained in:
parent
c5707aab24
commit
fb6497f198
|
@ -600,6 +600,20 @@ const video = {
|
||||||
method: 'POST',
|
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
|
export default video
|
|
@ -472,7 +472,8 @@
|
||||||
"path": "pages/index/dataCenter/pushHistory",
|
"path": "pages/index/dataCenter/pushHistory",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "历史推流",
|
"navigationBarTitleText": "历史推流",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,97 @@
|
||||||
<script setup>
|
<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';
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="appbw">
|
<view class="appbw">
|
||||||
<view class="listBox">
|
<view class="listBox">
|
||||||
<videoMenu :list="list.data" mode="menu" @item="handleVideo" />
|
<videoMenu :list="list.data" mode="list" @item="handleVideo" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
function refreshList() {
|
function refreshList() {
|
||||||
scrollLog.homePageSize = 1
|
scrollLog.s = 1
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue