Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
samsung-christmas
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
967f54f5
authored
Dec 20, 2019
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
225d1083
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
Application/Home/View/default/layout.tpl
+3
-3
Public/static/js/common.js
+23
-1
No files found.
Application/Home/View/default/layout.tpl
View file @
967f54f5
...
...
@@ -79,7 +79,7 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__CDN__/css/index.css?v=10"
media=
"all"
/>
</head>
<body>
<
!-- <audio src="__CDN__/media/bg.mp3" preload="auto" loop="loop" id="music" style="display:none"></audio> --
>
<
audio
src=
"__CDN__/media/bg.mp3"
preload=
"auto"
loop=
"loop"
id=
"music"
style=
"display:none"
></audio
>
<div
class=
"wrap"
>
<div
class=
"wrap-inner"
>
{:if $projectId
&&
strpos( $smarty.server.HTTP_HOST , 'dev.izhida.cn') !== false}
...
...
@@ -98,7 +98,7 @@
var
link
=
location
.
origin
;
var
friend_title
=
'圣诞老人来送礼物啦!快来一起围观!'
;
var
friend_desc
=
'
康康圣诞老人在不同城市遇到的故事,
领取你的圣诞专属礼物'
;
var
friend_desc
=
'
快来
领取你的圣诞专属礼物'
;
var
timeline_desc
=
'圣诞老人来送礼物啦!快来一起围观!'
;
window
.
wxFriendData
=
{
'link'
:
link
,
...
...
@@ -126,7 +126,7 @@
{:block name='js'}{:/block}
<script>
window
.
wx
&&
wx
.
ready
(
function
()
{
//
$('#music')[0].play();
$
(
'#music'
)[
0
].
play
();
wx
.
onMenuShareAppMessage
(
wxFriendData
);
wx
.
onMenuShareTimeline
(
wxTimelineData
);
});
...
...
Public/static/js/common.js
View file @
967f54f5
...
...
@@ -79,6 +79,22 @@ $(document).ready(function () {
});
$
(
'.logo'
).
css
(
'top'
,
getTranslateDistance
(
15
));
initLeaves
(
'leafContainer'
);
$
(
'.music'
).
click
(
function
(){
if
(
$
(
'#music'
)[
0
].
paused
)
{
$
(
'#music'
)[
0
].
play
();
$
(
'.music.stop'
).
hide
();
$
(
'.music.play'
).
show
();
}
else
{
$
(
'#music'
)[
0
].
pause
();
$
(
'.music.play'
).
hide
();
$
(
'.music.stop'
).
show
();
}
});
//显示活动规则
$
(
'.btn-rule'
).
on
(
'click'
,
showRule
);
//隐藏活动规则
...
...
@@ -107,6 +123,8 @@ $(document).ready(function () {
$
(
'.sh-img'
).
on
(
'click'
,
tryPrize
);
//点击视频跳转抽奖
$
(
'.sy-img'
).
on
(
'click'
,
tryPrize
);
//视频播放事件
video
.
addEventListener
(
'play'
,
videoPlay
);
});
function
submitTel
()
{
...
...
@@ -151,8 +169,12 @@ function backToMap () {
$
(
'.map-page'
).
show
();
}
function
videoPlay
()
{
if
(
musicStatus
)
$
(
'#music'
)[
0
].
pause
();
}
function
videoEnd
()
{
if
(
musicStatus
)
$
(
'#music'
)[
0
].
play
();
$
(
'.video-block'
).
hide
();
allowPrize
=
true
;
video
.
removeEventListener
(
'ended'
,
videoEnd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment