tijian_tieying/web/dccdc/Views/InfectionWX/Editor.cshtml
2025-02-20 12:14:39 +08:00

51 lines
1.7 KiB
Plaintext

@{
ViewBag.Title = "微信群发素材维护";
}
@model dccdc.Models.SystemParmsModel
<input type="hidden" id="id" name="id" value="@Model.id" />
@Html.HiddenFor(m => m.parm_name)
<table class="t1" style="width:100%">
<tr>
<td class="ltd" style="width:120px">标题:</td>
<td><input id="title" value="@Model.Parm_remarks" /></td>
</tr>
<tr>
<td class="ltd">内容:</td>
<td>
<script type="text/plain" id="myEditor">
@if (Model != null)
{
var h = new HtmlString(Model.Parm_value);
@h;
}
</script>
</td>
</tr>
<tr>
<td></td>
<td class="rtd"><input type="button" id="save" value="保存" class="l-button" /></td>
</tr>
</table>
@section scripts{
<script type="text/javascript" src="@Url.Content("~/ueditor/ueditor.config.js")"></script>
<script type="text/javascript" src="@Url.Content("~/ueditor/ueditor.all.js")"></script>
<script type="text/javascript">
var editor;
editor = UE.getEditor("myEditor", { autoHeightEnabled: false, initialFrameHeight: 400, initialFrameWidth: 680 });
$(function () {
$("#save").bind("click", function () {
$.ajax("@Url.Action("SaveWeiXinNR")", {
type: "post", dataType: "json", data: {
id: $("#id").val(),
parm_name: $("#parm_name").val(), Parm_value: editor.getContent()
}, success: function (data) {
$.ligerDialog.alert(data.Message);
}
});
});
});
</script>
}