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
6c15dc57
Commit
6c15dc57
authored
Jul 10, 2019
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'页面调整'
parent
77b940bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
29 deletions
+68
-29
index.html
showPhotos/index.html
+35
-21
index_data.js
showPhotos/index_data.js
+33
-8
No files found.
showPhotos/index.html
View file @
6c15dc57
...
@@ -19,9 +19,7 @@
...
@@ -19,9 +19,7 @@
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/removeAttr.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/removeAttr.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/autoFontsize.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://space-api.check.icaremgt.com/ACTIVITY/gitlab-static?url=http://gitlab.icaremgt.com/tanxinyu/h5_activity/raw/master/showPhotos/js/autoFontsize.min.js"
></script>
<script
type=
"text/javascript"
src=
"http://res.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script
type=
"text/javascript"
src=
"http://res.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script
type=
"text/javascript"
th:inline=
"javascript"
>
<script
type=
"text/javascript"
src=
"./index_data.js"
></script>
// var data = [[${test}]];
</script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
wx
.
config
({
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
...
@@ -46,16 +44,13 @@
...
@@ -46,16 +44,13 @@
var
xtoken
=
"123123"
;
var
xtoken
=
"123123"
;
var
activityCode
=
"hdtbsztest1"
;
var
activityCode
=
"hdtbsztest1"
;
var
pageNumber
=
"1"
;
var
pageNumber
=
"1"
;
var
baseUrl
=
"http://space-api.check.icaremgt.com"
;
var
baseUrl
=
"http
s
://space-api.check.icaremgt.com"
;
// 微信鉴权
// 微信鉴权
$
(
'body'
).
prepend
(
json2html
(
indexObj
));
wxpermission
();
$
(
'body'
).
prepend
(
json2html
(
shareModal
));
// 加载html结构
$
(
'body'
).
prepend
(
json2html
(
voteModal
));
loadHtmlJson
();
// $('body').prepend(json2html(voteEmptyModal));
$
(
'#html-template-4'
).
addClass
(
'global-none'
)
$
(
'#html-template-5'
).
addClass
(
'global-none'
)
$
(
'#html-template-8'
).
addClass
(
'global-none'
)
var
gb_player_loaded
=
false
var
gb_player_loaded
=
false
var
gb_rank_loaded
=
false
var
gb_rank_loaded
=
false
var
gb_token
=
'admin.725.fbbd4294a56047e7926b7ebab088ade4'
var
gb_token
=
'admin.725.fbbd4294a56047e7926b7ebab088ade4'
...
@@ -66,21 +61,22 @@
...
@@ -66,21 +61,22 @@
getQueryString
(
''
);
// 根据query参数控制排行榜显示
getQueryString
(
''
);
// 根据query参数控制排行榜显示
removeAttr
();
removeAttr
();
getAjaxListSearch
(
'player'
,
1
,
function
(
playerListData
){
getAjaxListSearch
(
'player'
,
1
,
function
(
playerListData
){
getPlayerList
(
playerListData
)
getPlayerList
(
playerListData
)
;
})
// 参赛选手列表
})
;
// 参赛选手列表
getAjaxListSearch
(
'rank'
,
1
,
function
(
rankListData
){
getAjaxListSearch
(
'rank'
,
1
,
function
(
rankListData
){
getRangeList
(
rankListData
)
getRangeList
(
rankListData
)
;
})
// 排行榜列表
})
;
// 排行榜列表
});
});
// 微信鉴权
// 微信鉴权
function
wxpermission
()
{
function
wxpermission
()
{
var
settings
=
rules
.
settings
;
wx
.
ready
(
function
(){
wx
.
ready
(
function
(){
var
shareData
=
{
var
shareData
=
{
title
:
""
,
title
:
settings
.
szText
.
shareTitile
,
imgUrl
:
""
,
imgUrl
:
settings
.
szText
.
shareIcon
,
desc
:
""
,
desc
:
settings
.
szText
.
shareSubtitle
,
link
:
""
link
:
window
.
location
.
href
}
}
/**
/**
*分享给朋友
*分享给朋友
...
@@ -189,12 +185,13 @@
...
@@ -189,12 +185,13 @@
})
})
// 我要拉票
// 我要拉票
$
(
'#act2172989331265,#act5161551593534'
).
off
(
'click'
).
on
(
'click'
,
function
(){
$
(
'#act2172989331265,#act5161551593534'
).
off
(
'click'
).
on
(
'click'
,
function
(){
$
(
'#html-template-8'
).
fadeIn
()
$
(
"#html-template-4"
).
hide
();
$
(
'#html-template-8'
).
fadeIn
();
})
})
// 查看排行
// 查看排行
$
(
'#act5161526928645'
).
off
(
'click'
).
on
(
'click'
,
function
(){
$
(
'#act5161526928645'
).
off
(
'click'
).
on
(
'click'
,
function
(){
$
(
'#html-template-5'
).
fadeOut
()
$
(
'#html-template-5'
).
fadeOut
()
;
$
(
"#user-list"
).
hide
();
$
(
"#user-list"
).
hide
();
$
(
"#range-list"
).
show
();
$
(
"#range-list"
).
show
();
})
})
...
@@ -419,6 +416,23 @@
...
@@ -419,6 +416,23 @@
return
null
;
return
null
;
}
}
// 加载HTML结构
function
loadHtmlJson
()
{
// 页面结构注入
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
.
htmlJson
)));
var
_relationship
=
data
.
relationship
.
childs
;
var
htmlJson
=
""
;
// 依赖组件注入
for
(
var
i
=
0
;
i
<
_relationship
.
length
;
i
++
){
var
_page
=
_relationship
[
i
].
page
;
$
(
'body'
).
prepend
(
json2html
(
JSON
.
parse
(
data
[
_page
].
htmlJson
)));
// 隐藏添加元素
$
(
'#html-template-'
+
_relationship
[
i
].
pageNumber
).
addClass
(
'global-none'
);
}
}
// 页面跳转
// 页面跳转
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
){
function
transPage
(
_pageNumber
,
_activityCode
,
_token
,
_urlParam
){
var
url
=
''
var
url
=
''
...
...
showPhotos/index_data.js
View file @
6c15dc57
...
@@ -75,20 +75,45 @@ var rules = {
...
@@ -75,20 +75,45 @@ var rules = {
"qrCodeMessage"
:
""
,
"qrCodeMessage"
:
""
,
"kgAcActivityTypeId"
:
"1"
"kgAcActivityTypeId"
:
"1"
},
},
"acActivityOrgs"
:
[],
"acActivityOrgs"
:
[
{
"id"
:
"1"
,
"kgAcActivityId"
:
"5"
,
"orgId"
:
"967"
,
"qrCodeUrl"
:
"http://qnfile.icareyou.net/jpg119_4_11_18_22_43_1557570163811zSy.jpg"
,
"createTime"
:
"2019-07-10 15:27:51"
,
"updateTime"
:
"2019-07-10 15:27:51"
},
{
"id"
:
"2"
,
"kgAcActivityId"
:
"5"
,
"orgId"
:
"1108"
,
"qrCodeUrl"
:
"http://qnfile.icareyou.net/jpg119_4_11_18_22_43_1557570163811zSy.jpg"
,
"createTime"
:
"2019-07-10 15:27:51"
,
"updateTime"
:
"2019-07-10 15:27:51"
},
{
"id"
:
"3"
,
"kgAcActivityId"
:
"5"
,
"orgId"
:
"1103"
,
"qrCodeUrl"
:
"http://qnfile.icareyou.net/jpg119_4_11_18_22_43_1557570163811zSy.jpg"
,
"createTime"
:
"2019-07-10 15:27:51"
,
"updateTime"
:
"2019-07-10 15:27:51"
}
],
"acActivityRegistrationAudit"
:
""
,
"acActivityRegistrationAudit"
:
""
,
"settings"
:
{
"settings"
:
{
"szText"
:
{
"szText"
:
{
"id"
:
"7"
,
"id"
:
"7"
,
"kgAcActivityId"
:
"5"
,
"kgAcActivityId"
:
"5"
,
"shareTitile"
:
"
share title
"
,
"shareTitile"
:
"
分享晒照活动标题
"
,
"shareSubtitle"
:
"
share cotentn
"
,
"shareSubtitle"
:
"
分享晒照活动......
"
,
"shareIcon"
:
""
,
"shareIcon"
:
"
http://qnfile.icareyou.net/4082d7c2d61940b58fcdbeb45225da831562748231795.jpg
"
,
"pullTitile"
:
"
sha
"
,
"pullTitile"
:
"
请为我拉票
"
,
"pullSubtitle"
:
"
hhhh
"
,
"pullSubtitle"
:
"
我是xxx请为我拉票
"
,
"h5Title"
:
""
,
"h5Title"
:
""
,
"createTime"
:
"2019-06-23 03:04:27"
,
"createTime"
:
"2019-06-23 03:04:27"
,
"updateTime"
:
"2019-07-
05 16:29:38
"
"updateTime"
:
"2019-07-
10 16:45:46
"
},
},
"szRule"
:
{
"szRule"
:
{
"id"
:
"9"
,
"id"
:
"9"
,
...
@@ -100,7 +125,7 @@ var rules = {
...
@@ -100,7 +125,7 @@ var rules = {
"voteNumDay"
:
50
,
"voteNumDay"
:
50
,
"voteNumPeople"
:
9999
,
"voteNumPeople"
:
9999
,
"createTime"
:
"2019-06-23 03:04:21"
,
"createTime"
:
"2019-06-23 03:04:21"
,
"updateTime"
:
"2019-07-
06 03:25:17
"
"updateTime"
:
"2019-07-
10 16:45:46
"
}
}
}
}
}
}
...
...
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