Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
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 f0e95c3d
authored
Jul 26, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
bd917267
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
src/utils/audio.js
src/views/crowdfunding/index.vue
src/utils/audio.js
View file @
f0e95c3
...
...
@@ -33,8 +33,16 @@ export function Audio (url, callBack) {
audioContext
.
decodeAudioData
(
xhr
.
response
,
buffer
=>
{
this
.
buffer
=
buffer
if
(
buffer
)
{
_this
.
_playSourceNode
()
callBack
()
if
(
wx
.
getNetworkType
)
wx
.
getNetworkType
({
success
:
function
(
res
)
{
_this
.
_playSourceNode
()
callBack
()
}
})
else
{
_this
.
_playSourceNode
()
callBack
()
}
}
})
}
...
...
src/views/crowdfunding/index.vue
View file @
f0e95c3
...
...
@@ -219,14 +219,13 @@ export default {
viewFlag
:
false
,
audio
:
null
,
audioFlag
:
false
,
videoUrl
:
''
,
test
:
Date
.
now
()
videoUrl
:
''
}
}
,
mounted
()
{
let
_this
=
this
let
jsApiList
=
window
.
$ISWXWORK
?
[
'launchMiniprogram'
]
:
[
'updateAppMessageShareData'
]
wxConfig
.
init
([
'getLocation'
,
'openLocation'
,
'onMenuShareAppMessage'
,
...
jsApiList
]).
then
(()
=>
{
wxConfig
.
init
([
'getLocation'
,
'openLocation'
,
'
getNetworkType'
,
'
onMenuShareAppMessage'
,
...
jsApiList
]).
then
(()
=>
{
wxConfig
.
ready
(()
=>
{
this
.
getActivityDetail
()
}
)
...
...
@@ -275,8 +274,14 @@ export default {
this
.
getActivityGroup
()
let
[
redirectUrl
]
=
window
.
location
.
href
.
split
(
'?'
)
if
(
data
.
activityVideos
&&
data
.
activityVideos
.
length
)
{
data
.
activityVideos
.
map
((
e
,
index
)
=>
{
e
.
poster
=
`${e.activityVideo
}
?x-oss-process=video/snapshot,t_10000,m_fast,f_jpg`
// data.activityVideos.map((e, index) =>
{
// e.poster = `$
{
e
.
activityVideo
}
?
x
-
oss
-
process
=
video
/
snapshot
,
t_10000
,
m_fast
,
f_jpg
`
//
}
)
/**安卓退出全屏 */
document.addEventListener('webkitfullscreenchange', () => {
if (!document.webkitIsFullScreen && data.activityMusic) {
this.audioAutoPlay()
}
}
)
}
if (data.activityMusic) {
...
...
@@ -312,7 +317,6 @@ export default {
}
)
}
,
imgError (index) {
alert
(
'2'
)
this.detail.activityVideos[index].poster = ''
}
,
share () {
...
...
@@ -356,6 +360,10 @@ export default {
this.currentVideoIndex = index
let video = this.$refs[`
video
-
$
{
index
}
`][0]
video.controls = false
video.addEventListener('webkitendfullscreen', () => {
this.audioAutoPlay()
video.removeEventListener('webkitendfullscreen')
}
)
if (ISMOBILE) this.showLoading('准备中...')
if (audioFlag) this.audioAutoPlay(true)
setTimeout(() => {
...
...
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