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); }