From 6945a74fd5e1c4633f4a2ee1567ffa04695a3911 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sun, 21 Jul 2024 10:33:55 +0800 Subject: [PATCH] fix --- .../impl/PublicUserRecordAppServiceImpl.java | 4 +- .../templates/system/playlet/detail/add.html | 96 ++++++++++--------- .../system/playlet/detail/detail.html | 6 +- .../templates/system/playlet/detail/edit.html | 48 +++++----- 4 files changed, 80 insertions(+), 74 deletions(-) diff --git a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java index e5624f0..e2bd32d 100644 --- a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java +++ b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java @@ -28,7 +28,9 @@ public class PublicUserRecordAppServiceImpl implements PublicUserRecordAppServic if(playletPublicDetail.getReadCount() == null){ playletPublicDetail.setReadCount(1L); }else { - playletPublicDetail.setReadCount(playletPublicDetail.getReadCount() + 1); + // 实时统计阅读数 + long count = iPublicUserRecordService.lambdaQuery().eq(PublicUserRecord::getRemark, userRecord.getRemark()).count(); + playletPublicDetail.setReadCount(count); } iPlayletPublicDetailService.updateById(playletPublicDetail); } diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html index 3d6f451..0021028 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html @@ -11,14 +11,14 @@
- - + +
- -
+ +
- -
+ +
- -
+ +
@@ -55,8 +55,8 @@
- -
+ +
@@ -64,8 +64,8 @@
- -
+ +
- -
+ +
@@ -82,20 +82,20 @@
- -
+ +
- -
+ +
- -
+ +
- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -245,7 +245,7 @@ function submitHandler() { if ($.validate.form()) { var content = tinymce.get('mytextarea').getContent(); - $.operate.save(prefix + "/add", $('#form-detail-add').serialize() + content); + $.operate.save(prefix + "/add", $('#form-detail-add').serialize() + encodeURIComponent(content)); } } @@ -317,11 +317,13 @@ language: "zh_CN", //语言类型 content_style: "img {max-width:100%;}", placeholder: '在这里输入文字', + height: 500, branding: false, //tiny技术支持信息是否显示 plugins: ' preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media code codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount autosave', toolbar: 'fullscreen undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | \ styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \ table image media charmap hr pagebreak insertdatetime preview | code selectall searchreplace visualblocks | indent2em lineheight formatpainter axupimgs', + toolbar_mode: 'wrap', paste_data_images: true, //图片是否可粘贴 images_upload_handler: (blobInfo) => { return new Promise(async (resolve, reject) => { diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html index d5c3cf0..8172a09 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html @@ -28,10 +28,10 @@
- + 添加 - + 修改 @@ -148,7 +148,7 @@ actions.push('取消精选 '); } actions.push('微信二维码 '); - actions.push('编辑 '); + actions.push('编辑 '); actions.push('删除'); return actions.join(''); } diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html index 23fc438..330108f 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html @@ -12,8 +12,8 @@
- -
+ +
- -
+ +
- -
+ +
@@ -42,8 +42,8 @@
- -
+ +
@@ -51,8 +51,8 @@
- -
+ +
@@ -62,8 +62,8 @@
- -
+ +
@@ -71,20 +71,20 @@
- -
+ +
- -
+ +
- -
+ +
@@ -116,7 +116,7 @@ function submitHandler() { if ($.validate.form()) { var content = tinymce.get('mytextarea').getContent(); - $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + content); + $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize() + encodeURIComponent(content)); } } @@ -248,11 +248,13 @@ language: "zh_CN", //语言类型 content_style: "img {max-width:100%;}", placeholder: '在这里输入文字', + height: 500, branding: false, //tiny技术支持信息是否显示 plugins: ' preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media code codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount autosave', toolbar: 'fullscreen undo redo restoredraft | cut copy paste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | \ styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \ table image media charmap hr pagebreak insertdatetime preview | code selectall searchreplace visualblocks | indent2em lineheight formatpainter axupimgs', + toolbar_mode: 'wrap', paste_data_images: true, //图片是否可粘贴 images_upload_handler: (blobInfo) => { return new Promise(async (resolve, reject) => {