-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandardPage.html
126 lines (114 loc) · 3.95 KB
/
standardPage.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<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 Standard</title>
<link rel="stylesheet" href="css/public_head.css" />
<link rel="stylesheet" href="css/index.css" />
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/TalkingData.js"></script>
<script type="text/javascript" src="js/phone.js"></script>
</head>
<body>
<!--head_line-->
<div class="head_line">
<p class="head_line_p">
TalkingData
</p>
</div>
<div class="new_index">
<div class="wd_title">
<img src="images/wd_ico.png">标准事件
</div>
<div class="wd_index">
<div class="wd_line">
<img src="images/mc.png">
<input id="register" type="button" class="line_btn" value="注册">
</div>
<div class="wd_line">
<img src="images/lxr_ico.png">
<input id="login" type="button" class="line_btn" value="登录">
</div>
<div class="wd_line">
<img src="images/sh_info_ico.png">
<input id="orders" type="button" class="line_btn" value="下单">
</div>
<div class="wd_line">
<img src="images/qyyzf_ico.png">
<input id="pay_orders" type="button" class="line_btn" value="支付订单">
</div>
<div class="wd_line">
<img src="images/sh_info_ico.png">
<input id="cancel_orders" type="button" class="line_btn" value="取消订单">
</div>
<div class="wd_line">
<img src="images/tp_ico.png">
<input id="show_goods" type="button" class="line_btn" value="浏览商品">
</div>
<div class="wd_line">
<img src="images/zt.png">
<input id="add_carts" type="button" class="line_btn" value="加入购物车">
</div>
<div class="wd_line">
<img src="images/date.png">
<input id="show_carts" type="button" class="line_btn" value="查看购物车">
</div>
</div>
<div class="wd_index" border="1">
</div>
<div class="btn_line">
<input id="btn_back" type="button" class="bottom_btn" value="返回">
</div>
</div>
<script>
// 注册
$('#register').on('click', function () {
TalkingData.onRegister("1234567", TalkingData.ProfileType.WEIXIN, "nickName");
});
// 登录
$('#login').on('click', function () {
TalkingData.onLogin("1234567", TalkingData.ProfileType.WEIXIN, "nickName");
});
// 下单
$('#orders').on('click', function () {
TalkingData.onPlaceOrder("orderId123", 899800, "CNY");
});
// 支付订单
$('#pay_orders').on('click', function () {
TalkingData.onOrderPaySucc("orderId123", 899800, "CNY", "Alipay");
});
// 取消订单
$('#cancel_orders').on('click', function () {
TalkingData.onCancelOrder("orderId123", 899800, "CNY");
});
// 浏览商品
$('#show_goods').on('click', function () {
TalkingData.onViewItem("007", "家电", "电视机", 499900);
});
// 加入购物车
$('#add_carts').on('click', function () {
TalkingData.onAddItemToShoppingCart("007", "家电", "电视机", 499900, 10);
});
// 查看购物车
$('#show_carts').on('click', function () {
var shoppingCart = TalkingDataShoppingCart.createShoppingCart();
shoppingCart.addItem("007", "家电", "电视", 499900, 1);
shoppingCart.addItem("008", "家电", "冰箱", 399900, 1);
TalkingData.onViewShoppingCart(shoppingCart);
});
// 返回
$('#btn_back').on("click", function () {
TalkingData.onPageEnd(window.location.href);
window.history.back();
});
</script>
</body>
</html>