2025.03.27 工作代码提交

This commit is contained in:
sx 2025-03-28 08:51:18 +08:00
parent ea74ec8239
commit c9066d65ac
8 changed files with 144 additions and 28 deletions

View File

@ -628,6 +628,20 @@ const video = {
method: 'GET', method: 'GET',
}) })
}, },
/**
* 获取推流的用户
* @param {Object} param
*/
getVideoPushUsers(param) {
return util.request({
url: `/video/getWatchStream`,
query: param.query,
data: param.data,
method: 'GET',
load: true,
})
},
} }
export default video export default video

View File

@ -8,7 +8,7 @@ const config = {
// #ifndef H5 // #ifndef H5
// host: 'http://91f.xyz:8080', // host: 'http://91f.xyz:8080',
// host: 'http://liuyd.cpolar.top', // host: 'http://liuyd.cpolar.top',
host: 'http://pwpbxz.natappfree.cc', host: 'http://7pj622.natappfree.cc',
// #endif // #endif
// 是否vivo显示 // 是否vivo显示
showVivo: true, showVivo: true,

View File

@ -480,7 +480,8 @@
"path": "pages/index/dataCenter/pushDetailUser", "path": "pages/index/dataCenter/pushDetailUser",
"style": { "style": {
"navigationBarTitleText": "推流的用户", "navigationBarTitleText": "推流的用户",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -309,7 +309,7 @@
</apex> </apex>
<!-- --> <!-- -->
<view class="first oh mtb40 mlr20 plr20 bfff br10"> <view class="first oh mtb30 mlr20 plr20 bfff br10">
<view class="rows mtb30 c333 f36"> <view class="rows mtb30 c333 f36">
<view class="col"> <view class="col">
<view class="df aic"> <view class="df aic">
@ -339,24 +339,7 @@
<!-- <view class="notice f28 c666">种了很多榴莲果树 大家都来买</view> --> <!-- <view class="notice f28 c666">种了很多榴莲果树 大家都来买</view> -->
</view> </view>
<!-- 我想要 --> <view class="second oh mtb30 mlr20 ptb25 plr30 c333 f36 br10 bfff" @click="pushCollect">
<view class="second oh mtb20 ml20 plr20 c333 f36 br10 bfff">
<view class="title mtb20">我想要</view>
<view class="list mtb20">
<view class="item fmid br10">
<view class="" @click="handleShowView">展示播放量</view>
</view>
<view class="item fmid fdc br10">
<view>完播播放量</view>
<view class="mtb10 c666 f20">需申请平台审核</view>
<view class="button btn black" @click="$refs.applyRef.open()">申请</view>
</view>
</view>
</view>
<view class="second oh mtb20 mlr20 ptb25 plr30 c333 f36 br10 bfff" @click="pushCollect">
<view class="fmid"> <view class="fmid">
<view>我想投流Ta的视频</view> <view>我想投流Ta的视频</view>
<uni-icons type="right" color="#666" size="28rpx" /> <uni-icons type="right" color="#666" size="28rpx" />
@ -387,6 +370,25 @@
</view> </view>
</view> </view>
<!-- 我想要 -->
<view class="second oh mtb20 ml20 plr20 c333 f36 br10 bfff">
<view class="title mtb20">我想要</view>
<view class="list mtb20">
<view class="item fmid fdc br10" @click="handleShowView">
<view class="">展示播放量</view>
<view class="mtb10 c666 f20">无需平台审核</view>
<view class="button btn black">投流</view>
</view>
<view class="item fmid fdc br10" @click="$refs.applyRef.open()">
<view>完播播放量</view>
<view class="mtb10 c666 f20">需申请平台审核</view>
<view class="button btn black">申请</view>
</view>
</view>
</view>
<view class="fill" style="height: 210rpx;"></view> <view class="fill" style="height: 210rpx;"></view>
<!-- 填充 --> <!-- 填充 -->

View File

@ -153,7 +153,9 @@
</view> </view>
<view class="container"> <view class="container">
<view class="main rows" @click="link('/pages/index/dataCenter/pushDetailUser')"> <view class="main rows" @click="link(util.setUrl('/pages/index/dataCenter/pushDetailUser',{
pushId: pushId,
}))">
<view class="key">推流的用户</view> <view class="key">推流的用户</view>
<uni-icons type="right" /> <uni-icons type="right" />
</view> </view>

