Skip to content

Commit

Permalink
无效PV又增加一个参数 (#1331)
Browse files Browse the repository at this point in the history
* 无效PV又增加一个参数

* encodeURIComponent
  • Loading branch information
craigchencc authored Mar 6, 2019
1 parent ce686de commit c02d7f2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/mip-custom/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c02d7f2

Please sign in to comment.