From 53bf08eeca228ea099960ac4152e02be9687a306 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Thu, 29 Oct 2020 15:56:09 +0800 Subject: [PATCH] =?UTF-8?q?layer=20get=20method=20=E6=94=AF=E6=8C=81=20con?= =?UTF-8?q?tentFormData=20=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/resources/static/layer/3.1/layer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/src/main/resources/static/layer/3.1/layer.js b/common/src/main/resources/static/layer/3.1/layer.js index fe6e0fbf..1dc957e4 100644 --- a/common/src/main/resources/static/layer/3.1/layer.js +++ b/common/src/main/resources/static/layer/3.1/layer.js @@ -307,7 +307,7 @@ Class.pt.creat = function(){ // + config.content[0] + '">'; // 2017-5-13 ThinkGem 支持post方式提交iframe config.content = '
'; @@ -357,7 +357,12 @@ Class.pt.creat = function(){ // 2017-5-13 ThinkGem 支持post方式提交iframe if (config.type == 2){ if (config.method == 'GET' || config.method == 'get'){ - that.layero.find('iframe').attr('src', content[0]); + var iframeSrc = content[0] || '', formData = config.contentFormData; + for(var key in formData || {}){ + iframeSrc += iframeSrc.indexOf('?') == -1 ? '?' : '&'; + iframeSrc += key + '=' + formData[key]; + } + that.layero.find('#' + doms[4] + times).attr('src', iframeSrc); }else{ var form = that.layero.find('#' + doms[4] + '-form' + times), formData = config.contentFormData; for(var key in formData || {}){