支持安卓广点通数据上传
This commit is contained in:
+24
-7
@@ -132,8 +132,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 提交用户激活数据到腾讯广点通
|
// 提交用户激活数据到腾讯广点通
|
||||||
var osName = plus.os.name;
|
if(localStorage.getItem("postDataToGuangDianTong") == null){
|
||||||
if(osName == "iOS" && localStorage.getItem("postDataToGuangDianTong") == null){
|
|
||||||
localStorage.setItem("postDataToGuangDianTong", "1");
|
localStorage.setItem("postDataToGuangDianTong", "1");
|
||||||
postDataToGuangDianTong();
|
postDataToGuangDianTong();
|
||||||
}
|
}
|
||||||
@@ -251,11 +250,12 @@
|
|||||||
|
|
||||||
// 提交数据到广点通
|
// 提交数据到广点通
|
||||||
function postDataToGuangDianTong() {
|
function postDataToGuangDianTong() {
|
||||||
var localplayer = plus.ios.newObject("ASIdentifierManager");
|
var data;
|
||||||
var idfa = localplayer.plusGetAttribute("advertisingIdentifier").plusGetAttribute("UUIDString");
|
var osName = plus.os.name;
|
||||||
console.log(idfa);
|
if(osName == "iOS" ) {
|
||||||
console.log(md5(idfa));
|
var localplayer = plus.ios.newObject("ASIdentifierManager");
|
||||||
var data = {
|
var idfa = localplayer.plusGetAttribute("advertisingIdentifier").plusGetAttribute("UUIDString");
|
||||||
|
data = {
|
||||||
"account_id":8008196,
|
"account_id":8008196,
|
||||||
"user_action_set_id":1106901323,
|
"user_action_set_id":1106901323,
|
||||||
"actions":[
|
"actions":[
|
||||||
@@ -267,6 +267,23 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
var imei = plus.device.imei;
|
||||||
|
alert(imei);
|
||||||
|
data = {
|
||||||
|
"account_id":8008196,
|
||||||
|
"user_action_set_id":1106980650,
|
||||||
|
"actions":[
|
||||||
|
{
|
||||||
|
"action_type":"ACTIVATE_APP",
|
||||||
|
"user_id":{
|
||||||
|
"hash_imei":md5(imei)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
console.log(JSON.stringify(data));
|
console.log(JSON.stringify(data));
|
||||||
axios.post("/oauth/postData", data).then(function (response) {
|
axios.post("/oauth/postData", data).then(function (response) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user