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