|
|
@@ -34,6 +34,28 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ // 获取当前页面的参数
|
|
|
+ const pages = getCurrentPages();
|
|
|
+ const currentPage = pages[pages.length - 1];
|
|
|
+ const options = currentPage.options;
|
|
|
+
|
|
|
+ // 处理分享进入的情况
|
|
|
+ if (options.shared_video_id) {
|
|
|
+ // 延迟跳转,确保列表页已经加载完成
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/video/detail?id=${options.shared_video_id}&title=${options.title || ''}&tag_id=${options.tag_id || ''}`,
|
|
|
+ fail: (err) => {
|
|
|
+ console.error('跳转到视频详情页失败:', err);
|
|
|
+ wx.showToast({
|
|
|
+ title: '打开视频失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+
|
|
|
getTemplateConfig({
|
|
|
box_type: 67,
|
|
|
uuid: getApp().globalData.uuid
|
|
|
@@ -372,7 +394,7 @@ Page({
|
|
|
|
|
|
return {
|
|
|
title: video.title,
|
|
|
- path: `/pages/video/detail?id=${video.id}&title=${encodeURIComponent(video.title)}&tag_id=${video.tag_ids[0]}`,
|
|
|
+ path: `/pages/video/video?shared_video_id=${video.id}&title=${encodeURIComponent(video.title)}&tag_id=${video.tag_ids[0]}`,
|
|
|
imageUrl: video.cover_image,
|
|
|
success: function(res) {
|
|
|
wx.showToast({
|
|
|
@@ -398,7 +420,7 @@ Page({
|
|
|
|
|
|
return {
|
|
|
title: video.title,
|
|
|
- query: `id=${video.id}&title=${encodeURIComponent(video.title)}&tag_id=${video.tag_ids[0]}`,
|
|
|
+ query: `shared_video_id=${video.id}&title=${encodeURIComponent(video.title)}&tag_id=${video.tag_ids[0]}`,
|
|
|
imageUrl: video.cover_image
|
|
|
}
|
|
|
}
|