合并代码

This commit is contained in:
sx 2025-01-02 00:59:24 +08:00
parent 849661cf00
commit 42ab006a83
9 changed files with 226 additions and 1166 deletions

View File

@ -225,7 +225,7 @@ const video = {
*/ */
publishVideo(param) { publishVideo(param) {
return util.request({ return util.request({
url: `/homecommon/publishVideo`, url: `/video/video/add`,
data: param.data, data: param.data,
method: 'POST', method: 'POST',
}) })

View File

@ -60,7 +60,9 @@
}, },
}) })
// //
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay', 'onPause', 'like', 'detailMenu', 'onEnd', 'longtap']) const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap'
])
// //
const videoCtx = ref(null) const videoCtx = ref(null)
@ -414,10 +416,15 @@
<view class="container f1 pr" ref="videoBoxRef"> <view class="container f1 pr" ref="videoBoxRef">
<!-- 视频层 --> <!-- 视频层 -->
<view class="main f1"> <view class="main f1">
<view class="videoBox f1" @longpress="longtap" @touchmove.stop="" @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchEnd"> <view class="videoBox f1" @longpress="longtap" @touchmove.stop="" @touchstart="onTouchStart"
@touchend="onTouchEnd" @touchcancel="onTouchEnd">
<statusBar /> <statusBar />
<video class="video f1" :id="'video' + tabIndex + index" :src="item.format_videoUrl" :poster="item.format_imageUrl" :http-cache="false" :show-fullscreen-btn="false" :enable-progress-gesture="false" :controls="false" @play="onVideoPlay" @pause="onVideoPause" :show-center-play-btn="false" @timeupdate="handleTimeupdate" @waiting="handleWaiting" :play-strategy="2" :initial-time="0" :loop="true" /> <video class="video f1" :id="'video' + tabIndex + index" :src="item.format_videoUrl"
:poster="item.format_imageUrl" :http-cache="false" :show-fullscreen-btn="false"
:enable-progress-gesture="false" :controls="false" @play="onVideoPlay" @pause="onVideoPause"
:show-center-play-btn="false" @timeupdate="handleTimeupdate" @waiting="handleWaiting"
:play-strategy="2" :loop="true" />
</view> </view>
<!-- 视频进度条 --> <!-- 视频进度条 -->
@ -454,10 +461,13 @@
<view class="item"> <view class="item">
<view class="col"> <view class="col">
<view class="pr"> <view class="pr">
<image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0" @click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" /> <image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0"
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit" v-else-if="item.isLike == 1" @click="handleLike(index, 1)" /> @click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" />
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit"
v-else-if="item.isLike == 1" @click="handleLike(index, 1)" />
<!-- 私密赞的图标 --> <!-- 私密赞的图标 -->
<image class="wh50" src="/static/privateLike.png" mode="aspectFit" v-else-if="item.isLike == 3" @click="handleLike(index, 1)" /> <image class="wh50" src="/static/privateLike.png" mode="aspectFit"
v-else-if="item.isLike == 3" @click="handleLike(index, 1)" />
</view> </view>
<view class="txt mt10"> <view class="txt mt10">
<text class="text">{{ item.likes }}</text> <text class="text">{{ item.likes }}</text>
@ -478,7 +488,8 @@
<!-- 收藏 --> <!-- 收藏 -->
<view class="item df fdr"> <view class="item df fdr">
<view class="col" @touchstart="handleCollectStar" @touchend="handleCollectEnd" ref="collectBtn"> <view class="col" @touchstart="handleCollectStar" @touchend="handleCollectEnd" ref="collectBtn">
<image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit" v-if="item.isCollect" /> <image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit"
v-if="item.isCollect" />
<image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else /> <image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else />
<view class="txt mt10"> <view class="txt mt10">
<text class="text">{{ item.collect }}</text> <text class="text">{{ item.collect }}</text>

View File

