Skip to content

Commit

Permalink
普通二维码bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyonggen committed Jul 6, 2018
1 parent de079a1 commit 3f947ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion sensorsdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var ArrayProto = Array.prototype,
slice = ArrayProto.slice,
toString = ObjProto.toString,
hasOwnProperty = ObjProto.hasOwnProperty,
LIB_VERSION = '1.5',
LIB_VERSION = '1.6',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -582,6 +582,13 @@ _.getSource = function (url) {
if(_.isEmptyObject(url)){
return {};
}else{
for(var i in url){
if ((' ' + source_channel_standard + ' ').indexOf(' ' + i + ' ') === -1) {
delete url[i];
}else{
url[i] = url[i].replace('?','*');
}
}
url = _.convertObjToParam(url);
url = '?' + url;
}
Expand Down
Loading

0 comments on commit 3f947ed

Please sign in to comment.