From 76484aceb82d808ec332bede336e30b65ccb9c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=81=B0=E7=81=B0?= Date: Sun, 4 May 2025 22:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E3=80=90=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91=EF=BC=9A=E5=95=86=E5=93=81=E7=BB=B4=E6=8A=A4=E5=B0=81?= =?UTF-8?q?=E9=9D=A2=E5=9B=BE=E5=A2=9E=E5=8A=A0=E3=80=90=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E5=88=B0=E5=9B=BE=E9=9B=86=E3=80=91=E7=9A=84=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=8D=95=E5=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9A=84=E5=95=86=E5=93=81=E5=9B=BE=E7=89=87=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E4=B8=8A=E4=BC=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/views/good/goods/create.html | 19 ++++++++++++++++++- .../wwwroot/views/good/goods/edit.html | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html index 34a58284..499187a7 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html @@ -150,10 +150,11 @@
-
+
+

@@ -886,6 +887,22 @@ } }); + //追加到图集 + $('#addToAlbum').click(function () { + var goodImage = $('#goodImage').val(); + if (!!!goodImage) { + layer.msg('请先上传封面图'); + return; + } + imgs.push(goodImage); + $('#imageIds').val(imgs); + var getTpl = image_tpl.innerHTML, view = document.getElementById('upload-more-list'); + laytpl(getTpl).render(imgs, function (html) { + view.innerHTML = html; + }); + layer.msg('追加成功'); + }); + //图集上传 $('#upBtnimageIds').click(function () { cropperImg.cropImg({ diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/edit.html index 6f74499c..6f9c8d41 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/edit.html @@ -146,10 +146,11 @@
-
+
+

@@ -969,6 +970,22 @@ } }); + //追加到图集 + $('#addToAlbum').click(function () { + var goodImage = $('#goodImage').val(); + if (!!!goodImage) { + layer.msg('请先上传封面图'); + return; + } + imgs.push(goodImage); + $('#imageIds').val(imgs); + var getTpl = image_tpl.innerHTML, view = document.getElementById('upload-more-list'); + laytpl(getTpl).render(imgs, function (html) { + view.innerHTML = html; + }); + layer.msg('追加成功'); + }); + //图集上传 $('#upBtnimageIds').click(function () { cropperImg.cropImg({