Commit 58039a72 by 胡畅

fix bug

parent ae487d0b
...@@ -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> -->
......
...@@ -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,6 +193,36 @@ function appendAttentionDialog() { ...@@ -193,6 +193,36 @@ function appendAttentionDialog() {
} }
} }
if(orgQrCode == '') {
var baseurlCode = orgId ? (baseUrl + '/ACTIVITY/' + activityCode + '/qr-code-url?orgId=' + orgId) : (baseUrl + '/ACTIVITY/' + activityCode + '/qr-code-url')
$.ajax({
type: 'GET',
url: baseurlCode,
headers: {
'x-token': getToken()
},
success: function(data) {
if(data.status == 200) {
orgQrCode = data.result.qrCodeUrl
callback && callback(orgQrCode)
}
},
error: function(data) {
$.dialog({
type : 'tips',
autoClose : 3000,
infoText : data.responseJSON.message
});
}
})
}else {
callback && callback(orgQrCode)
}
}
// 关注弹出框
function appendAttentionDialog() {
showQrcode(function(orgQrCode){
var str = '<section id="html-container-attention" style="display: none;">'+ var str = '<section id="html-container-attention" style="display: none;">'+
'<div>'+ '<div>'+
'<div class="c-modal-wrap">'+ '<div class="c-modal-wrap">'+
...@@ -220,6 +250,7 @@ function appendAttentionDialog() { ...@@ -220,6 +250,7 @@ function appendAttentionDialog() {
'</section>'; '</section>';
$('body').prepend(str); $('body').prepend(str);
// 事件绑定 // 事件绑定
$("#html-container-attention .modal-close").off("click").on("click", function(){ $("#html-container-attention .modal-close").off("click").on("click", function(){
$("#html-container-attention").fadeOut(); $("#html-container-attention").fadeOut();
...@@ -237,6 +268,9 @@ function appendAttentionDialog() { ...@@ -237,6 +268,9 @@ function appendAttentionDialog() {
// $(document).scrollTop(0); // $(document).scrollTop(0);
}); });
} }
})
} }
// 显示强关弹出框 // 显示强关弹出框
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment