Skip to content

Commit 4a6f231

Browse files
author
shengyonggen
committed
增加$lib_detail
1 parent 5bea160 commit 4a6f231

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

sensorsdata.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sdk.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,11 @@ saEvent.send = function(p, callback) {
17731773
properties: {}
17741774
};
17751775

1776+
if (_.isObject(p) && _.isObject(p.properties) && !_.isEmptyObject(p.properties) && p.properties.$lib_detail) {
1777+
data.lib.$lib_detail = p.properties.$lib_detail;
1778+
delete p.properties.$lib_detail;
1779+
}
1780+
17761781
// 测试部分数据没有distinct_id的问题
17771782
if (typeof store.getDistinctId() !== 'string' || typeof store.getDistinctId() === '') {
17781783
var wrong_case = '';

src/sensorsdata.full.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ sd.initPara = function(para){
122122
, slice = ArrayProto.slice
123123
, toString = ObjProto.toString
124124
, hasOwnProperty = ObjProto.hasOwnProperty
125-
, LIB_VERSION = '1.7.1.1';
125+
, LIB_VERSION = '1.7.1.2';
126126

127127
sd.lib_version = LIB_VERSION;
128128

@@ -1891,6 +1891,11 @@ saEvent.send = function(p, callback) {
18911891
properties: {}
18921892
};
18931893

1894+
if (_.isObject(p) && _.isObject(p.properties) && !_.isEmptyObject(p.properties) && p.properties.$lib_detail) {
1895+
data.lib.$lib_detail = p.properties.$lib_detail;
1896+
delete p.properties.$lib_detail;
1897+
}
1898+
18941899
// 测试部分数据没有distinct_id的问题
18951900
if (typeof store.getDistinctId() !== 'string' || typeof store.getDistinctId() === '') {
18961901
var wrong_case = '';

src/version.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
var sensorsdata_js_sdk_latest_version = '@@version';
1+
var sensorsdata_js_sdk_latest_version = '@@version';
2+
var sensorsdata_js_sdk_noupdate_version = '@@noupdate_version';

version.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
var sensorsdata_js_sdk_latest_version = 'latest1';
1+
var sensorsdata_js_sdk_latest_version = '1.7.1.2';
2+
var sensorsdata_js_sdk_noupdate_version = 'latest1';

vtrack.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)