xiuli.gao 6 years ago
parent
commit
0217733413
1 changed files with 15 additions and 0 deletions
  1. 15 0
      jinniu_download/index.html

+ 15 - 0
jinniu_download/index.html

37
 </html>
37
 </html>
38
 <script type="text/javascript" src="jquery-2.1.0.js"></script>
38
 <script type="text/javascript" src="jquery-2.1.0.js"></script>
39
 <script type="text/javascript">
39
 <script type="text/javascript">
40
+	var uuid = null;
41
+	var str=location.href;  //取得整个地址栏
42
+    var num=str.indexOf("?"); 
43
+    str=str.substr(num+1); //str得到?之后的字符串
44
+    var brr=str.split("&");
45
+    for(var i = 0 ; i<brr.length; i++){
46
+    	if(brr[i].indexOf('uuid') != -1){
47
+    		uuid = brr[i].split('=')[1];//设备唯一标识
48
+    		uuid = decodeURI(uuid);
49
+    	}
50
+    }
51
+	
40
 	var Button = document.getElementsByClassName("button")[0];
52
 	var Button = document.getElementsByClassName("button")[0];
41
 	Button.onclick = function () {
53
 	Button.onclick = function () {
42
 		clickNumber();//点击统计
54
 		clickNumber();//点击统计
53
 			type:"post",
65
 			type:"post",
54
 			url:"/api/V2/updateStatistics",
66
 			url:"/api/V2/updateStatistics",
55
 			dataType:"json",
67
 			dataType:"json",
68
+			data:{
69
+				'uuid':uuid
70
+			},
56
 			success: function (res){
71
 			success: function (res){
57
 				console.log(res)
72
 				console.log(res)
58
 			}
73
 			}