Skip to content

Commit 3f947ed

Browse files
author
shengyonggen
committed
普通二维码bug修复
1 parent de079a1 commit 3f947ed

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

sensorsdata.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var ArrayProto = Array.prototype,
2323
slice = ArrayProto.slice,
2424
toString = ObjProto.toString,
2525
hasOwnProperty = ObjProto.hasOwnProperty,
26-
LIB_VERSION = '1.5',
26+
LIB_VERSION = '1.6',
2727
LIB_NAME = 'MiniProgram';
2828

2929
var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
@@ -582,6 +582,13 @@ _.getSource = function (url) {
582582
if(_.isEmptyObject(url)){
583583
return {};
584584
}else{
585+
for(var i in url){
586+
if ((' ' + source_channel_standard + ' ').indexOf(' ' + i + ' ') === -1) {
587+
delete url[i];
588+
}else{
589+
url[i] = url[i].replace('?','*');
590+
}
591+
}
585592
url = _.convertObjToParam(url);
586593
url = '?' + url;
587594
}

0 commit comments

Comments
 (0)