From 8304c056b4898d34c19f55bb3d9718168c91627b Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 14 Apr 2025 15:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../img/synthesisQuery/download_icon2.png | Bin 0 -> 266 bytes .../static/img/synthesisQuery/water_icon.png | Bin 0 -> 323 bytes .../js/synthesisQuery/synthesisQueryCommon.js | 21 ++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 src/main/resources/static/img/synthesisQuery/download_icon2.png create mode 100644 src/main/resources/static/img/synthesisQuery/water_icon.png diff --git a/src/main/resources/static/img/synthesisQuery/download_icon2.png b/src/main/resources/static/img/synthesisQuery/download_icon2.png new file mode 100644 index 0000000000000000000000000000000000000000..80949233f875a4905df5f41317ae677c98371e30 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}M?75|LoEE? zPPr)9WFX*DZoN==qtI62wJvL1-W>4@yXI-cC^SLR?yUOF%AL1wH{W*AHB2X--Wp7(TSH5vK3e+pu@ zG*)j`(qT^(2siFJtmD3LFN<_k#^Kfc4C~6+em+~1@{uL2b8o>`R}WEPx#{YgYYR5(w~l-&)&FbssxlTbEc6X+B?0+RrfP#&2An8fgbjY7mvh5A6GN{t<# z?`$WgftC$~qhW#Ey^++ISqH<|PbJMHwQ2vv{>I4Nj{sc*Pw`D6i2X_up!iwX@@!{j z`0vu(eJ6=v7~LEMnAs`V;U_r#{4c_`F|)P?T4sh)hPxwieYHLOkpLwm948Ry%R*X- z1B>$uAQZs#iBV=GC<9Yo_lD6E%bL+wX_B^4d=#+8)G~q4Plin#q?n^Ph=hZrdC{@# z-eWZCVwbg{%?S(`$x`~ho~;Ce0kfjMU8{$)*A;nH>|cRkOsn5smtKteyb%8fbOB}8 VgcGP-Ex-T(002ovPDHLkV1l2>jCcS5 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/js/synthesisQuery/synthesisQueryCommon.js b/src/main/resources/static/js/synthesisQuery/synthesisQueryCommon.js index d5201cd..741ee39 100644 --- a/src/main/resources/static/js/synthesisQuery/synthesisQueryCommon.js +++ b/src/main/resources/static/js/synthesisQuery/synthesisQueryCommon.js @@ -3,6 +3,7 @@ function viewImg(item) { layer.photos({ shade: 0.5, footer: false, + // toolbar: ['prev', 'next', 'download', 'customBtn'], // 添加自定义按钮标识 photos: { "title": "图片预览", "start": 0, @@ -13,6 +14,26 @@ function viewImg(item) { } ] }, + success: function(layero){ + // 获取工具栏元素 + var toolbar = $(layero).find('.layui-layer-photos-toolbar'); + // 添加自定义按钮 + var customBtn = $('
'+ + '
'); + toolbar.append(customBtn); + // 绑定点击事件 + customBtn.on('click', function(){ + imgDownLoad(item,1); + }); + + var customBtn2 = $('
'+ + '
'); + toolbar.append(customBtn2); + // 绑定点击事件 + customBtn2.on('click', function(){ + generateWatermark(item) + }); + } }); }