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
256bc967
Commit
256bc967
authored
Jul 11, 2019
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'首页强制关注弹出框'
parent
ce57485a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
common.js
showPhotos/js/page/common.js
+8
-2
index.js
showPhotos/js/page/index.js
+37
-0
No files found.
showPhotos/js/page/common.js
View file @
256bc967
...
...
@@ -115,13 +115,18 @@ var str = '<section id="html-container-attention" style="display: none;">'+
$
(
'body'
).
prepend
(
str
);
// 事件绑定
$
(
"#html-container-attention .modal-close"
).
off
(
"click"
).
on
(
"click"
,
function
(){
$
(
"#html-container-attention"
).
hide
();
$
(
"#html-container-attention"
).
fadeOut
();
});
// 未关注过默认显示弹出框
if
(
!
user
.
attention
){
$
(
"#html-container-attention"
).
show
();
$
(
"#html-container-attention"
).
fadeIn
();
}
}
// 显示强关弹出框
function
showAttentionDialog
()
{
$
(
"#html-container-attention"
).
fadeIn
();
}
appendAttentionDialog
();
\ No newline at end of file
showPhotos/js/page/index.js
View file @
256bc967
...
...
@@ -133,7 +133,36 @@ function btnBindClick() {
// 报名按钮
$
(
"#act31527459124456"
).
off
(
"click"
).
on
(
"click"
,
function
(){
var
_t
=
getToken
();
// 未关注
if
(
!
user
.
attention
){
// 强关弹出框
showAttentionDialog
();
}
else
{
// 已报名
if
(
user
.
reviewStatus
!==
''
)
{
switch
(
user
.
reviewStatus
)
{
// 0-待审核
case
0
:
alert
(
'您的报名信息正在审核中...'
);
break
;
// 1-审核通过
case
1
:
alert
(
'您当前已通过报名,请到个人主页去拉票!'
);
break
;
// 2-审核未通过
case
2
:
alert
(
'审核未通过!'
);
transPage
(
'2'
,
activityCode
,
_t
);
break
;
default
:
break
;
}
}
else
{
// 未报名
transPage
(
'2'
,
activityCode
,
_t
);
}
}
});
// 继续投票
...
...
@@ -348,6 +377,14 @@ function tabChange(){
// 投票按钮
function
voteClickFn
(){
// 未关注
if
(
!
user
.
attention
){
// 强关弹出框
showAttentionDialog
();
return
;
}
var
id
=
$
(
this
).
attr
(
'id'
);
var
_this
=
$
(
this
)
var
params
=
{
...
...
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