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
993d7956
Commit
993d7956
authored
Jul 19, 2019
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'添加loading'
parent
48da0c69
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
loading_2.gif
showPhotos/images/loading_2.gif
+0
-0
common.js
showPhotos/js/page/common.js
+27
-1
index.js
showPhotos/js/page/index.js
+14
-1
No files found.
showPhotos/images/loading_2.gif
0 → 100644
View file @
993d7956
3.74 KB
showPhotos/js/page/common.js
View file @
993d7956
...
...
@@ -337,6 +337,21 @@ function getActivityTitle() {
})
}
// 加载loading
function
showLoading
(){
$
.
dialog
({
type
:
'info'
,
infoText
:
'加载中…'
,
infoIcon
:
'https://raw.githubusercontent.com/tinytxy/h5_activity_github/master/showPhotos/images/loading_2.gif'
,
direction
:
''
,
align
:
'center'
});
}
// 关闭loading
function
hideLoading
()
{
$
.
dialog
.
close
();
}
/* ***********************弹出框控制全部逻辑************************** */
// 投票
function
voteClickFn
(
params
,
successCallback
,
errorCallback
){
...
...
@@ -431,9 +446,20 @@ function playerHasVoteDialogBind(){
// 参赛选手投票-无票
function
playerNoVoteDialogBind
(){
//
我要参赛
//
查看排行
$
(
'#html-template-5 .vote-btn-1'
).
off
(
"click"
).
on
(
'click'
,
function
(){
$
(
'#html-template-5'
).
fadeOut
();
var
_url
=
window
.
location
.
href
;
var
indexKey
=
'view/'
+
activityCode
+
'/1'
;
// 当前是首页则触发切换按钮
if
(
_url
.
indexOf
(
indexKey
)
>
-
1
){
$
(
"#act3152823482970"
).
click
();
}
else
{
// 当前非首页则跳转
var
_t
=
getToken
();
var
_addParam
=
'toRanger=1'
transPage
(
'1'
,
activityCode
,
_t
,
_addParam
);
}
});
// 我要拉票
...
...
showPhotos/js/page/index.js
View file @
993d7956
...
...
@@ -202,6 +202,9 @@ function getAjaxListSearch(type,page,callback) {
activityCode
:
activityCode
,
// 活动id
name
:
searchVal
// 搜索字段
}
// 加载loading
showLoading
();
$
.
ajax
({
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
...
...
@@ -229,6 +232,7 @@ function getAjaxListSearch(type,page,callback) {
gb_rank_loaded
=
false
}
}
hideLoading
();
},
error
:
function
()
{
if
(
type
==
'player'
||
type
==
'search'
)
{
...
...
@@ -236,6 +240,7 @@ function getAjaxListSearch(type,page,callback) {
}
else
if
(
type
==
'rank'
)
{
gb_rank_loaded
=
false
}
hideLoading
();
}
})
}
...
...
@@ -339,13 +344,21 @@ function getRangeList(rankListData){
// tab切换
function
tabChange
(){
var
c_typename
=
$
(
this
).
attr
(
"c_typename"
);
// 排行榜
if
(
c_typename
===
'rangerListBtn'
)
{
// 排行榜列表
getAjaxListSearch
(
'rank'
,
1
,
function
(
rankListData
){
getRangeList
(
rankListData
);
$
(
"#user-list"
).
hide
();
$
(
"#range-list"
).
show
();
});
}
else
{
// 参赛选手列表
getAjaxListSearch
(
'player'
,
1
,
function
(
playerListData
){
getPlayerList
(
playerListData
);
$
(
"#user-list"
).
show
();
$
(
"#range-list"
).
hide
();
});
}
}
...
...
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