@ -29,8 +29,7 @@
"distribute": { "distribute": {
/* android */ /* android */
"android": { "android": {
"plugins" : [ "plugins": [{
{
"type": "module", "type": "module",
"name": "Agora-RTC-EngineModule", "name": "Agora-RTC-EngineModule",
"class": "io.agora.rtc.uni.AgoraRtcEngineModule" "class": "io.agora.rtc.uni.AgoraRtcEngineModule"

View File

@ -329,7 +329,7 @@
function getRecList() { function getRecList() {
Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then(rs => { Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then(rs => {
// 列表 // 列表
const list = rs.reduce((last, now) => last.concat(now.rows), []).sort(() => Math.random() - 0.5) const list = rs.rows.sort(() => Math.random() - 0.5)
// 总数 // 总数
recList.total = rs.reduce((last, now) => last + now.total, 0) recList.total = rs.reduce((last, now) => last + now.total, 0)
// 第一页 // 第一页
@ -352,7 +352,8 @@
const pages = getCurrentPages() const pages = getCurrentPages()
// 判断是否当前页 // 判断是否当前页
if (pages[pages.length - 1].route == 'pages/index/index') { if (pages[pages.length - 1].route == 'pages/index/index') {
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
true
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play() proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
} }
}, 50) }, 50)
@ -542,7 +543,8 @@
} }
tabIndex.value = index tabIndex.value = index
// 根据是否加载过判断 播放还是获取 // 根据是否加载过判断 播放还是获取
if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]].play() if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]]
.play()
else tabCurrent.value.getList() else tabCurrent.value.getList()
// 已加载 // 已加载
tab[tabIndex.value].load = true tab[tabIndex.value].load = true
@ -729,7 +731,8 @@
<view class="f1"> <view class="f1">
<view class="tab fdr jcc" :key="tabIndex"> <view class="tab fdr jcc" :key="tabIndex">
<view class="list" v-for="(item,index) in tab" :key="index" :class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)"> <view class="list" v-for="(item,index) in tab" :key="index"
:class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)">
<view class="txt"> <view class="txt">
<text class="text">{{item.name}}</text> <text class="text">{{item.name}}</text>
</view> </view>
@ -752,10 +755,17 @@
<template v-for="(item, index) in tab" :key="index"> <template v-for="(item, index) in tab" :key="index">
<view class="f1" v-if="tabIndex == index" ref="containerRef"> <view class="f1" v-if="tabIndex == index" ref="containerRef">
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
<list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)" @touchend="onTouchend($event,index)" @loadmore="item.getMoreList"> <list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)"
<cell class="cell" :style="[{height: viewHeight + 'px'}]" :ref="`cellRef` + index" v-for="(secItem,secIndex) in item.listData()" :key="secIndex" @click.stop> @touchend="onTouchend($event,index)" @loadmore="item.getMoreList">
<cell class="cell" :style="[{height: viewHeight + 'px'}]" :ref="`cellRef` + index"
v-for="(secItem,secIndex) in item.listData()" :key="secIndex" @click.stop>
<!-- 视频 --> <!-- 视频 -->
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]" :item="secItem" :index="secIndex" @showTime="handleShowTime" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike" @longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect" :viewWidth="viewWidth" /> <indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]"
:item="secItem" :index="secIndex" @showTime="handleShowTime"
@showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
@showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay"
@onPause="handleVideoOnPause" @like="videoLike" @longtap="$refs.moreMenuRef.open(secItem)"
@showFastCollect="handleShowFastCollect" :viewWidth="viewWidth" />
</cell> </cell>
</list> </list>
</view> </view>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

BIN
jiuyi/static/statistics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

View File

@ -1,37 +1,31 @@
{ {
"hash": "32d96953", "hash": "37e93c97",
"configHash": "aa34cf93", "configHash": "b5581361",
"lockfileHash": "6e88141a", "lockfileHash": "6e88141a",
"browserHash": "f6042447", "browserHash": "b2bb18f7",
"optimized": { "optimized": {
"@tencentcloud/chat": { "@tencentcloud/chat": {
"src": "../../../../../node_modules/@tencentcloud/chat/index.js", "src": "../../../../../node_modules/@tencentcloud/chat/index.js",
"file": "@tencentcloud_chat.js", "file": "@tencentcloud_chat.js",
"fileHash": "b18fad8a", "fileHash": "b054b652",
"needsInterop": true "needsInterop": true
}, },
"@tencentcloud/chat/modules/group-module.js": { "@tencentcloud/chat/modules/group-module.js": {
"src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js", "src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js",
"file": "@tencentcloud_chat_modules_group-module__js.js", "file": "@tencentcloud_chat_modules_group-module__js.js",
"fileHash": "70eaae39", "fileHash": "bbe780a6",
"needsInterop": false "needsInterop": false
}, },
"tim-upload-plugin": { "tim-upload-plugin": {
"src": "../../../../../node_modules/tim-upload-plugin/index.js", "src": "../../../../../node_modules/tim-upload-plugin/index.js",
"file": "tim-upload-plugin.js", "file": "tim-upload-plugin.js",
"fileHash": "665b8e2f", "fileHash": "11d142d1",
"needsInterop": true "needsInterop": true
}, },
"crypto-js": { "crypto-js": {
"src": "../../../../../node_modules/crypto-js/index.js", "src": "../../../../../node_modules/crypto-js/index.js",
"file": "crypto-js.js", "file": "crypto-js.js",
"fileHash": "f77d7150", "fileHash": "3cc1bed2",
"needsInterop": true
},
"js-pinyin": {
"src": "../../../../../node_modules/js-pinyin/index.js",
"file": "js-pinyin.js",
"fileHash": "a2c07873",
"needsInterop": true "needsInterop": true
} }
}, },

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long