Commit 34691f37 by luyt

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

1 parent ca22e70d
...@@ -111,6 +111,7 @@ Page({ ...@@ -111,6 +111,7 @@ Page({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
outshowVideo
// origin //跳转来源 home // origin //跳转来源 home
} = options; } = options;
// if(actNum&&activeNavIdx)return // if(actNum&&activeNavIdx)return
...@@ -118,6 +119,7 @@ Page({ ...@@ -118,6 +119,7 @@ Page({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
outshowVideo
// origin // origin
// isShare // isShare
}); });
...@@ -330,6 +332,7 @@ Page({ ...@@ -330,6 +332,7 @@ Page({
actNum, actNum,
activeNavIdx, activeNavIdx,
isShare: true, isShare: true,
outshowVideo:false, //显示视频列表
}); });
// 发请求 // 发请求
let senceItem = senceData[actNum]; let senceItem = senceData[actNum];
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</view> </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" /> --> <!-- <shareModel actNum="{{actNum}}" isShow="{{isShow}}" bindmodelclose="modelcloseFn" /> -->
<view class="share-wrap" wx:if="{{isShow}}"> <view class="share-wrap" wx:if="{{isShow}}">
......
...@@ -21,6 +21,10 @@ Component({ ...@@ -21,6 +21,10 @@ Component({
value: false, value: false,
}, },
origin:String, //来源 origin:String, //来源
outshowVideo: {
type: Boolean,
value: true,
}, //显示视频列表
}, },
/** /**
...@@ -44,6 +48,7 @@ Component({ ...@@ -44,6 +48,7 @@ Component({
IMGURL: `${IMG_URL}index/`, IMGURL: `${IMG_URL}index/`,
videoBaseUrl, videoBaseUrl,
getMoreBtn:false, getMoreBtn:false,
showVideo:true //显示视频列表
}, },
lifetimes: { lifetimes: {
ready: function () { ready: function () {
...@@ -52,11 +57,12 @@ Component({ ...@@ -52,11 +57,12 @@ Component({
activeNavIdx:this.data.wrapactiveNavIdx activeNavIdx:this.data.wrapactiveNavIdx
}) })
} }
// if(this.data.origin){ if(!this.data.outshowVideo){
// this.setData({ console.log('outshowVideo', this.data.outshowVideo)
// getMoreBtn:true this.setData({
// }) showVideo:false
// } })
}
this.init(); this.init();
this.getImgHeight(); this.getImgHeight();
...@@ -196,10 +202,11 @@ Component({ ...@@ -196,10 +202,11 @@ Component({
phone, phone,
// isShare: false, // isShare: false,
}); });
//隐藏更多按钮 //隐藏更多按钮,显示视频列表
this.setData({ this.setData({
getMoreBtn:true, getMoreBtn:true,
isShare: false, isShare: false,
outshowVideo:true
}) })
this.getMoreFn() this.getMoreFn()
}) })
...@@ -247,6 +254,7 @@ Component({ ...@@ -247,6 +254,7 @@ Component({
actNum, actNum,
activeNavIdx, activeNavIdx,
apiData, apiData,
outshowVideo:true
// origin:'home' //跟首页类似情况 // origin:'home' //跟首页类似情况
// isShare: true // isShare: true
}); });
......
...@@ -46,9 +46,10 @@ ...@@ -46,9 +46,10 @@
scroll-y="{{true}}" scroll-y="{{true}}"
> >
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" > <!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
<!-- index!=5 --> <view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index != 5}}">
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" 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-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list"> <view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i"> <block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
...@@ -73,6 +74,22 @@ ...@@ -73,6 +74,22 @@
点击查看更多详情 点击查看更多详情
</button> </button>
</view> </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> </block>
</scroll-view> </scroll-view>
</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!