ec 弹出层

dev_ec
hjm 6 years ago
parent ce9dc71211
commit 98ce08d3c7

@ -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='<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>' +
'</div></div>'
'<div id="MDContent"><textarea style="display:none">'
+ content +
'</textarea></div>'
$(".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();
}

@ -107,7 +107,9 @@
<!-- // <script type="text/javascript" src="https://testbdweb.trustie.net/javascripts/create_kindeditor.js"></script> -->
<script type="text/javascript" src="/js/create_kindeditor.js"></script>
<!-- <script type="text/javascript" src="/js/cm_all.js"></script> -->
<script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script>
<!-- <script type="text/javascript" src="http://localhost:3000/javascripts/educoder/edu_application.js"></script> -->
</body>
</html>

@ -611,7 +611,7 @@ class GraduatesRequirement extends Component {
<p className="font-18 courseSystem"> 毕业要求指标点达成计算 </p>
<p>
<span class="color-grey-9 mr10">系统根据课程体系与毕业要求的支持关系以课程的考核与成绩判定方式一键计算毕业要求的达成度情况</span>
<a href="javascript:void(0)" onClick={() => window.elasticLayer(3530)} class="color-blue">查看详情</a>
<a href="javascript:void(0)" onClick={() => window.elasticLayer(3535)} class="color-blue">查看详情</a>
</p>
</li>

Loading…
Cancel
Save