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 a72668cf
authored
Aug 01, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
32b6c480
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
8 deletions
src/assets/css/crowdfunding.scss
src/utils/audio.js
src/views/crowdfunding/index.vue
src/assets/css/crowdfunding.scss
View file @
a72668c
...
...
@@ -94,6 +94,7 @@
height
:
82px
;
border-radius
:
2px
;
position
:
relative
;
&
:last-of-type
{
margin-right
:
16px
;
}
...
...
@@ -108,14 +109,24 @@
background
:
#E9E8EC
;
border
:
1px
solid
transparent
;
box-sizing
:
border-box
;
img
{
img
{
object-fit
:
contain
;
}
.line
{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
13%
;
background
:
linear-gradient
(
360deg
,
#292929
0%
,
#474747
100%
);
}
}
}
.active
{
.mask
{
.mask
{
border-color
:
#FC5B32
;
}
}
...
...
@@ -128,8 +139,9 @@
height
:
192px
;
margin
:
0
auto
!
important
;
}
.active
{
.mask
{
.active
{
.mask
{
border-color
:
transparent
;
}
}
...
...
@@ -198,7 +210,8 @@
.icon-address
{
margin
:
0
auto
;
}
.auth-text
{
.auth-text
{
font-size
:
8px
;
}
}
...
...
src/utils/audio.js
View file @
a72668c
...
...
@@ -11,6 +11,14 @@ export function Audio (url, callBack) {
}
else
this
.
_playSourceNode
()
}
}
this
.
stopVideo
=
function
(){
if
(
typeof
this
.
sourceNode
==
'object'
)
{
if
(
this
.
isPlayingBGM
||
off
)
{
this
.
sourceNode
.
stop
()
this
.
isPlayingBGM
=
false
}
}
}
this
.
_playSourceNode
=
function
()
{
const
audioContext
=
this
.
audioContext
audioContext
.
resume
()
...
...
@@ -26,7 +34,7 @@ export function Audio (url, callBack) {
const
audioContext
=
this
.
audioContext
const
xhr
=
new
XMLHttpRequest
()
let
_this
=
this
xhr
.
open
(
'GET'
,
audioUrl
,
true
)
xhr
.
open
(
'GET'
,
`
${
audioUrl
}
?v=
${
Date
.
now
()}
`
,
true
)
xhr
.
responseType
=
'arraybuffer'
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
status
<
400
&&
xhr
.
status
>=
200
&&
xhr
.
readyState
===
4
)
{
...
...
src/views/crowdfunding/index.vue
View file @
a72668c
...
...
@@ -66,6 +66,7 @@
<div
class=
"mask"
>
<img
src=
"https://img02.glsx.com.cn/weapp/resource/h5/images/video-poster.png"
/>
<div
:class=
"['sprite-icon xy-center',detail.activityVideos.length == 1 ?'icon-big-play':'icon-play']"
></div>
<div
class=
"line"
></div>
</div>
</div>
</template>
...
...
@@ -229,8 +230,6 @@ export default {
}
}
,
activated
()
{
console
.
log
(
'--------------------'
)
// if(window.$AUDIO) window.$AUDIO.toggleBGM()
let
jsApiList
=
[
'getLocation'
,
'openLocation'
,
'getNetworkType'
,
'onMenuShareAppMessage'
,
'launchMiniprogram'
,
'updateAppMessageShareData'
]
wxConfig
.
init
(
jsApiList
).
then
(()
=>
{
wxConfig
.
ready
(()
=>
{
...
...
@@ -238,6 +237,9 @@ export default {
}
)
}
)
}
,
deactivated
(){
window
.
$AUDIO
.
stopVideo
()
}
,
mounted
()
{
let
_this
=
this
window
.
addEventListener
(
'scroll'
,
_this
.
debounce
(()
=>
{
...
...
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