View File

@ -1,17 +1,112 @@
<script setup> <script setup>
// //
import {
ref,
reactive,
} from 'vue';
import {
onLoad,
onReachBottom,
onPullDownRefresh,
} from '@dcloudio/uni-app'
//
import util from '@/common/js/util';
// api
import api from '@/api/index'
//
const list = reactive({
pageSize: 20,
pageNum: 1,
data: [],
total: 0,
})
// id
const pushId = ref('')
onLoad((option) => {
// id
if (option.pushId) pushId.value = option.pushId
//
getList()
})
onReachBottom(() => {
//
getMoreList()
})
onPullDownRefresh(() => {
//
refreshList()
})
//
function refreshList() {
list.pageNum = 1
getList()
}
//
function getMoreList() {
if (list.data.length >= list.total) return
list.pageNum++
getList()
}
//
function getList() {
api.video.getVideoPushUsers({
query: {
pageSize: list.pageSize,
pageNum: list.pageNum,
videoStreamId: pushId.value,
}
}).then(rs => {
if (rs.code == 200) {
if (list.pageNum == 1) list.data.length = 0
list.data.push(...rs.rows.map(item => {
item.formatUserNickname = formatUsername(item.userName)
return item
}))
list.total = rs.total
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
}).finally(() => {
//
uni.stopPullDownRefresh()
})
}
/**
* 处理用户名
* @param {Object} username 用户名
*/
function formatUsername(username) {
if (username.length <= 1) {
return username;
}
//
const firstChar = username.charAt(0);
//
const maskedPart = '*'.repeat(username.length - 1);
return firstChar + maskedPart;
}
</script> </script>
<template> <template>
<view class="appbw"> <view class="appbw">
<view class="listBox ptb30 plr30"> <view class="listBox ptb30 plr30">
<view class="list rows ptb30 plr10" v-for="(item,index) in 10" :key="index"> <view class="list rows ptb30 plr10" v-for="(item,index) in list.data" :key="index">
<view class="avatar"> <view class="avatar">
<image class="wh100" src="/static/qq.png" mode="aspectFill" /> <image class="wh100 cir" :src="item.avatatUrl" mode="aspectFill" />
</view> </view>
<view class="f1 ml20"> <view class="f1 ml20">
<view class="name t2hd c333 f32">** 查看了你推广的内容</view> <view class="name t2hd c333 f32">{{item.formatUserNickname}} 查看了你推广的内容</view>
<view class="time mt10 c999 f28">2024.12.08 18:00</view> <view class="time mt10 c999 f28">{{item.createTime}}</view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -359,8 +359,10 @@
viewingDuration: Math.floor(element.item.readSecond), viewingDuration: Math.floor(element.item.readSecond),
// 视频秒数 // 视频秒数
videoDescription: Math.floor(element.videoTime.currentTime), videoDescription: Math.floor(element.videoTime.currentTime),
// // 任务
task: 0, task: 0,
// 推流记录id
videostreamId: element.item.videoStreamId || '',
} }
console.log('browseLog data', data) console.log('browseLog data', data)
// //

View File

@ -5,7 +5,7 @@ import uni from '@dcloudio/vite-plugin-uni';
// let target = 'http://91f.xyz:8080' // let target = 'http://91f.xyz:8080'
// let target = 'http://liuyd.cpolar.top ' // let target = 'http://liuyd.cpolar.top '
let target = 'http://pwpbxz.natappfree.cc' let target = 'http://7pj622.natappfree.cc'
export default defineConfig({ export default defineConfig({
plugins: [uni()], plugins: [uni()],