From 8af0ff10540c25d9c9e2ce78a28ea95a8daf362e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 29 Jan 2019 11:23:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=A4=B4=E5=83=8F=E4=B8=BA?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=9C=8D=E5=8A=A1=E5=99=A8=E8=B7=A8=E5=9F=9F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ajax/libs/cropbox/cropbox.js | 1 + .../main/resources/templates/system/user/profile/avatar.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js index b25091e9..4e3891e9 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/cropbox/cropbox.js @@ -123,6 +123,7 @@ $(window).bind('mouseup', imgMouseUp); el.bind('mousewheel DOMMouseScroll', zoomImage); }; + obj.image.crossOrigin = 'Anonymous'; obj.image.src = options.imgSrc; el.on('remove', function(){$(window).unbind('mouseup', imgMouseUp)}); diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/avatar.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/avatar.html index 77beb91a..3d4018b0 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/profile/avatar.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/avatar.html @@ -38,7 +38,7 @@ $(window).load(function() { options.imgSrc = e.target.result; //根据MIME判断上传的文件是不是图片类型 if((options.imgSrc).indexOf("image/")==-1){ - $.modal.alertWarning("文件格式错误,请上传图片类型,如:JPG,JEPG,PNG后缀的文件。"); + $.modal.alertWarning("文件格式错误,请上传图片类型,如:JPG,JPEG,PNG后缀的文件。"); } else { cropper = $('.imageBox').cropbox(options); }