From 6b65aceb457f8ab1cafa814166807311ac42824a Mon Sep 17 00:00:00 2001 From: JianWeie Date: Fri, 15 Oct 2021 13:39:10 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=B0=E5=9D=80=E4=BF=A1=E6=81=AF=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs b/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs index b1f49f9..02edc97 100644 --- a/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs +++ b/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs @@ -85,7 +85,7 @@ namespace CoreCms.Net.Repository } //事物处理过程结束 - var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync(); + var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync(); jm.code = bl ? 0 : 1; jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure; -- Gitee From 7e4b858a913b3642ead946f5618ed503319df8ad Mon Sep 17 00:00:00 2001 From: JianWeie Date: Fri, 15 Oct 2021 16:50:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9cropperImg.js=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj index 78fed1c..7c65b2e 100644 --- a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj +++ b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj @@ -189,7 +189,6 @@ - -- Gitee From abbc98a6a8eab12671ee1686828017bdfc25fc8b Mon Sep 17 00:00:00 2001 From: JianWeie Date: Fri, 15 Oct 2021 16:51:53 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=A0=E9=99=A4cropperImg.js=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/layuiAdmin/controller/CropperImg.js | 364 ------------------ 1 file changed, 364 deletions(-) delete mode 100644 CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/CropperImg.js diff --git a/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/CropperImg.js b/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/CropperImg.js deleted file mode 100644 index 4fee5bd..0000000 --- a/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/CropperImg.js +++ /dev/null @@ -1,364 +0,0 @@ -layui.define(["layer", "setter"], - function (f) { - var h = layui.jquery; - var k = layui.layer; - var d = layui.setter; - var n = { version: "1.1.0", layerData: {} }; - n.open = function (s) { - if (s.content && s.type === 2) { - s.url = undefined - } - if (s.url && (s.type === 2 || s.type === undefined)) { - s.type = 1 - } - if (s.area === undefined) { - s.area = s.type === 2 ? ["360px", "300px"] : "360px" - } - if (s.offset === undefined) { - s.offset = "70px" - } - if (s.shade === undefined) { - s.shade = 0.1 - } - if (s.fixed === undefined) { - s.fixed = false - } - if (s.resize === undefined) { - s.resize = false - } - if (s.skin === undefined) { - //s.skin = "layui-layer-admin" - s.skin = "layui-layer-admin" - } - var q = s.end; - s.end = function () { - k.closeAll("tips"); - q && q() - }; - if (s.url) { - var r = s.success; - s.success = function (t, u) { - h(t).data("tpl", s.tpl || ""); - n.reloadLayer(u, s.url, r) - } - } else { - if (s.tpl && s.content) { - s.content = n.util.tpl(s.content, s.data, d.tplOpen, d.tplClose) - } - } - var i = k.open(s); - if (s.data) { - n.layerData["d" + i] = s.data - } - return i - }; - n.closeDialog = function (i) { - if (i) { - k.close(n.getLayerIndex(i)) - } else { - parent.layer.close(parent.layer.getFrameIndex(window.name)) - } - }; - n.getLayerIndex = function (i) { - if (!i) { - return parent.layer.getFrameIndex(window.name) - } - var q = h(i).parents(".layui-layer").first().attr("id"); - if (q && q.length >= 11) { - return q.substring(11) - } - }; - n.cropImg = function (s) { - var q = "image/jpeg"; - var x = s.aspectRatio; - var y = s.imgSrc ? s.imgSrc == 'no' ? null : s.imgSrc : "/static/images/common/empty-banner.png"; - - //var y = s.imgSrc == 'no' ? null : s.imgSrc; - - var v = s.imgType; - var t = s.onCrop; - var u = s.limitSize; - var w = s.acceptMime; - var r = s.exts; - var i = s.title; - if (x === undefined) { - x = 1 - } - if (i === undefined) { - i = "裁剪图片" - } - if (v) { - q = v - } - layui.use(["Cropper", "upload"], - function () { - var A = layui.Cropper, z = layui.upload; - - function B() { - var E, F = h("#ew-crop-img"); - var G = { - elem: "#ew-crop-img-upload", - auto: false, - drag: false, - choose: function (H) { - H.preview(function (J, K, I) { - console.log("xuanze"); - q = K.type; - F.attr("src", I); - if (!y || !E) { - y = I; - B() - } else { - E.destroy(); - E = new A(F[0], D) - } - }) - } - }; - if (u !== undefined) { - G.size = u - } - if (w !== undefined) { - G.acceptMime = w - } - if (r !== undefined) { - G.exts = r - } - z.render(G); - if (!y) { - return h("#ew-crop-img-upload").trigger("click") - } - var D = { - aspectRatio: x, preview: ".ew-crop-img-preview", - ready: function (e) { - //console.log("初始准备" + e.type); - }, - cropstart: function (e) { - //console.log(e.type, e.detail.action); - }, - cropmove: function (e) { - //console.log(e.type, e.detail.action); - }, - cropend: function (e) { - //console.log(e.type, e.detail.action); - }, - crop: function (e) { - var data = e.detail; - - var dataX = document.getElementById('dataX'); - var dataY = document.getElementById('dataY'); - var dataHeight = document.getElementById('dataHeight'); - var dataWidth = document.getElementById('dataWidth'); - var dataRotate = document.getElementById('dataRotate'); - var dataScaleX = document.getElementById('dataScaleX'); - var dataScaleY = document.getElementById('dataScaleY'); - dataX.value = Math.round(data.x); - dataY.value = Math.round(data.y); - dataHeight.value = Math.round(data.height); - dataWidth.value = Math.round(data.width); - dataRotate.value = typeof data.rotate !== 'undefined' ? data.rotate : ''; - dataScaleX.value = typeof data.scaleX !== 'undefined' ? data.scaleX : ''; - dataScaleY.value = typeof data.scaleY !== 'undefined' ? data.scaleY : ''; - }, - zoom: function (e) { - console.log(e.type, e.detail.ratio); - } - }; - E = new A(F[0], D); - h(".ew-crop-tool").on("click", - "[data-method]", - function () { - var I = h(this).data(), J, H; - if (!E || !I.method) { - return - } - I = h.extend({}, I); - J = E.cropped; - switch (I.method) { - case "rotate": - if (J && D.viewMode > 0) { - E.clear() - } - break; - case "getCroppedCanvas": - if (q === "image/jpeg") { - if (!I.option) { - I.option = {} - } - I.option.fillColor = "#fff" - } - break - } - H = E[I.method](I.option, I.secondOption); - switch (I.method) { - case "rotate": - if (J && D.viewMode > 0) { - E.crop() - } - break; - case "scaleX": - case "scaleY": - h(this).data("option", -I.option); - break; - case "getCroppedCanvas": - if (H) { - t && t(H.toDataURL(q)); - n.closeDialog("#ew-crop-img") - } else { - k.msg("裁剪失败", { icon: 2, anim: 6 }) - } - break - } - }) - - // docs - toggles - h(".my-toggles").on('click', "[data-value]", - function () { - var data = h(this).data(); - //console.log(data.value); - if (!E) { - return; - } - D.aspectRatio = data.value; - D.ready = function () { - //console.log('重新准备'); - }; - // Restart - E.destroy(); - E = new A(F[0], D); - }); - } - - var C = [ - '
', '
', - ' ', - "
", - '
', - '
', - '
', - '
', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - ' 像素', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - ' 像素', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - ' 像素', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - ' 像素', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - ' 度', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - '
', - ' ', - '
', - ' ', - '
', - '
', - '
', - - - '
', - '', - '', - '', - '', - '', - '
', - - - - "
", - "
", - '
', - '
', - ' ', - ' ', - "
", '
', - ' ', - ' ', - "
", '
', - ' ', - ' ', - ' ', - ' ', - "
", '
', - ' ', - ' ', - "
", '
', - ' ', - ' ', - "
", - ' ', - "
" - ].join(""); - n.open({ - title: i, - area: "900px", - type: 1, - content: C, - success: function (D, E) { - h(D).children(".layui-layer-content").css("overflow", "visible"); - B() - } - }) - }) - }; - - f("cropperImg", n) - }); \ No newline at end of file -- Gitee From d996a0b850899555d7abfdcf2cd306459e4dad82 Mon Sep 17 00:00:00 2001 From: JianWeie Date: Fri, 15 Oct 2021 16:52:56 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0cropperImg.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/layuiAdmin/controller/cropperImg.js | 364 ++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/cropperImg.js diff --git a/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/cropperImg.js b/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/cropperImg.js new file mode 100644 index 0000000..4fee5bd --- /dev/null +++ b/CoreCms.Net.Web.Admin/wwwroot/lib/layuiAdmin/controller/cropperImg.js @@ -0,0 +1,364 @@ +layui.define(["layer", "setter"], + function (f) { + var h = layui.jquery; + var k = layui.layer; + var d = layui.setter; + var n = { version: "1.1.0", layerData: {} }; + n.open = function (s) { + if (s.content && s.type === 2) { + s.url = undefined + } + if (s.url && (s.type === 2 || s.type === undefined)) { + s.type = 1 + } + if (s.area === undefined) { + s.area = s.type === 2 ? ["360px", "300px"] : "360px" + } + if (s.offset === undefined) { + s.offset = "70px" + } + if (s.shade === undefined) { + s.shade = 0.1 + } + if (s.fixed === undefined) { + s.fixed = false + } + if (s.resize === undefined) { + s.resize = false + } + if (s.skin === undefined) { + //s.skin = "layui-layer-admin" + s.skin = "layui-layer-admin" + } + var q = s.end; + s.end = function () { + k.closeAll("tips"); + q && q() + }; + if (s.url) { + var r = s.success; + s.success = function (t, u) { + h(t).data("tpl", s.tpl || ""); + n.reloadLayer(u, s.url, r) + } + } else { + if (s.tpl && s.content) { + s.content = n.util.tpl(s.content, s.data, d.tplOpen, d.tplClose) + } + } + var i = k.open(s); + if (s.data) { + n.layerData["d" + i] = s.data + } + return i + }; + n.closeDialog = function (i) { + if (i) { + k.close(n.getLayerIndex(i)) + } else { + parent.layer.close(parent.layer.getFrameIndex(window.name)) + } + }; + n.getLayerIndex = function (i) { + if (!i) { + return parent.layer.getFrameIndex(window.name) + } + var q = h(i).parents(".layui-layer").first().attr("id"); + if (q && q.length >= 11) { + return q.substring(11) + } + }; + n.cropImg = function (s) { + var q = "image/jpeg"; + var x = s.aspectRatio; + var y = s.imgSrc ? s.imgSrc == 'no' ? null : s.imgSrc : "/static/images/common/empty-banner.png"; + + //var y = s.imgSrc == 'no' ? null : s.imgSrc; + + var v = s.imgType; + var t = s.onCrop; + var u = s.limitSize; + var w = s.acceptMime; + var r = s.exts; + var i = s.title; + if (x === undefined) { + x = 1 + } + if (i === undefined) { + i = "裁剪图片" + } + if (v) { + q = v + } + layui.use(["Cropper", "upload"], + function () { + var A = layui.Cropper, z = layui.upload; + + function B() { + var E, F = h("#ew-crop-img"); + var G = { + elem: "#ew-crop-img-upload", + auto: false, + drag: false, + choose: function (H) { + H.preview(function (J, K, I) { + console.log("xuanze"); + q = K.type; + F.attr("src", I); + if (!y || !E) { + y = I; + B() + } else { + E.destroy(); + E = new A(F[0], D) + } + }) + } + }; + if (u !== undefined) { + G.size = u + } + if (w !== undefined) { + G.acceptMime = w + } + if (r !== undefined) { + G.exts = r + } + z.render(G); + if (!y) { + return h("#ew-crop-img-upload").trigger("click") + } + var D = { + aspectRatio: x, preview: ".ew-crop-img-preview", + ready: function (e) { + //console.log("初始准备" + e.type); + }, + cropstart: function (e) { + //console.log(e.type, e.detail.action); + }, + cropmove: function (e) { + //console.log(e.type, e.detail.action); + }, + cropend: function (e) { + //console.log(e.type, e.detail.action); + }, + crop: function (e) { + var data = e.detail; + + var dataX = document.getElementById('dataX'); + var dataY = document.getElementById('dataY'); + var dataHeight = document.getElementById('dataHeight'); + var dataWidth = document.getElementById('dataWidth'); + var dataRotate = document.getElementById('dataRotate'); + var dataScaleX = document.getElementById('dataScaleX'); + var dataScaleY = document.getElementById('dataScaleY'); + dataX.value = Math.round(data.x); + dataY.value = Math.round(data.y); + dataHeight.value = Math.round(data.height); + dataWidth.value = Math.round(data.width); + dataRotate.value = typeof data.rotate !== 'undefined' ? data.rotate : ''; + dataScaleX.value = typeof data.scaleX !== 'undefined' ? data.scaleX : ''; + dataScaleY.value = typeof data.scaleY !== 'undefined' ? data.scaleY : ''; + }, + zoom: function (e) { + console.log(e.type, e.detail.ratio); + } + }; + E = new A(F[0], D); + h(".ew-crop-tool").on("click", + "[data-method]", + function () { + var I = h(this).data(), J, H; + if (!E || !I.method) { + return + } + I = h.extend({}, I); + J = E.cropped; + switch (I.method) { + case "rotate": + if (J && D.viewMode > 0) { + E.clear() + } + break; + case "getCroppedCanvas": + if (q === "image/jpeg") { + if (!I.option) { + I.option = {} + } + I.option.fillColor = "#fff" + } + break + } + H = E[I.method](I.option, I.secondOption); + switch (I.method) { + case "rotate": + if (J && D.viewMode > 0) { + E.crop() + } + break; + case "scaleX": + case "scaleY": + h(this).data("option", -I.option); + break; + case "getCroppedCanvas": + if (H) { + t && t(H.toDataURL(q)); + n.closeDialog("#ew-crop-img") + } else { + k.msg("裁剪失败", { icon: 2, anim: 6 }) + } + break + } + }) + + // docs - toggles + h(".my-toggles").on('click', "[data-value]", + function () { + var data = h(this).data(); + //console.log(data.value); + if (!E) { + return; + } + D.aspectRatio = data.value; + D.ready = function () { + //console.log('重新准备'); + }; + // Restart + E.destroy(); + E = new A(F[0], D); + }); + } + + var C = [ + '
', '
', + ' ', + "
", + '
', + '
', + '
', + '
', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + ' 像素', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + ' 像素', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + ' 像素', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + ' 像素', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + ' 度', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + '
', + ' ', + '
', + ' ', + '
', + '
', + '
', + + + '
', + '', + '', + '', + '', + '', + '
', + + + + "
", + "
", + '
', + '
', + ' ', + ' ', + "
", '
', + ' ', + ' ', + "
", '
', + ' ', + ' ', + ' ', + ' ', + "
", '
', + ' ', + ' ', + "
", '
', + ' ', + ' ', + "
", + ' ', + "
" + ].join(""); + n.open({ + title: i, + area: "900px", + type: 1, + content: C, + success: function (D, E) { + h(D).children(".layui-layer-content").css("overflow", "visible"); + B() + } + }) + }) + }; + + f("cropperImg", n) + }); \ No newline at end of file -- Gitee From 6421892e03103b3825e384148ab01a93690a18ed Mon Sep 17 00:00:00 2001 From: wangqi <122058662@qq.com> Date: Tue, 19 Oct 2021 15:58:40 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Lunix=20docker=20?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=90=8Ehttp://=E5=9F=9F=E5=90=8D/api/Tools/?= =?UTF-8?q?UploadFilesFByBase64=20=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=9B=A0=E5=AE=B9=E5=99=A8=E4=B8=AD=E7=BC=BA=E5=B0=91libgdiplu?= =?UTF-8?q?s=20=E5=BA=93=E5=AF=BC=E8=87=B4502=20bad=20gateway=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Web.Admin/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CoreCms.Net.Web.Admin/Dockerfile b/CoreCms.Net.Web.Admin/Dockerfile index 6e46781..4dcee07 100644 --- a/CoreCms.Net.Web.Admin/Dockerfile +++ b/CoreCms.Net.Web.Admin/Dockerfile @@ -1,5 +1,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:5.0 +RUN apt-get update && apt-get install -y libgdiplus + WORKDIR /app EXPOSE 80 -- Gitee