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
dc8bdf09
Commit
dc8bdf09
authored
Jul 15, 2019
by
txy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'接口添加token'
parent
cb12119d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
187 additions
and
149 deletions
+187
-149
examine.html
showPhotos/examine.html
+9
-149
common.js
showPhotos/js/page/common.js
+3
-0
examine.js
showPhotos/js/page/examine.js
+160
-0
index.js
showPhotos/js/page/index.js
+6
-0
signup.js
showPhotos/js/page/signup.js
+3
-0
user.js
showPhotos/js/page/user.js
+6
-0
No files found.
showPhotos/examine.html
View file @
dc8bdf09
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
<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/examine/bootstrap.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/examine/bootstrap.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/examine/lightbox.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/examine/lightbox.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/dialog.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/dialog.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/page/common.js"
></script>
<!-- <script type="text/javascript" th:inline="javascript">
var currentTime = [[${currentTime}]];
var rules = JSON.parse([[${rules}]]);
var data = JSON.parse([[${data}]]);
var user = JSON.parse([[${user}]]);
var jsSdk = JSON.parse([[${jsSdk}]]);
</script> -->
</head>
</head>
<body>
<body>
...
@@ -53,153 +59,7 @@
...
@@ -53,153 +59,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$
(
document
).
ready
(
function
(){
// 获取个人信息
userTabInfo
();
// 获取活动名称
getActivityTitle
();
});
function
pass
(){
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
,
reviewStatus
:
1
,
userId
:
getQueryString
(
'UserId'
)
}
$
.
ajax
({
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/review-user/'
+
activityCode
,
data
:
params
,
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
$
.
dialog
({
type
:
"alert"
,
contentHtml
:
"<p style='text-align:center;'>操作成功</p>"
,
onClosed
:
function
(){
window
.
location
.
reload
()
}
});
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
});
}
function
refuse
(){
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
,
reviewStatus
:
0
,
userId
:
getQueryString
(
'UserId'
)
}
$
.
ajax
({
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/review-user/'
+
activityCode
,
data
:
params
,
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
$
.
dialog
({
type
:
"alert"
,
contentHtml
:
"<p style='text-align:center;'>操作成功</p>"
,
onClosed
:
function
(){
window
.
location
.
reload
()
}
});
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
});
}
// 个人信息展示
function
userTabInfo
()
{
var
id
=
getQueryString
(
'UserId'
);
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
id
:
id
}
$
.
ajax
({
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
data
:
params
,
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
var
userInfoObj
=
data
.
result
&&
data
.
result
.
records
&&
data
.
result
.
records
[
0
];
$
(
"#userName"
).
text
(
userInfoObj
.
name
);
$
(
"#voteCount"
).
text
(
userInfoObj
.
voteNum
);
$
(
"#userPhone"
).
text
(
userInfoObj
.
userPhone
);
$
(
"#orgName"
).
text
(
userInfoObj
.
orgName
);
$
(
"#enounce"
).
text
(
userInfoObj
.
declaration
);
$
(
"#userImage img"
).
attr
(
"src"
,
userInfoObj
.
imageUrl
);
$
(
"#userImage"
).
attr
(
"href"
,
userInfoObj
.
imageUrl
).
show
();
var
reviewStatus
=
userInfoObj
.
reviewStatus
;
// reviewStatus 0-待审核 1-审核通过 2-审核未通过
if
(
reviewStatus
==
1
||
reviewStatus
==
2
){
$
(
".edit-btn"
).
addClass
(
"hide"
);
if
(
reviewStatus
==
1
){
$
(
".status-msg"
).
addClass
(
"text-success"
).
html
(
"已通过"
);
}
else
if
(
reviewStatus
==
2
){
$
(
".status-msg"
).
addClass
(
"text-danger"
).
html
(
"已驳回"
);
}
}
else
if
(
reviewStatus
==
0
){
$
(
".status-msg"
).
hide
();
$
(
".edit-btn"
).
removeClass
(
"hide"
);
}
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
})
}
// 获取活动名称
function
getActivityTitle
()
{
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
}
$
.
ajax
({
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/settings'
,
data
:
params
,
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
var
title
=
data
.
result
.
settings
.
szText
.
h5Title
;
$
(
'#examineTitle'
).
text
(
title
);
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
})
}
</script>
</body>
</body>
<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/page/common.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/page/examine.js"
></script>
</html>
</html>
showPhotos/js/page/common.js
View file @
dc8bdf09
...
@@ -202,6 +202,9 @@ function getActivityTitle() {
...
@@ -202,6 +202,9 @@ function getActivityTitle() {
type
:
'GET'
,
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/settings'
,
url
:
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/settings'
,
data
:
params
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
var
title
=
data
.
result
.
settings
.
szText
.
h5Title
;
var
title
=
data
.
result
.
settings
.
szText
.
h5Title
;
...
...
showPhotos/js/page/examine.js
0 → 100644
View file @
dc8bdf09
$
(
document
).
ready
(
function
(){
setToken
();
// 获取个人信息
userTabInfo
();
// 获取活动名称
getActivityTitle
();
});
function
pass
(){
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
,
reviewStatus
:
1
,
userId
:
getQueryString
(
'UserId'
)
}
$
.
ajax
({
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/review-user/'
+
activityCode
,
headers
:
{
'x-token'
:
getToken
()
},
data
:
params
,
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
$
.
dialog
({
type
:
"alert"
,
contentHtml
:
"<p style='text-align:center;'>操作成功</p>"
,
onClosed
:
function
(){
window
.
location
.
reload
()
}
});
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
});
}
function
refuse
(){
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
,
reviewStatus
:
0
,
userId
:
getQueryString
(
'UserId'
)
}
$
.
ajax
({
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/review-user/'
+
activityCode
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
$
.
dialog
({
type
:
"alert"
,
contentHtml
:
"<p style='text-align:center;'>操作成功</p>"
,
onClosed
:
function
(){
window
.
location
.
reload
()
}
});
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
});
}
// 个人信息展示
function
userTabInfo
()
{
var
id
=
getQueryString
(
'UserId'
);
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
id
:
id
}
$
.
ajax
({
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
var
userInfoObj
=
data
.
result
&&
data
.
result
.
records
&&
data
.
result
.
records
[
0
];
$
(
"#userName"
).
text
(
userInfoObj
.
name
);
$
(
"#voteCount"
).
text
(
userInfoObj
.
voteNum
);
$
(
"#userPhone"
).
text
(
userInfoObj
.
userPhone
);
$
(
"#orgName"
).
text
(
userInfoObj
.
orgName
);
$
(
"#enounce"
).
text
(
userInfoObj
.
declaration
);
$
(
"#userImage img"
).
attr
(
"src"
,
userInfoObj
.
imageUrl
);
$
(
"#userImage"
).
attr
(
"href"
,
userInfoObj
.
imageUrl
).
show
();
var
reviewStatus
=
userInfoObj
.
reviewStatus
;
// reviewStatus 0-待审核 1-审核通过 2-审核未通过
if
(
reviewStatus
==
1
||
reviewStatus
==
2
){
$
(
".edit-btn"
).
addClass
(
"hide"
);
if
(
reviewStatus
==
1
){
$
(
".status-msg"
).
addClass
(
"text-success"
).
html
(
"已通过"
);
}
else
if
(
reviewStatus
==
2
){
$
(
".status-msg"
).
addClass
(
"text-danger"
).
html
(
"已驳回"
);
}
}
else
if
(
reviewStatus
==
0
){
$
(
".status-msg"
).
hide
();
$
(
".edit-btn"
).
removeClass
(
"hide"
);
}
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
})
}
// 获取活动名称
function
getActivityTitle
()
{
var
activityCode
=
getQueryString
(
'activityCode'
);
var
params
=
{
activityCode
:
activityCode
}
$
.
ajax
({
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/settings'
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
var
title
=
data
.
result
.
settings
.
szText
.
h5Title
;
$
(
'#examineTitle'
).
text
(
title
);
}
},
error
:
function
()
{
$
.
dialog
({
type
:
'tips'
,
autoClose
:
3000
,
infoText
:
'请求超时,请尝试刷新页面!'
});
}
})
}
\ No newline at end of file
showPhotos/js/page/index.js
View file @
dc8bdf09
...
@@ -189,6 +189,9 @@ function getAjaxListSearch(type,page,callback) {
...
@@ -189,6 +189,9 @@ function getAjaxListSearch(type,page,callback) {
type
:
'GET'
,
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
data
:
params
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
if
(
type
==
'player'
||
type
==
'search'
)
{
if
(
type
==
'player'
||
type
==
'search'
)
{
...
@@ -324,6 +327,9 @@ function voteClickFn(){
...
@@ -324,6 +327,9 @@ function voteClickFn(){
type
:
'PUT'
,
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/vote/'
+
activityCode
,
url
:
baseUrl
+
'/ACTIVITY/sz/vote/'
+
activityCode
,
data
:
params
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
$
(
'#act1185354268270 span'
).
text
(
data
.
result
.
voteNumDay
)
$
(
'#act1185354268270 span'
).
text
(
data
.
result
.
voteNumDay
)
...
...
showPhotos/js/page/signup.js
View file @
dc8bdf09
...
@@ -260,6 +260,9 @@ function getOrgNameFn() {
...
@@ -260,6 +260,9 @@ function getOrgNameFn() {
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
baseUrl
+
'/ORG/hospital/community/hospitalInfo/'
+
orgId
,
url
:
baseUrl
+
'/ORG/hospital/community/hospitalInfo/'
+
orgId
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
$
(
'#act11739232574395'
).
val
(
data
.
records
.
orgName
)
$
(
'#act11739232574395'
).
val
(
data
.
records
.
orgName
)
...
...
showPhotos/js/page/user.js
View file @
dc8bdf09
...
@@ -171,6 +171,9 @@ function userTabInfo() {
...
@@ -171,6 +171,9 @@ function userTabInfo() {
type
:
'GET'
,
type
:
'GET'
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
url
:
baseUrl
+
'/ACTIVITY/sz/search/'
+
activityCode
,
data
:
params
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
var
userInfoObj
=
data
.
result
&&
data
.
result
.
records
&&
data
.
result
.
records
[
0
]
var
userInfoObj
=
data
.
result
&&
data
.
result
.
records
&&
data
.
result
.
records
[
0
]
...
@@ -211,6 +214,9 @@ function voteClickFn(){
...
@@ -211,6 +214,9 @@ function voteClickFn(){
type
:
'PUT'
,
type
:
'PUT'
,
url
:
baseUrl
+
'/ACTIVITY/sz/vote/'
+
activityCode
,
url
:
baseUrl
+
'/ACTIVITY/sz/vote/'
+
activityCode
,
data
:
params
,
data
:
params
,
headers
:
{
'x-token'
:
getToken
()
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
gb_vote_loaded
=
false
gb_vote_loaded
=
false
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
...
...
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