Skip to content

Commit 1072b8e

Browse files
author
shengyonggen
committed
增加后init参数的支持
1 parent 5ef0a28 commit 1072b8e

File tree

3 files changed

+7
-103
lines changed

3 files changed

+7
-103
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sa-sdk-miniprogram",
3-
"version": "1.9.5",
3+
"version": "1.9.9",
44
"description": "sensorsdata miniprogram sdk",
55
"main": "sensorsdata.min.js",
66
"scripts": {

sensorsdata.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var ArrayProto = Array.prototype,
2626
slice = ArrayProto.slice,
2727
toString = ObjProto.toString,
2828
hasOwnProperty = ObjProto.hasOwnProperty,
29-
LIB_VERSION = '1.9.8',
29+
LIB_VERSION = '1.9.9',
3030
LIB_NAME = 'MiniProgram';
3131

3232
var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
@@ -1115,7 +1115,10 @@ sa.initial = function () {
11151115

11161116
};
11171117

1118-
sa.init = function () {
1118+
sa.init = function (obj) {
1119+
if(_.isObject(obj)){
1120+
sa.para = obj;
1121+
}
11191122
sa.initialState.storeIsComplete = true;
11201123
sa.initialState.checkIsComplete();
11211124
};

0 commit comments

Comments
 (0)