...
|
...
|
@@ -3,9 +3,31 @@ |
|
|
*/
|
|
|
import utils from './utils';
|
|
|
|
|
|
const channelMap = {
|
|
|
'baidu.com': 100000000000055,
|
|
|
'so.com': 100000000000049,
|
|
|
'sogou.com': 100000000000053,
|
|
|
'bing.com': 100000000000057,
|
|
|
'm.sm.cn': 100000000000059,
|
|
|
'google.com': 100000000000061
|
|
|
};
|
|
|
|
|
|
const getMktcBySeo = () => {
|
|
|
var mktc,
|
|
|
rf = document.referrer;
|
|
|
|
|
|
for (var domain in channelMap) {
|
|
|
if (rf.indexOf(domain) > -1) {
|
|
|
mktc = channelMap[domain];
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return mktc;
|
|
|
};
|
|
|
|
|
|
const getAppPath = () => {
|
|
|
let qs = utils.queryString();
|
|
|
let ct = qs.mkt_code || qs.union_type;
|
|
|
let ct = qs.mkt_code || qs.union_type || getMktcBySeo() || '100000000000349';
|
|
|
|
|
|
delete qs.openapp; // 防止重复打开
|
|
|
|
...
|
...
|
|