diff --git a/public/javascripts/educoder/edu_application.js b/public/javascripts/educoder/edu_application.js index 7cce4a21..f1caa2c5 100644 --- a/public/javascripts/educoder/edu_application.js +++ b/public/javascripts/educoder/edu_application.js @@ -1233,15 +1233,51 @@ $(document).bind('ajaxError', function(event, xhr, settings) { //工程认证各个页面的查看详情弹层 function elasticLayer(forumId){ + if (window.__memo) { + doElasticLayer(window.__memo, true) + return; + } + if (!forumId) return; + var url = 'https://www.educoder.net/api/v1/memos/' + forumId + $.ajax({ + url: url, + type: 'get', + success: function(res) { + console.log(res) + doElasticLayer(res.memo) + } + }); + + // document.body.addEventListener('touchmove',bodyScroll,false); + // $('body').css({'position':'fixed',"width":"100%"}); +} +function doElasticLayer(memo, rendered){ + if (rendered) { + $(".layerContent").show(); + $(".newMain").hide(); + return; + } + window.__memo = memo + var content = memo.content + var subject = memo.subject var html='
工程教育专业认证【培养目标】' + + '
'+ subject +'' + '返回
' + - '