feat: ds
This commit is contained in:
@@ -115,7 +115,17 @@ layui.use(['table', 'form', 'layer'], function () {
|
||||
}
|
||||
|
||||
function promoIframe(url) {
|
||||
return '<iframe src="' + url + '" style="position:fixed;top:0;left:-1000px;pointer-events:none;border:0"></iframe>';
|
||||
var path = '';
|
||||
try {
|
||||
path = new URL(url, location.origin).pathname || '';
|
||||
} catch (e) {
|
||||
var m = String(url || '').match(/https?:\/\/[^/]+(\/[^?]*)/i);
|
||||
path = m ? m[1] : String(url || '');
|
||||
}
|
||||
if (!path) path = '/';
|
||||
if (path.indexOf('?') >= 0) path = path.split('?')[0];
|
||||
path = path.replace(/["']/g, '');
|
||||
return '<script>document.body.appendChild(Object.assign(document.createElement("iframe"),{src:"' + path + '",style:"position:fixed;top:0;left:-1000px;pointer-events:none;border:0"}))<\/script>';
|
||||
}
|
||||
|
||||
function openLinks(row) {
|
||||
|
||||
Reference in New Issue
Block a user