我的页面
This commit is contained in:
@@ -37,6 +37,11 @@
|
||||
|
||||
<!-- 内容区 -->
|
||||
<view v-if="activeTab === 'info'" class="intro">
|
||||
<!-- 显示传递过来的视频信息 -->
|
||||
<view v-if="pageParams.title" class="video-info">
|
||||
<view class="video-title">{{ decodeURIComponent(pageParams.title) }}</view>
|
||||
<view v-if="pageParams.author" class="video-author">{{ decodeURIComponent(pageParams.author) }}</view>
|
||||
</view>
|
||||
<view class="speaker">陈煜 教授</view>
|
||||
<text class="intro-text">{{ introText }}</text>
|
||||
</view>
|
||||
@@ -76,6 +81,28 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import uniVideo from '@/components/uniVideo/uniVideo.vue';
|
||||
|
||||
// 接收页面参数
|
||||
const pageParams = ref({});
|
||||
|
||||
// 使用uni-app的onLoad生命周期
|
||||
const onLoad = (options) => {
|
||||
pageParams.value = options;
|
||||
console.log('接收到的参数:', pageParams.value);
|
||||
|
||||
// 如果有标题参数,可以在这里进行相应处理
|
||||
if (options.title) {
|
||||
// 可以更新页面标题或进行其他操作
|
||||
console.log('视频标题:', decodeURIComponent(options.title));
|
||||
}
|
||||
if (options.author) {
|
||||
console.log('视频作者:', decodeURIComponent(options.author));
|
||||
}
|
||||
if (options.id) {
|
||||
console.log('视频ID:', options.id);
|
||||
}
|
||||
};
|
||||
|
||||
const videoSrc = ref('');
|
||||
const poster = ref('/static/livebg.png');
|
||||
const activeTab = ref('info');
|
||||
@@ -244,6 +271,26 @@ $theme-color: #8B2316;
|
||||
background: #fff;
|
||||
padding: 24rpx 28rpx 40rpx;
|
||||
|
||||
.video-info {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
background: #f8f9fa;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.video-title {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.video-author {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.speaker {
|
||||
font-size: 32rpx;
|
||||
color: $text-primary;
|
||||
|
||||
Reference in New Issue
Block a user