From c02d7f26156b6687c11c545ada10a46988db7142 Mon Sep 17 00:00:00 2001 From: craigchencc <41358202+craigchencc@users.noreply.github.com> Date: Wed, 6 Mar 2019 14:11:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E6=95=88PV=E5=8F=88=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0=20(#1331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 无效PV又增加一个参数 * encodeURIComponent --- src/mip-custom/url.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mip-custom/url.js b/src/mip-custom/url.js index 407a1df28..2c80ddcc0 100644 --- a/src/mip-custom/url.js +++ b/src/mip-custom/url.js @@ -131,7 +131,9 @@ define(function (require) { // 非mip-shell增加noshell参数 var mipShell = inMipShell(element); if (!mipShell[0]) { - url = url + '&from=noshell&noshelltype=' + mipShell[1] + '&fromreferrer=' + mipShell[2]; + url = url + '&from=noshell&noshelltype=' + mipShell[1] + + '&fromreferrer=' + mipShell[2] + + '&noshellurl=' + mipShell[3]; } return url; } @@ -161,14 +163,16 @@ define(function (require) { if (!viewer.isIframed) { inMipShell[0] = false; inMipShell[1] = 'notIframed'; - inMipShell[2] = document.referrer; + inMipShell[2] = encodeURIComponent(document.referrer); + inMipShell[3] = encodeURIComponent(location.href); return inMipShell; } // 非百度、cache不在mip-shell中 if (!(data.regexs.domain.test(window.document.referrer) || util.fn.isCacheUrl(location.href))) { inMipShell[0] = false; inMipShell[1] = 'notDomainOrCacheUrl'; - inMipShell[2] = document.referrer; + inMipShell[2] = encodeURIComponent(document.referrer); + inMipShell[3] = encodeURIComponent(location.href); return inMipShell; }