-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html
227 lines (227 loc) · 7.81 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="applicable-device" content="mobile"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<title>TalkingData Base</title>
<link rel="stylesheet" href="css/public_head.css" />
<link rel="stylesheet" href="css/public_body.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/phone.js" ></script>
<script type="text/javascript" src="js/TalkingDataSDK.js"></script>
<script type="text/javascript" src="js/TalkingDataProfileType.js"></script>
<script type="text/javascript" src="js/TalkingDataGender.js"></script>
<script type="text/javascript" src="js/TalkingDataProfile.js"></script>
<script type="text/javascript" src="js/TalkingDataSearch.js"></script>
</head>
<body>
<div class="head_line">
<p class="head_line_p">
TalkingDataSDK
</p>
</div>
<div class="new_index">
<div class="wd_title">
<img src="images/base.png">获取TDID
</div>
<div class="wd_index">
<div class="wd_line">
<span>TDID</span>
<input id="tx_tdid" type="text" class="line_input" placeholder="TDID">
</div>
<div class="btn_line">
<input id="btn_tdid" type="button" class="bottom_btn" value="获取TDID">
</div>
</div>
</div>
<div class="new_index">
<div class="wd_title">
<img src="images/base.png">获取OAID
</div>
<div class="wd_index">
<div class="wd_line">
<span>OAID</span>
<input id="tx_oaid" type="text" class="line_input" placeholder="OAID">
</div>
<div class="btn_line">
<input id="btn_oaid" type="button" class="bottom_btn" value="获取OAID">
</div>
</div>
</div>
<div class="new_index">
<div class="wd_title">
<img src="images/base.png">设置经纬度
</div>
<div class="wd_index">
<div class="wd_line">
<span>纬度</span>
<input id="tx_latitude" type="text" class="line_input" placeholder="纬度">
</div>
<div class="wd_line">
<span>经度</span>
<input id="tx_longitude" type="text" class="line_input" placeholder="经度">
</div>
<div class="btn_line">
<input id="btn_location" type="button" class="bottom_btn" value="设置经纬度">
</div>
</div>
</div>
<div class="new_index">
<div class="wd_title">
<img src="images/base.png">基础通用事件
</div>
<div class="wd_index">
<div class="btn_line">
<input id="btn_deepLink" type="button" class="bottom_btn" value="唤醒">
</div>
<div class="btn_line">
<input id="btn_register" type="button" class="bottom_btn" value="注册">
</div>
<div class="btn_line">
<input id="btn_login" type="button" class="bottom_btn" value="登录">
</div>
<div class="btn_line">
<input id="btn_profileUpdate" type="button" class="bottom_btn" value="账户属性更新">
</div>
<div class="btn_line">
<input id="btn_createCard" type="button" class="bottom_btn" value="添加支付信息">
</div>
<div class="btn_line">
<input id="btn_favorite" type="button" class="bottom_btn" value="收藏">
</div>
<div class="btn_line">
<input id="btn_share" type="button" class="bottom_btn" value="分享">
</div>
<div class="btn_line">
<input id="btn_punch" type="button" class="bottom_btn" value="签到打卡">
</div>
<div class="btn_line">
<input id="btn_search" type="button" class="bottom_btn" value="搜索">
</div>
</div>
</div>
<div class="new_index">
<div class="wd_title">
</div>
<div class="btn_line">
<input id="btn_back" type="button" class="bottom_btn" value="返回">
</div>
</div>
<script src="cordova.js"></script>
<script>
var getTDID = function(tdid){
$('#tx_tdid').val(tdid);
}
$('#btn_tdid').on('click', function(){
TalkingDataSDK.getDeviceId(getTDID);
});
var getOAID = function(oaid){
$('#tx_oaid').val(oaid);
}
$('#btn_oaid').on('click', function(){
TalkingDataSDK.getOAID(getOAID);
});
$('#btn_location').on('click', function(){
var latitude = $('#tx_latitude').val() * 1;
var longitude = $('#tx_longitude').val() * 1;
TalkingDataSDK.setLocation(latitude, longitude);
});
$('#btn_deepLink').on('click', function(){
TalkingDataSDK.onReceiveDeepLink("https://www.talkingdata.com");
});
$('#btn_register').on('click', function(){
var profile = TalkingDataProfile.createProfile();
profile.setName("name01");
profile.setType(TalkingDataProfileType.WEIXIN);
profile.setGender(TalkingDataGender.MALE);
profile.setAge(18);
profile.setProperty1("property1");
profile.setProperty2(2);
profile.setProperty3(3.14);
profile.setProperty4("property4");
profile.setProperty5("property5");
profile.setProperty6(0.618);
profile.setProperty7("property7");
profile.setProperty8("property8");
profile.setProperty9(9.8);
profile.setProperty10("property10");
var eventValue = {
key : "value"
};
TalkingDataSDK.onRegister("user01", profile, "123456", eventValue);
});
$('#btn_login').on('click', function(){
var profile = TalkingDataProfile.createProfile();
profile.setName("name01");
profile.setType(TalkingDataProfileType.WEIXIN);
profile.setGender(TalkingDataGender.MALE);
profile.setAge(18);
profile.setProperty1("property1");
profile.setProperty2(2);
profile.setProperty3(3.14);
profile.setProperty4("property4");
profile.setProperty5("property5");
profile.setProperty6(0.618);
profile.setProperty7("property7");
profile.setProperty8("property8");
profile.setProperty9(9.8);
profile.setProperty10("property10");
var eventValue = {
key : "value"
};
TalkingDataSDK.onLogin("user01", profile, eventValue);
});
$('#btn_profileUpdate').on('click', function(){
var profile = TalkingDataProfile.createProfile();
profile.setName("name01");
profile.setType(TalkingDataProfileType.WEIXIN);
profile.setGender(TalkingDataGender.MALE);
profile.setAge(18);
profile.setProperty1("property1");
profile.setProperty2(2);
profile.setProperty3(3.14);
profile.setProperty4("property4");
profile.setProperty5("property5");
profile.setProperty6(0.618);
profile.setProperty7("property7");
profile.setProperty8("property8");
profile.setProperty9(9.8);
profile.setProperty10("property10");
TalkingDataSDK.onProfileUpdate(profile);
});
$('#btn_createCard').on('click', function(){
TalkingDataSDK.onCreateCard("user01", "card", "6201234567891011");
});
$('#btn_favorite').on('click', function(){
var eventValue = {
key : "value"
};
TalkingDataSDK.onFavorite("书单", "西游记", eventValue);
});
$('#btn_share').on('click', function(){
var eventValue = {
key : "value"
};
TalkingDataSDK.onShare("user01", "读书清单", eventValue);
});
$('#btn_punch').on('click', function(){
TalkingDataSDK.onPunch("user01", "punch01");
});
$('#btn_search').on('click', function(){
var search = TalkingDataSearch.createSearch();
search.setCategory("服装类");
search.setContent("2021新款");
TalkingDataSDK.onSearch(search);
});
$('#btn_back').on("click", function(){
window.history.back();
});
</script>
</body>
</html>