Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4e6738af
authored
2020-01-12 16:15:41 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
10c6d284
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
12 deletions
src/pages/blessing/blessing.js
src/pages/blessing/blessing.scss
src/pages/blessing/blessing.wxml
src/pages/blessing/blessing.js
View file @
4e6738a
...
...
@@ -6,7 +6,7 @@ import {
import
Dialog
from
'../../ui/vant-weapp/dialog/dialog'
;
import
Poster
from
'../../miniprogram_dist/poster/poster'
;
const
back
=
wx
.
getBackgroundAudioManager
();
const
innerAudio
=
wx
.
createInnerAudioContext
();
let
app
=
getApp
();
Page
({
...
...
@@ -74,6 +74,12 @@ Page({
authorizeVisible
:
true
})
},
onHide
()
{
},
onUnload
()
{
this
.
pauseBgm
();
},
onLoad
(
options
)
{
this
.
setData
({
options
...
...
@@ -135,23 +141,34 @@ Page({
let
{
detailData
}
=
this
.
data
;
innerAudio
.
src
=
detailData
.
musicUrl
;
innerAudio
.
seek
(
0
);
innerAudio
.
play
();
innerAudio
.
onEnded
(()
=>
{
_this
.
playBgm
();
})
this
.
setData
({
isPlayingBgm
:
true
,
})
back
.
title
=
"背景音乐"
;
back
.
src
=
detailData
.
musicUrl
;
back
.
onEnded
(()
=>
{
_this
.
playBgm
();
})
},
pauseBgm
()
{
wx
.
pauseBackgroundAudio
()
innerAudio
.
pause
();
innerAudio
.
offEnded
(()
=>
{})
this
.
setData
({
isPlayingBgm
:
false
,
})
},
onBgmHandler
()
{
if
(
this
.
data
.
isPlayingBgm
)
{
this
.
pauseBgm
();
}
else
{
this
.
playBgm
();
}
},
onShowMoreHandler
()
{
this
.
setData
({
isMore
:
true
...
...
@@ -659,7 +676,7 @@ Page({
}
catch
(
error
)
{}
let
memberList
=
result
.
memberList
;
// hardcode数据
// for (let index = 0; index <
18
; index++) {
// for (let index = 0; index <
4
; index++) {
// memberList.push({
// blessCode: "4144feba2b904ba89585d90e8618a863",
// blessMemberCode: "747e8e314d0e46679be17fb495975439",
...
...
src/pages/blessing/blessing.scss
View file @
4e6738a
...
...
@@ -5,8 +5,12 @@
font-size
:
36rpx
;
}
.van-popup
{
background-color
:
transparent
!
important
;
.van-popup
{}
.poster-popup
{
.van-popup
{
background-color
:
transparent
!
important
;
}
}
// 用户头像
...
...
@@ -36,6 +40,7 @@
@extend
.bb
;
padding
:
36px
24px
;
font-size
:
38px
;
// background-color: #ffffff;
&
-item
{
margin-bottom
:
48px
;
...
...
@@ -176,6 +181,7 @@
width
:
660px
;
display
:
flex
;
justify-content
:
flex-start
;
// justify-content: center;
flex-wrap
:
wrap
;
margin
:
36px
auto
0
;
height
:
450px
;
...
...
src/pages/blessing/blessing.wxml
View file @
4e6738a
...
...
@@ -146,7 +146,7 @@
</view>
</view>
<!-- 背景音乐 -->
<image bindtap="onBgmHandler" src="../../image/icon/icon-music.png" class="music {{isPlayingBgm?'ani-rotation-music':''}}" mode="widthFix"></image>
<image
wx:if="{{detailData.musicUrl}}"
bindtap="onBgmHandler" src="../../image/icon/icon-music.png" class="music {{isPlayingBgm?'ani-rotation-music':''}}" mode="widthFix"></image>
<!-- <audio src="{{detailData.musicUrl}}" id="myAudio"></audio> -->
<!-- 修改用户信息 -->
<van-dialog close-on-click-overlay use-slot title="修改信息" confirm-button-text="确认修改" show="{{ updateUserInfoDialogVisible }}" show-cancel-button bind:confirm="onUpdateUserInfoHander">
...
...
@@ -189,7 +189,7 @@
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<van-popup bind:click-overlay="onHidePosterHandler" show="{{ posterVisible }}">
<van-popup
class="poster-popup"
bind:click-overlay="onHidePosterHandler" show="{{ posterVisible }}">
<image bindtap="onPreviewImageHandler" class="poster" mode="widthFix" src="{{imageUrl}}" />
<view bindtap="saveImageToPhotosAlbum" class="save-btn">一键保存</view>
</van-popup>
...
...
Please
register
or
sign in
to post a comment