Commit 34691f37 by luyt

fix:分享图片视频列表问题

1 parent ca22e70d
......@@ -111,6 +111,7 @@ Page({
actNum,
activeNavIdx,
apiData,
outshowVideo
// origin //跳转来源 home
} = options;
// if(actNum&&activeNavIdx)return
......@@ -118,6 +119,7 @@ Page({
actNum,
activeNavIdx,
apiData,
outshowVideo
// origin
// isShare
});
......@@ -330,6 +332,7 @@ Page({
actNum,
activeNavIdx,
isShare: true,
outshowVideo:false, //显示视频列表
});
// 发请求
let senceItem = senceData[actNum];
......
......@@ -4,7 +4,7 @@
</view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" outshowVideo="{{outshowVideo}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 -->
<!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<view class="share-wrap" wx:if="{{isShow}}">
......
......@@ -21,6 +21,10 @@ Component({
value: false,
},
origin:String, //来源
outshowVideo: {
type: Boolean,
value: true,
}, //显示视频列表
},
/**
......@@ -44,6 +48,7 @@ Component({
IMGURL: `${IMG_URL}index/`,
videoBaseUrl,
getMoreBtn:false,
showVideo:true //显示视频列表
},
lifetimes: {
ready: function () {
......@@ -52,11 +57,12 @@ Component({
activeNavIdx:this.data.wrapactiveNavIdx
})
}
// if(this.data.origin){
// this.setData({
// getMoreBtn:true
// })
// }
if(!this.data.outshowVideo){
console.log('outshowVideo', this.data.outshowVideo)
this.setData({
showVideo:false
})
}
this.init();
this.getImgHeight();
......@@ -196,10 +202,11 @@ Component({
phone,
// isShare: false,
});
//隐藏更多按钮
//隐藏更多按钮,显示视频列表
this.setData({
getMoreBtn:true,
isShare: false,
outshowVideo:true
})
this.getMoreFn()
})
......@@ -247,6 +254,7 @@ Component({
actNum,
activeNavIdx,
apiData,
outshowVideo:true
// origin:'home' //跟首页类似情况
// isShare: true
});
......
......@@ -46,9 +46,10 @@
scroll-y="{{true}}"
>
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" >
<!-- index!=5 -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" wx:if="{{index!=5}}" />
<!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index != 5}}">
<!-- wx:if="{{index!=5}}" -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
......@@ -73,6 +74,22 @@
点击查看更多详情
</button>
</view>
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index == 5 && outshowVideo}}">
<!-- wx:if="{{index!=5}}" -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<view class="video-text">{{item.name}}</view>
</view>
</block>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
......
// 1.视频默认进来是true,显示,
// 2.扫码,分享链接进来,不显示
// 3.点击更多详情,隐藏更多按钮,显示视频
// 4.视频的位置最后一个 下标5
// var showVideo = function(index){
// if(index == 5){
// a
// }
// };
// module.exports = {
// showVideo:showVideo
// }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!