2025.03.24 工作代码提交
This commit is contained in:
parent
fb6497f198
commit
d90987d56e
|
@ -6,8 +6,9 @@ const config = {
|
|||
// host: 'h5api',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host: 'http://91f.xyz:8080',
|
||||
// host: 'http://91f.xyz:8080',
|
||||
// host: 'http://liuyd.cpolar.top',
|
||||
host: 'http://w7cega.natappfree.cc',
|
||||
// #endif
|
||||
// 是否vivo显示
|
||||
showVivo: true,
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<script setup>
|
||||
// 推流历史
|
||||
//
|
||||
import api from '@/api/index.js'
|
||||
//
|
||||
import util from '@/common/js/util.js'
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
} from 'vue'
|
||||
|
||||
// 视频菜单
|
||||
import videoMenu from '@/components/index/videoMenu.vue';
|
||||
//
|
||||
const list = reactive({
|
||||
data: [],
|
||||
pageNum: 1,
|
||||
pageSize: 18,
|
||||
total: 0,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
// 刷新列表
|
||||
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 {
|
||||
pushId: node.id,
|
||||
...node.video,
|
||||
}
|
||||
}))
|
||||
console.log('list', list)
|
||||
// 总数
|
||||
list.total = rs.total
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
}).finally(() => {
|
||||
// 停止下拉刷新
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
}
|
||||
|
||||
// 点击了视频
|
||||
function handleVideo() {
|
||||
uni.navigateTo({
|
||||
url: util.setUrl('/pages/index/dataCenter/pushDetail', {
|
||||
//
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
defineExpose({
|
||||
getList,
|
||||
getMoreList,
|
||||
refreshList,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="appbw">
|
||||
<view class="listBox">
|
||||
<videoMenu :list="list.data" mode="menu" @item="handleVideo" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -65,7 +65,10 @@
|
|||
if (list.pageNum == 1) list.data.length = 0
|
||||
// 合并
|
||||
list.data.push(...rs.rows.map(node => {
|
||||
return node.video
|
||||
return {
|
||||
pushId: node.id,
|
||||
...node.video,
|
||||
}
|
||||
}))
|
||||
console.log('list', list)
|
||||
// 总数
|
||||
|
@ -91,7 +94,7 @@
|
|||
<template>
|
||||
<view class="appbw">
|
||||
<view class="listBox">
|
||||
<videoMenu :list="list.data" mode="list" @item="handleVideo" />
|
||||
<videoMenu :list="list.data" mode="menu" @item="handleVideo" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
total.value = result.total
|
||||
// 卷轴列表
|
||||
dataList.value = result.dataList.map(item => {
|
||||
item.formatHash = item.scrollHash.replace(/(\d{4})\d*(\d{4})/, "$1****$2")
|
||||
item.formatHash = item.scrollHash.replace(/([\d|\D]{4})[\d|\D]*([\d|\D]{4})/, "$1****$2")
|
||||
// item.style = {
|
||||
// '1级卷轴': 'scroll1',
|
||||
// '2级卷轴': 'scroll2',
|
||||
|
@ -151,7 +151,7 @@
|
|||
</view>
|
||||
<view class="mt20 df aic f28">
|
||||
<view>卷轴哈希: {{item.formatHash}}</view>
|
||||
<view class="wh30 ml15" @click="handleCopy(item)">
|
||||
<view class="wh30 ml15" @click.stop="handleCopy(item)">
|
||||
<image src="/static/copy2.png" mode="aspectFit" class="wh24" />
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
const result = rs.data
|
||||
result.formatHash = result.scrollHash.replace(/(\d{4})\d*(\d{4})/, "$1****$2")
|
||||
result.formatHash = result.scrollHash.replace(/([\d|\D]{4})[\d|\D]*([\d|\D]{4})/, "$1****$2")
|
||||
detail.value = result
|
||||
return
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
import like from '@/components/mine/like.vue';
|
||||
// 我的历史
|
||||
import history from '@/components/mine/history.vue';
|
||||
// 推流历史
|
||||
import pushHistory from '@/components/mine/pushHistory.vue';
|
||||
|
||||
// 是否显示顶部遮罩
|
||||
const headerShow = ref(false)
|
||||
|
@ -72,6 +74,7 @@
|
|||
},
|
||||
{
|
||||
name: '投流历史',
|
||||
ref: 'pushHistoryRef',
|
||||
load: false,
|
||||
}
|
||||
])
|
||||
|
@ -276,7 +279,8 @@
|
|||
<view class="f24">账号:{{userinfo.account}}</view>
|
||||
</navigator>
|
||||
|
||||
<view class="tac" v-if="userinfo.isShop == 1" @click="link(util.setUrl('/pages/shop/store/index',{storeId:userinfo.merId}))">
|
||||
<view class="tac" v-if="userinfo.isShop == 1"
|
||||
@click="link(util.setUrl('/pages/shop/store/index',{storeId:userinfo.merId}))">
|
||||
<uni-icons type="shop" color="" size="60rpx" />
|
||||
<view class="f24">我的产品</view>
|
||||
</view>
|
||||
|
@ -358,6 +362,10 @@
|
|||
<view class="history" v-show="tabIndex === 3" v-if="tabList[3].load">
|
||||
<history ref="historyRef" />
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<pushHistory ref="pushHistoryRef" v-show="tabIndex === 4" v-if="tabList[4].load" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
|
@ -3,8 +3,9 @@ import {
|
|||
} from 'vite';
|
||||
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://w7cega.natappfree.cc'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue