|
|
@@ -105,38 +105,39 @@ Page({
|
|
|
}
|
|
|
|
|
|
// 获取当前页面的参数
|
|
|
- const pages = getCurrentPages();
|
|
|
- const currentPage = pages[pages.length - 1];
|
|
|
- const options = currentPage.options;
|
|
|
- const jump = parseInt(options.jump); // 是否跳转阅读器 1-不跳转
|
|
|
- const scene = wx.getStorageSync('scene');
|
|
|
- console.log('scene场景值:', scene);
|
|
|
- console.log('jump阅读器:', jump);
|
|
|
- console.log('shared_video_id:', options.shared_video_id);
|
|
|
- console.log('share_count:', options.share_count);
|
|
|
- console.log('isEnterVideoDetail:', app.globalData.isEnterVideoDetail);
|
|
|
-
|
|
|
- if (options.shared_video_id) {
|
|
|
- // 处理分享进入的情况
|
|
|
- if (!app.globalData.isEnterVideoDetail) {
|
|
|
- // 延迟跳转,确保列表页已经加载完成
|
|
|
- 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'
|
|
|
- // });
|
|
|
- }
|
|
|
- });
|
|
|
- }, 800);
|
|
|
- } else {
|
|
|
- // 第二次进入把isEnterVideoDetail恢复默认值
|
|
|
- app.globalData.isEnterVideoDetail = true;
|
|
|
- }
|
|
|
- }
|
|
|
+ // const pages = getCurrentPages();
|
|
|
+ // const currentPage = pages[pages.length - 1];
|
|
|
+ // const options = currentPage.options;
|
|
|
+ // const jump = parseInt(options.jump); // 是否跳转阅读器 1-不跳转
|
|
|
+ // const scene = wx.getStorageSync('scene');
|
|
|
+ // console.log('scene场景值:', scene);
|
|
|
+ // console.log('jump阅读器:', jump);
|
|
|
+ // console.log('shared_video_id:', options.shared_video_id);
|
|
|
+ // console.log('share_count:', options.share_count);
|
|
|
+ // console.log('isEnterVideoDetail:', app.globalData.isEnterVideoDetail);
|
|
|
+
|
|
|
+ // if (options.shared_video_id) {
|
|
|
+ // // 处理分享进入的情况
|
|
|
+ // if (!app.globalData.isEnterVideoDetail) {
|
|
|
+ // // 延迟跳转,确保列表页已经加载完成
|
|
|
+ // setTimeout(() => {
|
|
|
+ // console.log('延迟跳转到视频详情页')
|
|
|
+ // 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'
|
|
|
+ // // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }, 800);
|
|
|
+ // } else {
|
|
|
+ // // 第二次进入把isEnterVideoDetail恢复默认值
|
|
|
+ // app.globalData.isEnterVideoDetail = true;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
// if (options.shared_video_id) {
|
|
|
// if (+options.share_count === 1 && this.data.share_count === 1) {
|
|
|
@@ -212,7 +213,7 @@ Page({
|
|
|
console.log('scene为1007或1008且jump不为1,跳转到书详情页')
|
|
|
// 延迟跳转,确保列表页已经加载完成
|
|
|
setTimeout(() => {
|
|
|
- this.goToBookDetail()
|
|
|
+ this.goToBookDetail(`&shared_video_id=${shared_video_id}&tag_id=${tag_id}`)
|
|
|
}, 500);
|
|
|
} else {
|
|
|
console.log('scene不为1007,1008且jump不为1,跳转到视频详情页')
|
|
|
@@ -671,14 +672,14 @@ Page({
|
|
|
},
|
|
|
|
|
|
// 跳转到书籍详情
|
|
|
- goToBookDetail() {
|
|
|
+ goToBookDetail(query) {
|
|
|
getApp().globalData.isShowDialog = true
|
|
|
// 使用公共的goToBookDetail函数
|
|
|
const rndBook = rndone(apple.bookList)
|
|
|
goToBookDetail({
|
|
|
bookId: rndBook.bookId,
|
|
|
wxBookId: rndBook.wxBookId
|
|
|
- });
|
|
|
+ }, query);
|
|
|
},
|
|
|
// 跳转视频详情
|
|
|
goToVideoDetail(videoId, tagId) {
|