1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > vue cnzz analytics demo</ title >
7+ < script src ="https://unpkg.com/vue/dist/vue.js "> </ script >
8+ < script src ="https://unpkg.com/vue-router/dist/vue-router.js "> </ script >
9+ < style >
10+ # app ,
11+ .section {
12+ display : flex;
13+ flex-direction : column;
14+ justify-content : flex-start;
15+ align-items : center;
16+ }
17+ .section {
18+ margin-bottom : 40px ;
19+ }
20+ .nav {
21+ margin-bottom : 20px ;
22+ }
23+ .nav .item {
24+ color : # 666 ;
25+ margin : 0 10px 20px ;
26+ }
27+ .nav .cur {
28+ color : # 000 ;
29+ font-weight : bold;
30+ }
31+ .label {
32+ display : flex;
33+ justify-content : center;
34+ align-items : center;
35+ margin-bottom : 20px ;
36+ }
37+ .text {
38+ display : flex;
39+ justify-content : flex-end;
40+ align-items : center;
41+ width : 60px ;
42+ font-size : 14px ;
43+ margin-right : 20px ;
44+ }
45+ .input {
46+ display : flex;
47+ align-items : center;
48+ width : 240px ;
49+ height : 40px ;
50+ font-size : 14px ;
51+ box-sizing : border-box;
52+ padding : 0 10px ;
53+ }
54+ .button {
55+ padding : 5px 20px ;
56+ cursor : pointer;
57+ }
58+ </ style >
59+ </ head >
60+ < body >
61+
62+ < div id ="app ">
63+ < h1 > Hello App!</ h1 >
64+
65+ < section class ="section ">
66+ < h2 > 切换路由自动上报测试</ h2 >
67+ < div class ="nav ">
68+ < router-link class ="item " to ="/page1 " exact > Go to Page1</ router-link >
69+ < router-link class ="item " to ="/page2 "> Go to Page2</ router-link >
70+ < router-link class ="item " to ="/page3 "> Go to Page3</ router-link >
71+ </ div >
72+ < router-view > </ router-view >
73+ </ section >
74+
75+ < section class ="section ">
76+ < h2 > 提交pv测试</ h2 >
77+ < label class ="label ">
78+ < span class ="text "> pageUrl</ span >
79+ < input class ="input " type ="text " placeholder ="输入页面的url " v-model ="pageUrl ">
80+ </ label >
81+ < label class ="label ">
82+ < span class ="text "> fromUrl</ span >
83+ < input class ="input " type ="text " placeholder ="输入来路的url " v-model ="fromUrl ">
84+ </ label >
85+ < button class ="button " @click ="pv "> 提交一个pv</ button >
86+ </ section >
87+
88+ < section class ="section ">
89+ < h2 > 提交event测试</ h2 >
90+ < label class ="label ">
91+ < span class ="text "> category</ span >
92+ < input class ="input " type ="text " placeholder ="输入产生该事件的位置名称 " v-model ="category ">
93+ </ label >
94+ < label class ="label ">
95+ < span class ="text "> action</ span >
96+ < input class ="input " type ="text " placeholder ="输入产生该事件的行为描述 " v-model ="action ">
97+ </ label >
98+ < label class ="label ">
99+ < span class ="text "> label</ span >
100+ < input class ="input " type ="text " placeholder ="输入产生该事件的标签名称 " v-model ="label ">
101+ </ label >
102+ < label class ="label ">
103+ < span class ="text "> value</ span >
104+ < input class ="input " type ="text " placeholder ="输入该事件的分值 " v-model ="value ">
105+ </ label >
106+ < label class ="label ">
107+ < span class ="text "> nodeId</ span >
108+ < input class ="input " type ="text " placeholder ="输入产生该事件的元素id " v-model ="nodeId ">
109+ </ label >
110+ < button class ="button " @click ="event "> 提交一个event</ button >
111+ </ section >
112+ </ div >
113+
114+ < script src ="../dist/vue-cnzz-analytics.js "> </ script >
115+ < script src ="js/main.js "> </ script >
116+
117+ </ body >
118+ </ html >
0 commit comments