This commit is contained in:
cansnow
2026-02-09 07:29:02 +08:00
parent 2860c46ec1
commit 6720c15e30
19 changed files with 996 additions and 207 deletions
@@ -1,14 +1,13 @@
<template>
<view>
<view class="video_message_container" @click="clickMediaItem">
<view class="video_message_container">
<u--image
:showLoading="true"
:src="src"
:width="imgWidth"
:height="maxHeight"
mode="widthFix"
@load="onLoaded"
@click="clickMediaItem">
@load="onLoaded" >
<template v-slot:loading>
<u-loading-icon color="red"></u-loading-icon>
</template>
@@ -21,8 +20,8 @@
</view>
<text class="progress-text">{{ videoDownloadProgress }}%</text>
</view>
<u-icon v-else-if="videoExists" class="play_icon" name="play-circle" size="48" color="#fff"></u-icon>
<uni-icons v-else class="play_icon" type="cloud-download" size="48" color="#fff"></uni-icons>
<u-icon v-else-if="videoExists" class="play_icon" name="play-circle" size="48" color="#ccc"></u-icon>
<uni-icons v-else class="play_icon" type="cloud-download" size="48" color="#ccc"></uni-icons>
</view>
</view>
<!-- 视频播放器组件 -->
@@ -116,23 +115,17 @@
},
methods: {
async init(){
const self = this;
const _this = this;
console.log(this.message?.videoElem,this.conversationID);
const snapshotUrl = this.message?.videoElem?.snapshotUrl;
self.coverDownloading = true;
_this.coverDownloading = true;
//console.log(snapshotUrl);
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
self.coverDownloading = false;
self.src = fn;
_this.coverDownloading = false;
_this.src = fn;
//console.log(fn);
});
},
clickMediaItem() {
uni.previewImage({
current: 0,
urls: [this.message.videoElem?.snapshotUrl],
indicator: "none",
});
_this.videoExists = util.fileExsit(util.getCachePath(_this.message?.videoElem?.videoUrl,`${_this.conversationID}`));
},
async onLoaded() {
this.loadingWidth = "auto";
@@ -1,8 +1,8 @@
<template>
<view v-if="isNoticeMessage" class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`">
<view v-if="isNoticeMessage" class="notice_message_container" :id="`auchor${source.clientMsgID}`">
<text>{{ getNoticeContent }}</text>
</view>
<view v-else-if="source.contentType == 1519" class="notice_message_container" style="margin: 0 auto;" :id="`auchor${source.clientMsgID}`">
<view v-else-if="source.contentType == 1519" class="notice_message_container" :id="`auchor${source.clientMsgID}`">
<text @click="toAnnouncement">{{ announcementElem.opUser.nickname }}更新了群公告</text>
</view>
<view v-else class="message_wrapper">
@@ -282,7 +282,7 @@
margin-bottom: 6rpx;
}
.message_content_wrap_shadow {
box-shadow: 0px 0px 2px rgba(0,0,0,0.1);
box-shadow: 0px 0px 0px rgba(0,0,0,0.1);
}
.message_content_wrap {
@include vCenterBox();
@@ -345,7 +345,7 @@
// text-align: end;
align-items: flex-end;
.message_content_wrap_shadow {
box-shadow: 0px 0px 2px #95e261;
box-shadow: 0px 0px 0px #95e261;
}
.message_content_wrap {
flex-direction: row-reverse;
@@ -375,10 +375,14 @@
.notice_message_container {
@include ellipsisWithLine(2);
text-align: center;
margin: 24rpx 48rpx;
padding: 24rpx 48rpx;
word-break: break-word;
// font-size: 24rpx;
font-size: 0.85rem;
text-align: center;
color: #999;
width: 100%;
box-sizing: border-box;
position: relative;
}