Skip to content

Commit

Permalink
app和js打通的改成json跟事
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyonggen committed Sep 26, 2016
1 parent 0ac689c commit aa518b3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sensorsdata.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,9 @@ saEvent.send = function(p, callback) {
var todo = null;
function setAppInfo(data){
app_info = data;
if(_.isJSONString(app_info)){
app_info = json.parse(app_info);
}
if(todo){
todo(data);
}
Expand All @@ -1742,6 +1745,9 @@ saEvent.send = function(p, callback) {
function getAndroid(){
if(typeof window.SensorsData_APP_JS_Bridge === 'object' && window.SensorsData_APP_JS_Bridge.sensorsdata_call_app){
app_info = SensorsData_APP_JS_Bridge.sensorsdata_call_app();
if(_.isJSONString(app_info)){
app_info = json.parse(app_info);
}
}
}
//ios
Expand Down
6 changes: 6 additions & 0 deletions src/sensorsdata.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,9 @@ saEvent.send = function(p, callback) {
var todo = null;
function setAppInfo(data){
app_info = data;
if(_.isJSONString(app_info)){
app_info = json.parse(app_info);
}
if(todo){
todo(data);
}
Expand All @@ -2346,6 +2349,9 @@ saEvent.send = function(p, callback) {
function getAndroid(){
if(typeof window.SensorsData_APP_JS_Bridge === 'object' && window.SensorsData_APP_JS_Bridge.sensorsdata_call_app){
app_info = SensorsData_APP_JS_Bridge.sensorsdata_call_app();
if(_.isJSONString(app_info)){
app_info = json.parse(app_info);
}
}
}
//ios
Expand Down
8 changes: 4 additions & 4 deletions vtrack.min.js

Large diffs are not rendered by default.

0 comments on commit aa518b3

Please sign in to comment.