From c0ba06eb9973eae00b514e82ab0f7478c2589603 Mon Sep 17 00:00:00 2001 From: Xing PENG Date: Fri, 15 Mar 2019 21:24:39 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=AE=9A=E5=88=B6=E5=8C=96=E5=8C=BB?= =?UTF-8?q?=E7=96=97=E4=B8=9A=E5=8A=A1=E5=A2=9E=E5=8A=A0=E5=B1=8F=E8=94=BD?= =?UTF-8?q?A=E5=8C=BA=E9=93=BE=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20(#1334)"=20(#1336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2089ecbdfccadbe7e5d560a1e9f82d02f5811f04. --- src/mip-custom/mip-custom.js | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/mip-custom/mip-custom.js b/src/mip-custom/mip-custom.js index d9e1bf5fc..5d6b98fa9 100644 --- a/src/mip-custom/mip-custom.js +++ b/src/mip-custom/mip-custom.js @@ -171,41 +171,11 @@ define(function () { require.config(config); } - // common 数据缓存 if (data.common) { commonData = data.common; } - // 医疗屏蔽A区跳转 - if (commonData.product === 'medicine') { - var specialLink = [ - // 寻医问药 - 'mip.imask.xywy.com', - // 宝宝知道 - 'baobao.baidu.com', - // 柠檬爱美 - 'lemon.baidu.com', - // 春雨医生 - 'm.chunyuyisheng.com', - // 好大夫 - 'mip.haodf.com', - // 百科名医 - 'm.baikemy.com' - ]; - specialLink = specialLink.join(','); - // 特殊网站 绕过屏蔽, - if (commonData.originalUrl && commonData.originalUrl.indexOf(specialLink) < 0) { - var alink = document.querySelectorAll('a'); - - for (var i = 0; i < alink.length; i++) { - if (alink[i].href.indexOf('author.baidu.com') < 0) { - alink[i].href = 'javascript:void(0)'; - } - } - } - } - // 模板数据缓存 if (data.template) { template = data.template; @@ -216,6 +186,7 @@ define(function () { var container = document.createElement('div'); container.setAttribute('mip-custom-container', i); element.appendChild(container); + // dom 渲染 dom.render(element, tplData, container); } @@ -230,7 +201,6 @@ define(function () { window.MIP.adShow = true // 移除广告占位符号 dom.removePlaceholder.apply(this); - }; /** @@ -503,4 +473,4 @@ define(function () { }; return customElement; -}); \ No newline at end of file +});