Compare commits

...

2 Commits

Author SHA1 Message Date
kuang.yife 9fc1a7c491 fix 2024-08-20 18:10:21 +08:00
kuang.yife 05a454112e fix 2024-08-20 17:00:16 +08:00
2 changed files with 8 additions and 2 deletions

View File

@ -142,10 +142,16 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var content = tinymce.get('mytextarea').getContent(); var content = tinymce.get('mytextarea').getContent();
console.log("content===" + content);
console.log("encode content===" + encodeURIComponent(content));
console.log("结尾: " + $('#form-detail-edit').serialize())
console.log($('#form-detail-edit').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag + "&headStatus=" + headStatus + "&imgStatus=" + imgStatus)
var detailTag = $.form.selectSelects("detailTags"); var detailTag = $.form.selectSelects("detailTags");
var headStatus = $("input[id='headStatus']").is(':checked') === true ? 0 : 1; var headStatus = $("input[id='headStatus']").is(':checked') === true ? 0 : 1;
var imgStatus = $("input[id='imgStatus']").is(':checked') === true ? 0 : 1; var imgStatus = $("input[id='imgStatus']").is(':checked') === true ? 0 : 1;
$.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content) + "&detailTag=" + detailTag + "&headStatus=" + headStatus + "&imgStatus=" + imgStatus); var data = $('#form-detail-edit').serialize();
data = data.replace('&content=','');
$.operate.save(prefix + "/edit", data + "&content=" + encodeURIComponent(content) + "&detailTag=" + detailTag + "&headStatus=" + headStatus + "&imgStatus=" + imgStatus);
} }
} }

View File

@ -147,7 +147,7 @@
<if test="itemId != null">#{itemId},</if> <if test="itemId != null">#{itemId},</if>
<if test="readCount != null">read_count = #{readCount},</if> <if test="readCount != null">read_count = #{readCount},</if>
<if test="transmitCount != null">transmit_count = #{transmitCount},</if> <if test="transmitCount != null">transmit_count = #{transmitCount},</if>
<if test="content != null and content != ''">content = #{content},</if> <if test="content != null">content = #{content},</if>
<if test="address != null and address != ''">address = #{address},</if> <if test="address != null and address != ''">address = #{address},</if>
<if test="title != null and title != ''">title = #{title},</if> <if test="title != null and title != ''">title = #{title},</if>
<if test="type != null and type != ''">type = #{type},</if> <if test="type != null and type != ''">type = #{type},</if>