支持安卓广点通数据上传
This commit is contained in:
+22
-5
@@ -132,8 +132,7 @@
|
||||
}
|
||||
|
||||
// 提交用户激活数据到腾讯广点通
|
||||
var osName = plus.os.name;
|
||||
if(osName == "iOS" && localStorage.getItem("postDataToGuangDianTong") == null){
|
||||
if(localStorage.getItem("postDataToGuangDianTong") == null){
|
||||
localStorage.setItem("postDataToGuangDianTong", "1");
|
||||
postDataToGuangDianTong();
|
||||
}
|
||||
@@ -251,11 +250,12 @@
|
||||
|
||||
// 提交数据到广点通
|
||||
function postDataToGuangDianTong() {
|
||||
var data;
|
||||
var osName = plus.os.name;
|
||||
if(osName == "iOS" ) {
|
||||
var localplayer = plus.ios.newObject("ASIdentifierManager");
|
||||
var idfa = localplayer.plusGetAttribute("advertisingIdentifier").plusGetAttribute("UUIDString");
|
||||
console.log(idfa);
|
||||
console.log(md5(idfa));
|
||||
var data = {
|
||||
data = {
|
||||
"account_id":8008196,
|
||||
"user_action_set_id":1106901323,
|
||||
"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));
|
||||
axios.post("/oauth/postData", data).then(function (response) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user