chore(电子名片): 更新企业文件及企业视频相关代码
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 企业文件 -->
|
||||
<view class="view_files_container" v-if="fileList.length > 0">
|
||||
<view class="view_files_container" v-if="showFileListDiy && fileList.length > 0">
|
||||
<view class="section-title">企业文件</view>
|
||||
<view class="files-list">
|
||||
<view v-for="(file, index) in fileList" :key="index" class="file-item">
|
||||
@@ -77,14 +77,13 @@
|
||||
<view class="file-name">{{ file.name }}</view>
|
||||
<view class="file-actions">
|
||||
<button class="file-btn share-btn" @click="shareFile(file)">{{ $lang('share') }}</button>
|
||||
<button class="file-btn print-btn" @click="printFile(file)">{{ $lang('print') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 企业视频 -->
|
||||
<view class="view_videos_container" v-if="videoList.length > 0">
|
||||
<view class="view_videos_container" v-if="showVideoListDiy && videoList.length > 0">
|
||||
<view class="section-title">企业视频</view>
|
||||
<view class="videos-list">
|
||||
<view v-for="(video, index) in videoList" :key="index" class="video-item" @click="playVideo(video)">
|
||||
@@ -98,10 +97,10 @@
|
||||
</view>
|
||||
|
||||
<!-- 视频号视频列表 -->
|
||||
<view class="view_channel_container" v-if="showChannelListDiy">
|
||||
<view class="view_channel_container" v-if="showChannelListDiy && channelList.length > 0">
|
||||
<diy-channel-list :value="{
|
||||
showStyle: 'fixed',
|
||||
rowCount: 3,
|
||||
rowCount: 1,
|
||||
list: channelList
|
||||
}" />
|
||||
</view>
|
||||
@@ -183,11 +182,19 @@
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
<hover-nav></hover-nav>
|
||||
<diy-bottom-nav></diy-bottom-nav>
|
||||
|
||||
<!-- 视频播放弹窗 -->
|
||||
<ns-video-player-popup
|
||||
ref="videoPlayerPopup"
|
||||
:current-video="currentVideo"
|
||||
@popup-change="onVideoPopupChange"
|
||||
></ns-video-player-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scroll from '@/common/js/scroll-view.js';
|
||||
import shareUtil from '@/common/js/share.js';
|
||||
|
||||
export default {
|
||||
mixins: [scroll],
|
||||
@@ -207,6 +214,7 @@ export default {
|
||||
videoList: [], // 企业视频
|
||||
channelList: [], // 视频号
|
||||
ismessage: 0,
|
||||
currentVideo: null, // 当前播放的视频
|
||||
Form: {
|
||||
realname: '',
|
||||
mobile: '',
|
||||
@@ -269,25 +277,31 @@ export default {
|
||||
methods: {
|
||||
// 分享文件
|
||||
shareFile(file) {
|
||||
// 实现文件分享逻辑
|
||||
uni.showToast({ title: '分享功能开发中', icon: 'none' });
|
||||
shareUtil.shareFile(file);
|
||||
},
|
||||
|
||||
// 打印文件
|
||||
printFile(file) {
|
||||
// 实现文件打印逻辑
|
||||
uni.showToast({ title: '打印功能开发中', icon: 'none' });
|
||||
},
|
||||
// 播放视频
|
||||
playVideo(video) {
|
||||
// 实现视频播放逻辑
|
||||
if (video.videoUrl) {
|
||||
uni.navigateTo({
|
||||
url: `/pages_tool/video/video?url=${encodeURIComponent(video.videoUrl)}&title=${encodeURIComponent(video.title)}`
|
||||
});
|
||||
this.currentVideo = video;
|
||||
this.$refs.videoPlayerPopup.open();
|
||||
} else {
|
||||
uni.showToast({ title: '视频地址不存在', icon: 'none' });
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭视频弹窗
|
||||
closeVideoPopup() {
|
||||
this.$refs.videoPlayerPopup.close();
|
||||
},
|
||||
|
||||
// 视频弹窗状态变化
|
||||
onVideoPopupChange(e) {
|
||||
if (!e.show) {
|
||||
// 弹窗关闭时重置当前视频
|
||||
this.currentVideo = null;
|
||||
}
|
||||
},
|
||||
save() {
|
||||
if (!this.Form.realname.trim()) {
|
||||
@@ -761,10 +775,7 @@ image {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.print-btn {
|
||||
background-color: #f0f0f0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 企业视频样式 */
|
||||
@@ -835,4 +846,5 @@ image {
|
||||
bottom: 180rpx !important;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user