2.2提交

This commit is contained in:
zoujiandong
2026-02-02 17:44:10 +08:00
parent d06ee397cf
commit a7b2a673a9
54 changed files with 3615 additions and 1317 deletions
+64 -14
View File
@@ -25,18 +25,22 @@
</template>
</uni-nav-bar>
</view>
<video
<view class="videobox ">
<!-- <cover-view class="play-img" v-if="showVideo && !isPlaying && !isAndroid" @click="playVideo">
<cover-image :src="playImg" mode="aspectFill" />
</cover-view> -->
<video
v-if="showVideo"
class="player-wrapper"
:style="{width: videoWidth + 'px'}"
:src="videoSrc"
controls
id="myVideo"
object-fit="contain"
:autoplay="false"
@error="onVideoError"
></video>
<!-- <sunny-video
></video>
<!-- <sunny-video
v-if="showVideo"
class="player-wrapper"
:src="videoSrc"
@@ -44,7 +48,11 @@
:videoWidth="videoWidth"
:seekTime="0"
@fullscreenchange="onFullscreenChange"
/> -->
/> -->
</view>
<!-- @play="onVideoPlay"
@pause="onVideoPause" -->
<!-- 标签切换 -->
<cover-view class="tabs" v-if="from != 'download'" :style="{ opacity:isFullScreen?0:1, width: videoWidth + 'px' }" >
@@ -225,7 +233,7 @@
<script setup>
import { ref, nextTick } from "vue";
//import uniVideo from "@/components/uniVideo/uniVideo.vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { onLoad, onShow,onReady } from "@dcloudio/uni-app";
import unidialog from "@/components/dialog/dialog.vue";
import collectImg from "@/static/icon_book_collect_sel.png";
import discollectImg from "@/static/icon_book_collect_nor.png";
@@ -236,6 +244,7 @@ import friendImg from "@/static/share_wxc.png";
import logoImg from "@/static/weiboShare.png";
import isAndroid from "@/utils/platform.js";
import avastarImg from "@/static/avastar.png";
import playImg from "@/static/play.png";
import api from "@/api/api";
import docUrl from "@/utils/docUrl";
import navTo from "@/utils/navTo";
@@ -250,6 +259,7 @@ const pointContent = ref("");
const notEnoughVisible = ref(false);
const notEnoughContent = ref("");
const welfareNum = ref(0);
const isPlaying = ref(false);
// 删除弹窗相关
const showDeleteModal = ref(false);
const currentDeleteItem = ref(null);
@@ -260,12 +270,17 @@ const downLoadStatus = ref('start');
let downList = uni.getStorageSync("downLoadVideo") || [];
const downLoadList = ref(downList);
const isFullScreen = ref(false);
//import DomVideoPlayer from 'uniapp-video-player'
//import sunnyVideo from "@/uni_modules/sunny-video/components/sunny-video/sunny-video.vue";
import downloadStore from "@/store/downloadStoreVideo.js";
const downloadTasks = ref([]);
let userInfo = uni.getStorageSync("userInfo");
const current_user_id = ref(userInfo.uuid);
//const videoContext = ref(null);
// onReady(() => {
// videoContext.value = uni.createVideoContext('myVideo');
// });
// 添加下载任务
const onFullscreenChange = (e) => {
@@ -274,6 +289,15 @@ const onFullscreenChange = (e) => {
isFullScreen.value = fullScreen;
});
};
const onVideoPlay = () => {
isPlaying.value = true;
};
// const playVideo = () => {
// videoContext.value.play();
// };
// const onVideoPause = () => {
// isPlaying.value = false;
// };
const addDownloadTask = (item) => {
// 使用store添加任务
@@ -372,14 +396,14 @@ const syncTasksFromStore = () => {
const notEnoughConfirm = () => {
notEnoughVisible.value = false;
uni.sendNativeEvent('buyPointPage', {
msg: 'buyPointPage'
},ret => {
console.log(ret);
});
// navTo({
// url: "/pages_app/buyPoint/buyPoint",
// uni.sendNativeEvent('buyPointPage', {
// msg: 'buyPointPage'
// },ret => {
// console.log(ret);
// });
navTo({
url: "/pages_app/buyPoint/buyPoint?product_id="+video_uuid.value+"&type=video",
});
};
const pointConfirm = () => {
pointVisible.value = false;
@@ -814,6 +838,12 @@ onLoad((options) => {
videoWidth.value = res.windowWidth; // 窗口宽度
},
});
console.log('enrtyVideoDetail');
uni.sendNativeEvent('enrtyVideoDetail', {
msg: 'enrtyVideoDetail'
}, ret => {
console.log(ret);
})
video_uuid.value = options.id;
from.value = options.from;
if(from.value != 'download') {
@@ -1060,6 +1090,26 @@ $bg-color: #f7f7f7;
$text-primary: #333;
$text-secondary: #666;
$theme-color: #8b2316;
.videobox{
top: calc(var(--status-bar-height) + 44px);
width:100%;
height:auto;
overflow: hidden;
position: relative;
.play-img{
position: absolute;
z-index:9999;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100rpx;
height:100rpx;
image{
width: 100rpx;
height:100rpx;
}
}
}
.navbox {
:deep(.uni-navbar__header-btns-right) {
width: 100px !important;
@@ -1096,7 +1146,7 @@ $theme-color: #8b2316;
.player-wrapper {
background: #fff;
position: relative;
top: calc(var(--status-bar-height) + 44px);
z-index: 0;
height:220px;
overflow: hidden;