From a9d6b6a411c333c3b32d519b787c889864ba9635 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 30 Jun 2026 17:30:27 +0800
Subject: [PATCH] fix(system): 修复支付链接图片上传功能
---
src/main/resources/templates/febs/views/modules/system/payLink.html | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/templates/febs/views/modules/system/payLink.html b/src/main/resources/templates/febs/views/modules/system/payLink.html
index c1365e7..a90fe16 100644
--- a/src/main/resources/templates/febs/views/modules/system/payLink.html
+++ b/src/main/resources/templates/febs/views/modules/system/payLink.html
@@ -22,7 +22,7 @@
</blockquote>
<div class="layui-word-aux">双击图片删除</div>
</div>
- <input type="hidden" name="xtLinkImg" id="xtLinkImg" data-th-id="${payLink.xtLinkImg}">
+ <input name="xtLinkImg" id="xtLinkImg" data-th-id="${payLink.xtLinkImg}" readonly>
</div>
</div>
</div>
@@ -91,8 +91,14 @@
});
}
,done: function(res){
- $('#xtLinkImg').val(res.data.src);
- imgBind();
+ console.log('upload done:', res);
+ if (res && res.code === 0 && res.data && res.data.src) {
+ $('#xtLinkImg').val(res.data.src);
+ imgBind();
+ }
+ }
+ ,error: function(){
+ febs.alert.warn('图片上传失败');
}
});
@@ -104,10 +110,12 @@
}
form.on('submit(pay-link-form-submit)', function (data) {
- if (!$('#xtLinkImg').val()) {
+ var imgVal = $('#xtLinkImg').val();
+ if (!imgVal) {
febs.alert.warn('请上传付款链接图片');
return false;
}
+ data.field.xtLinkImg = imgVal;
febs.post(ctx + 'admin/system/payLink', data.field, function (res) {
febs.alert.success('保存成功');
});
--
Gitblit v1.9.1