Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 34691f37
authored
Oct 22, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:分享图片视频列表问题
1 parent
ca22e70d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
10 deletions
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.wxml
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.wxml
pages/tab/index/components/product/product.wxs
pages/checkProduct/checkProduct.js
View file @
34691f3
...
...
@@ -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];
...
...
pages/checkProduct/checkProduct.wxml
View file @
34691f3
...
...
@@ -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}}">
...
...
pages/tab/index/components/product/product.js
View file @
34691f3
...
...
@@ -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
});
...
...
pages/tab/index/components/product/product.wxml
View file @
34691f3
...
...
@@ -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>
...
...
pages/tab/index/components/product/product.wxs
View file @
34691f3
// 1.视频默认进来是true,显示,
// 2.扫码,分享链接进来,不显示
// 3.点击更多详情,隐藏更多按钮,显示视频
// 4.视频的位置最后一个 下标5
// var showVideo = function(index){
// if(index == 5){
// a
// }
// };
// module.exports = {
// showVideo:showVideo
// }
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment