|
|
@ -1233,15 +1233,51 @@ $(document).bind('ajaxError', function(event, xhr, settings) {
|
|
|
|
|
|
|
|
|
|
|
|
//工程认证各个页面的查看详情弹层
|
|
|
|
//工程认证各个页面的查看详情弹层
|
|
|
|
function elasticLayer(forumId){
|
|
|
|
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='<div class="layerContent"><div class="educontent">' +
|
|
|
|
var html='<div class="layerContent"><div class="educontent">' +
|
|
|
|
'<p class="clearfix pt25 pb25 color-grey-3 bor-bottom-greyE"><span class="fl font-24">工程教育专业认证【培养目标】</span>' +
|
|
|
|
'<p class="clearfix pt25 pb25 color-grey-3 bor-bottom-greyE"><span class="fl font-24">'+ subject +'</span>' +
|
|
|
|
'<a href="javascript:void(0)" onclick="removeElasticLayer();" class="fr font-16 mt5">返回</a></p>' +
|
|
|
|
'<a href="javascript:void(0)" onclick="removeElasticLayer();" class="fr font-16 mt5">返回</a></p>' +
|
|
|
|
'</div></div>'
|
|
|
|
'<div id="MDContent"><textarea style="display:none">'
|
|
|
|
|
|
|
|
+ content +
|
|
|
|
|
|
|
|
'</textarea></div>'
|
|
|
|
|
|
|
|
|
|
|
|
$(".newMain").after(html).hide();
|
|
|
|
$(".newMain").after(html).hide();
|
|
|
|
document.body.addEventListener('touchmove',bodyScroll,false);
|
|
|
|
|
|
|
|
$('body').css({'position':'fixed',"width":"100%"});
|
|
|
|
editormd.markdownToHTML("MDContent", {
|
|
|
|
|
|
|
|
htmlDecode: "style,script,iframe", // you can filter tags decode
|
|
|
|
|
|
|
|
taskList: true,
|
|
|
|
|
|
|
|
tex: true, // 默认不解析
|
|
|
|
|
|
|
|
flowChart: true, // 默认不解析
|
|
|
|
|
|
|
|
sequenceDiagram: true // 默认不解析
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function removeElasticLayer(){
|
|
|
|
function removeElasticLayer(){
|
|
|
|
$(".layerContent").remove();
|
|
|
|
$(".layerContent").hide();
|
|
|
|
$(".newMain").show();
|
|
|
|
$(".newMain").show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|