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 f28bc688
authored
Feb 16, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
详情,视频互斥;开通门店样式
1 parent
046d2d45
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
components/proDetail/proDetail.js
components/proDetail/proDetail.wxml
packagesList/apply/pages/apply.scss
components/proDetail/proDetail.js
View file @
f28bc68
...
@@ -13,6 +13,9 @@ Component({
...
@@ -13,6 +13,9 @@ Component({
value
:
-
1
,
value
:
-
1
,
observer
(
n
)
{
observer
(
n
)
{
this
.
getInfo
()
this
.
getInfo
()
if
(
n
==
3
)
{
this
.
setVideoCtx
()
}
}
}
},
},
// 选中的产品
// 选中的产品
...
@@ -69,6 +72,16 @@ Component({
...
@@ -69,6 +72,16 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
setVideoCtx
()
{
this
.
setData
({
videoCtx
:
wx
.
createVideoContext
(
'video'
,
this
),
crowdVideoCtx
:
wx
.
createVideoContext
(
'crowd-video'
,
this
)
})
},
handleVideoPlay
(
e
)
{
let
{
attr
}
=
e
.
currentTarget
.
dataset
this
.
data
[
attr
]
&&
this
.
data
[
attr
].
pause
()
},
getInfo
()
{
getInfo
()
{
let
{
activeNavIdx
,
actNum
}
=
this
.
data
let
{
activeNavIdx
,
actNum
}
=
this
.
data
// console.log(actNum, 'actNum---')
// console.log(actNum, 'actNum---')
...
...
components/proDetail/proDetail.wxml
View file @
f28bc68
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<view class="view-prod custom-class">
<view class="view-prod custom-class">
<view class="pro-head">
<view class="pro-head">
<!-- 有视频 -->
<!-- 有视频 -->
<video class="frame"
wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}"
/>
<video class="frame"
id="video" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx"
/>
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<view class="title-wrap">
<view class="title-wrap">
<view class="title">{{prodItemVideo.name}}</view>
<view class="title">{{prodItemVideo.name}}</view>
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}">
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}">
<!-- 众筹-视频 -->
<!-- 众筹-视频 -->
<block wx:if="{{ index == 3 && actNum == 3 }}">
<block wx:if="{{ index == 3 && actNum == 3 }}">
<video class="crowd-video" src="{{videoBaseUrl}}video/crowd-detail.mp4" />
<video class="crowd-video"
id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx"
src="{{videoBaseUrl}}video/crowd-detail.mp4" />
</block>
</block>
</image>
</image>
</block>
</block>
...
...
packagesList/apply/pages/apply.scss
View file @
f28bc68
...
@@ -29,7 +29,6 @@ page {
...
@@ -29,7 +29,6 @@ page {
}
}
.top
{
.top
{
margin-bottom
:
32rpx
;
margin-bottom
:
32rpx
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
.line
{
.line
{
width
:
6rpx
;
width
:
6rpx
;
...
...
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