From 98ce08d3c7de8fd44e1e64a5c8ac83dae90f0d9e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 24 May 2019 15:26:13 +0800 Subject: [PATCH] =?UTF-8?q?ec=20=E5=BC=B9=E5=87=BA=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascripts/educoder/edu_application.js | 46 +++++++++++++++++-- public/react/public/index.html | 2 + .../GraduatesRequirement.js | 2 +- 3 files changed, 44 insertions(+), 6 deletions(-) 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 +'' + '返回

' + - '
' + '
' + $(".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(){ - $(".layerContent").remove(); + $(".layerContent").hide(); $(".newMain").show(); } diff --git a/public/react/public/index.html b/public/react/public/index.html index 71088e5f..e1f4976e 100644 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -107,7 +107,9 @@ + + diff --git a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js index a62849f1..ba063757 100644 --- a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js +++ b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js @@ -611,7 +611,7 @@ class GraduatesRequirement extends Component {

毕业要求指标点达成计算

系统根据课程体系与毕业要求的支持关系,以课程的考核与成绩判定方式,一键计算毕业要求的达成度情况 - window.elasticLayer(3530)} class="color-blue">查看详情 + window.elasticLayer(3535)} class="color-blue">查看详情