Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5_activity
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谭新宇
h5_activity
Commits
a1a8d008
Commit
a1a8d008
authored
Sep 06, 2019
by
谭新宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居民端支持广告
parent
0501a6ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
common.js
showPhotos/js/page/common.js
+31
-0
index.js
showPhotos/js/page/index.js
+2
-0
signup.js
showPhotos/js/page/signup.js
+3
-0
user.js
showPhotos/js/page/user.js
+2
-0
No files found.
showPhotos/js/page/common.js
View file @
a1a8d008
...
...
@@ -724,3 +724,33 @@ function compressImage(file, callback) {
img
.
src
=
e
.
target
.
result
;
};
}
// 添加进入N秒广告
function
appendAdvertisement
()
{
$
(
"#adImgdiv"
).
remove
();
// 广告时间
var
time
=
getQueryString
(
'adtime'
);
var
imgUrl
=
"http://qnfile.icareyou.net/9cf70c2d689c440cb5a426020fc571021567692920411.jpg?imageMogr2/size-limit/100k"
;
// 广告模板
var
tpl
=
"<div id='adImgdiv' style='position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 9999;background-color: #fff;'>"
+
"<img id='adLoading' src='http://qnfile.icareyou.net/d357016fff92448ebeb6cebf5e73bcd81567699077002' style='left: 50%;width: 0.96rem;top: 40%;position: absolute;margin-left: -0.48rem;'>"
+
"<img id='adImg' src='http://qnfile.icareyou.net/9cf70c2d689c440cb5a426020fc571021567692920411.jpg?imageMogr2/size-limit/100k' style='width: 100%;display:none;'>"
+
"</div>"
;
// 添加广告
if
(
time
!==
null
)
{
time
=
parseInt
(
time
)
$
(
"body"
).
append
(
tpl
);
// 图片加载完成
$
(
"#adLoading"
).
on
(
"load"
,
function
(){
$
(
"#adImg"
).
on
(
"load"
,
function
(){
$
(
"#adLoading"
).
hide
();
// N秒后关闭
setTimeout
(
function
(){
$
(
"#adImgdiv"
).
fadeOut
(
function
(){
$
(
"#adImgdiv"
).
remove
();
});
},
time
*
1000
);
}).
show
();
});
}
}
\ No newline at end of file
showPhotos/js/page/index.js
View file @
a1a8d008
// 加载html结构
loadHtmlJson
();
// 加载广告
appendAdvertisement
();
var
gb_player_loaded
=
false
var
gb_rank_loaded
=
false
...
...
showPhotos/js/page/signup.js
View file @
a1a8d008
var
uploadFile
=
''
;
// 加载广告
appendAdvertisement
();
// 加载html结构
loadHtmlJson
(
function
(){
// 判断是否需要移除机构名称
...
...
showPhotos/js/page/user.js
View file @
a1a8d008
// 加载html结构
loadHtmlJson
();
// 加载广告
appendAdvertisement
();
$
(
function
(){
setToken
();
...
...
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