feat(电子名片): 支持通过后台控制显示样式及封面尺寸
This commit is contained in:
@@ -99,10 +99,13 @@
|
|||||||
<!-- 视频号视频列表 -->
|
<!-- 视频号视频列表 -->
|
||||||
<view class="view_channel_container" v-if="showChannelListDiy && channelList.length > 0">
|
<view class="view_channel_container" v-if="showChannelListDiy && channelList.length > 0">
|
||||||
<diy-channel-list :value="{
|
<diy-channel-list :value="{
|
||||||
showStyle: 'fixed',
|
|
||||||
rowCount: 2,
|
|
||||||
list: channelList,
|
list: channelList,
|
||||||
aspectRatio: '3:4',
|
showStyle: diyChannelSettings.channel_display_style,
|
||||||
|
rowCount: diyChannelSettings.channel_row_count,
|
||||||
|
aspectRatio: diyChannelSettings.channel_aspect_ratio,
|
||||||
|
showViewCount: diyChannelSettings.channel_show_view_count,
|
||||||
|
titleLineClamp: diyChannelSettings.channel_title_line_clamp,
|
||||||
|
showPlayBtn: diyChannelSettings.channel_show_play_btn,
|
||||||
}" @channel-video-click-play="onChannelVideoClickPlay"/>
|
}" @channel-video-click-play="onChannelVideoClickPlay"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -214,6 +217,16 @@ export default {
|
|||||||
fileList: [], // 企业文件
|
fileList: [], // 企业文件
|
||||||
videoList: [], // 企业视频
|
videoList: [], // 企业视频
|
||||||
channelList: [], // 视频号
|
channelList: [], // 视频号
|
||||||
|
|
||||||
|
diyChannelSettings: {
|
||||||
|
channel_display_style: 'fixed',
|
||||||
|
channel_aspect_ratio: '16:9',
|
||||||
|
channel_show_view_count: true,
|
||||||
|
channel_row_count: 2,
|
||||||
|
channel_title_line_clamp: 2,
|
||||||
|
channel_show_play_btn: true,
|
||||||
|
}, // 自定义设置
|
||||||
|
|
||||||
ismessage: 0,
|
ismessage: 0,
|
||||||
currentVideo: null, // 当前播放的视频
|
currentVideo: null, // 当前播放的视频
|
||||||
Form: {
|
Form: {
|
||||||
@@ -283,6 +296,13 @@ export default {
|
|||||||
this.showVideoListDiy = res.diy.is_video == 1;
|
this.showVideoListDiy = res.diy.is_video == 1;
|
||||||
this.showFileListDiy = res.diy.is_file == 1;
|
this.showFileListDiy = res.diy.is_file == 1;
|
||||||
this.showChannelListDiy = res.diy.is_channel == 1;
|
this.showChannelListDiy = res.diy.is_channel == 1;
|
||||||
|
|
||||||
|
// 遍历res.diy所有key,然后判断key前缀包含channel_,如果包含,就赋值给diyChannelSettings
|
||||||
|
for (let key in res.diy) {
|
||||||
|
if (key.startsWith('channel_')) {
|
||||||
|
this.diyChannelSettings[key] = res.diy[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: res => {}
|
fail: res => {}
|
||||||
|
|||||||
Reference in New Issue
Block a user