2025.03.27 工作代码提交
This commit is contained in:
parent
ea74ec8239
commit
c9066d65ac
|
@ -628,6 +628,20 @@ const video = {
|
|||
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
|
|
@ -8,7 +8,7 @@ const config = {
|
|||
// #ifndef H5
|
||||
// host: 'http://91f.xyz:8080',
|
||||
// host: 'http://liuyd.cpolar.top',
|
||||
host: 'http://pwpbxz.natappfree.cc',
|
||||
host: 'http://7pj622.natappfree.cc',
|
||||
// #endif
|
||||
// 是否vivo显示
|
||||
showVivo: true,
|
||||
|
|
|
@ -480,7 +480,8 @@
|
|||
"path": "pages/index/dataCenter/pushDetailUser",
|
||||
"style": {
|
||||
"navigationBarTitleText": "推流的用户",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -309,7 +309,7 @@
|
|||
</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="col">
|
||||
<view class="df aic">
|
||||
|
@ -339,24 +339,7 @@
|
|||
<!-- <view class="notice f28 c666">种了很多榴莲果树 ,大家都来买</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 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="second oh mtb30 mlr20 ptb25 plr30 c333 f36 br10 bfff" @click="pushCollect">
|
||||
<view class="fmid">
|
||||
<view>我想投流Ta的视频</view>
|
||||
<uni-icons type="right" color="#666" size="28rpx" />
|
||||
|
@ -387,6 +370,25 @@
|
|||
</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>
|
||||
|
||||
<!-- 填充 -->
|
||||
|
|
|
@ -153,7 +153,9 @@
|
|||
</view>
|
||||
|
||||
<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>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
|
|
|
@ -1,17 +1,112 @@
|
|||
<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>
|
||||
|
||||
<template>
|
||||
<view class="appbw">
|
||||
<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">
|
||||
<image class="wh100" src="/static/qq.png" mode="aspectFill" />
|
||||
<image class="wh100 cir" :src="item.avatatUrl" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="f1 ml20">
|
||||
<view class="name t2hd c333 f32">周** 查看了你推广的内容</view>
|
||||
<view class="time mt10 c999 f28">2024.12.08 18:00</view>
|
||||
<view class="name t2hd c333 f32">{{item.formatUserNickname}} 查看了你推广的内容</view>
|
||||
<view class="time mt10 c999 f28">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -359,8 +359,10 @@
|
|||
viewingDuration: Math.floor(element.item.readSecond),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
// 任务
|
||||
task: 0,
|
||||
// 推流记录id
|
||||
videostreamId: element.item.videoStreamId || '',
|
||||
}
|
||||
console.log('browseLog data', data)
|
||||
//
|
||||
|
|
|
@ -5,7 +5,7 @@ import uni from '@dcloudio/vite-plugin-uni';
|
|||
|
||||
// let target = 'http://91f.xyz:8080'
|
||||
// let target = 'http://liuyd.cpolar.top '
|
||||
let target = 'http://pwpbxz.natappfree.cc'
|
||||
let target = 'http://7pj622.natappfree.cc'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue