利用$.ajax调用后台
_this.viewSelectionMethod = function(id) {
layui.use(['form','layer'], function() {
var layer = layui.layer;
var index = layer.open({
type: 1,
title: "评优办法",
skin: 'modal_skin',
area: ['50%', '80%'], // 宽度
maxmin: true,
btnAlign: 'c',
btn: ['关闭'],
content: $('#viewSelectionMethod'),
success: function (index, layero) {
$.ajax({
url: '../innovationGoal/findInnovationGoalById',
data:{id:id},
success: function (res) {
var data=res.data;
var centent = data.selectionMethod;
var html = " <textarea name='editor2' id='editor2'style='min-height: 150px;' style='overflow-y:hidden;' align='center'>" + centent + "</textarea>";
$("#selectionMethodContent").html(html);
CKEDITOR.replace("editor2", {height: 500});
CKEDITOR.config.toolbarStartupExpanded = true;
CKEDITOR.config.toolbarCanCollapse = true;
CKEDITOR.config.readOnly = false;
},
end: function () {
layer.close(index);
}
})
}
});
});
}
利用$.ajax调用后台
最新推荐文章于 2024-08-22 11:02:48 发布