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
58039a72
Commit
58039a72
authored
Aug 28, 2019
by
胡畅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
ae487d0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
41 deletions
+76
-41
index.html
showPhotos/index.html
+2
-1
common.js
showPhotos/js/page/common.js
+74
-40
No files found.
showPhotos/index.html
View file @
58039a72
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
<!-- th:text="${page}" -->
<!-- th:text="${page}" -->
<body>
<body>
</body>
</body>
<script
type=
"text/javascript"
src=
"https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/common.js"
></script>
<!-- <script type="text/javascript" src="https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/common.js"></script> -->
<script
type=
"text/javascript"
src=
"js/page/common.js"
></script>
<script
type=
"text/javascript"
src=
"https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/share.js"
></script>
<script
type=
"text/javascript"
src=
"https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/share.js"
></script>
<script
type=
"text/javascript"
src=
"https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/index.js"
></script>
<script
type=
"text/javascript"
src=
"https://raw.githack.com/tinytxy/h5_activity_github/master/showPhotos/js/page/index.js"
></script>
<!-- <script type="text/javascript" src="js/page/index.js"></script> -->
<!-- <script type="text/javascript" src="js/page/index.js"></script> -->
...
...
showPhotos/js/page/common.js
View file @
58039a72
...
@@ -180,9 +180,9 @@ function getOrgNameFn(callback) {
...
@@ -180,9 +180,9 @@ function getOrgNameFn(callback) {
})
})
}
}
// 关注弹出框
function
showQrcode
(
callback
)
{
function
appendAttentionDialog
()
{
var
orgId
=
getQueryString
(
"orgId"
);
var
orgId
=
getQueryString
(
"orgId"
);
var
activityCode
=
getQueryString
(
"activityCode"
);
var
orgQrCode
=
''
;
var
orgQrCode
=
''
;
for
(
var
k
=
0
;
k
<
rules
.
acActivityOrgs
.
length
;
k
++
){
for
(
var
k
=
0
;
k
<
rules
.
acActivityOrgs
.
length
;
k
++
){
...
@@ -193,50 +193,84 @@ function appendAttentionDialog() {
...
@@ -193,50 +193,84 @@ function appendAttentionDialog() {
}
}
}
}
var
str
=
'<section id="html-container-attention" style="display: none;">'
+
if
(
orgQrCode
==
''
)
{
'<div>'
+
var
baseurlCode
=
orgId
?
(
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/qr-code-url?orgId='
+
orgId
)
:
(
baseUrl
+
'/ACTIVITY/'
+
activityCode
+
'/qr-code-url'
)
'<div class="c-modal-wrap">'
+
$
.
ajax
({
'<div class="mshe-mask"></div> '
+
type
:
'GET'
,
'<div class="c-modal">'
+
url
:
baseurlCode
,
'<div class="modal-dialog">'
+
headers
:
{
'<div c_type="dialog" c_typename="dialog_playerVote1" class="modal-content" style="background: rgb(255, 255, 255);">'
+
'x-token'
:
getToken
()
'<div class="modal-header">'
+
},
'<img src="http://qnfile.icareyou.net/363a344aa7424d219a5fc86eff7265751561343712294.jpg" class="header-pic">'
+
success
:
function
(
data
)
{
'</div>'
+
if
(
data
.
status
==
200
)
{
'<div class="modal-body">'
+
orgQrCode
=
data
.
result
.
qrCodeUrl
'<p class="struct">长按关注后继续活动</p>'
+
callback
&&
callback
(
orgQrCode
)
'<div>'
+
}
'<img src="'
+
orgQrCode
+
'" alt="" style="width: 100%;">'
+
},
'</div>'
+
error
:
function
(
data
)
{
'</div>'
+
$
.
dialog
({
'<div class="modal-close">'
+
type
:
'tips'
,
'<img src="http://qnfile.icareyou.net/ddae57885c424abdb13d37c78038c6a01561343787282.jpg">'
+
autoClose
:
3000
,
'</div>'
+
infoText
:
data
.
responseJSON
.
message
'</div>'
+
});
'</div>'
+
}
'</div>'
+
})
}
else
{
callback
&&
callback
(
orgQrCode
)
}
}
// 关注弹出框
function
appendAttentionDialog
()
{
showQrcode
(
function
(
orgQrCode
){
var
str
=
'<section id="html-container-attention" style="display: none;">'
+
'<div>'
+
'<div class="c-modal-wrap">'
+
'<div class="mshe-mask"></div> '
+
'<div class="c-modal">'
+
'<div class="modal-dialog">'
+
'<div c_type="dialog" c_typename="dialog_playerVote1" class="modal-content" style="background: rgb(255, 255, 255);">'
+
'<div class="modal-header">'
+
'<img src="http://qnfile.icareyou.net/363a344aa7424d219a5fc86eff7265751561343712294.jpg" class="header-pic">'
+
'</div>'
+
'<div class="modal-body">'
+
'<p class="struct">长按关注后继续活动</p>'
+
'<div>'
+
'<img src="'
+
orgQrCode
+
'" alt="" style="width: 100%;">'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</section>'
;
'<div class="modal-close">'
+
'<img src="http://qnfile.icareyou.net/ddae57885c424abdb13d37c78038c6a01561343787282.jpg">'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</section>'
;
$
(
'body'
).
prepend
(
str
);
$
(
'body'
).
prepend
(
str
);
// 事件绑定
$
(
"#html-container-attention .modal-close"
).
off
(
"click"
).
on
(
"click"
,
function
(){
$
(
"#html-container-attention"
).
fadeOut
();
});
// 获取机构名称
// 事件绑定
getOrgNameFn
(
function
(
data
){
$
(
"#html-container-attention .modal-close"
).
off
(
"click"
).
on
(
"click"
,
function
(){
var
orgName
=
'长按关注'
+
data
.
records
.
orgName
+
'后继续活动'
;
$
(
"#html-container-attention"
).
fadeOut
();
$
(
'#html-container-attention .modal-body .struct'
).
text
(
orgName
);
});
});
// 未关注过默认显示弹出框
// 获取机构名称
if
(
!
user
.
attention
){
getOrgNameFn
(
function
(
data
){
$
(
"#html-container-attention"
).
fadeIn
(
'normal'
,
function
()
{
var
orgName
=
'长按关注'
+
data
.
records
.
orgName
+
'后继续活动'
;
// $(document).scrollTop(0
);
$
(
'#html-container-attention .modal-body .struct'
).
text
(
orgName
);
});
});
}
// 未关注过默认显示弹出框
if
(
!
user
.
attention
){
$
(
"#html-container-attention"
).
fadeIn
(
'normal'
,
function
()
{
// $(document).scrollTop(0);
});
}
})
}
}
// 显示强关弹出框
// 显示强关弹出框
...
...
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