xiuli.gao 6 years ago
parent
commit
4ce0ef9306
1 changed files with 50 additions and 5 deletions
  1. 50 5
      shareBooks/wechatAddSuccess.html

+ 50 - 5
shareBooks/wechatAddSuccess.html

@@ -48,6 +48,15 @@
48 48
 		<img class="userImg" src="image/logo.png" />
49 49
 		<p class="inviting">您已成功加入《<text>旅行账本</text>》<br/>名片:<span>ZYuuu</span></p>
50 50
 		<button class="button" onclick="goApp()">打开app,一起记账</button>
51
+		
52
+		<div class="mask">
53
+			<div class="content">
54
+				<h3>提示</h3>
55
+				<p>密码错误啊啊啊啊啊</p>
56
+				<div onclick="iknow()">我知道了</div>
57
+			</div>
58
+		</div>
59
+		
51 60
 	</body>
52 61
 </html>
53 62
 <script type="text/javascript" src="public/jquery-2.1.0.js"></script>
@@ -57,24 +66,60 @@
57 66
 		document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth/375) + "px";
58 67
 } 
59 68
 
69
+	
60 70
 	var appUrl = null;
61 71
 	var avatar = '';
62
-	var book_name = '';
72
+	var book_name = '金牛记账';
63 73
 	var user_name = '';
64
-	appUrl = localStorage.getItem('appUrl')
65
-	avatar = localStorage.getItem('avatar')
66
-	book_name = localStorage.getItem('book_name')
67
-	user_name = localStorage.getItem('user_name')
74
+	var message = '';
75
+	var code = '';
76
+	var str=location.href;  //取得整个地址栏
77
+    var num=str.indexOf("?"); 
78
+    str=str.substr(num+1); //str得到?之后的字符串
79
+    var brr=str.split("&");
80
+	for(var i = 0 ; i<brr.length; i++){
81
+    	if(brr[i].indexOf('code') != -1){
82
+    		code = brr[i].split('=')[1];
83
+    	}
84
+    	if(brr[i].indexOf('avatar') != -1){
85
+    		avatar = brr[i].split('=')[1];
86
+    	}
87
+    	if(brr[i].indexOf('userName') != -1){
88
+    		user_name = brr[i].split('=')[1];
89
+    		user_name = decodeURI(user_name);
90
+    	}
91
+    	if(brr[i].indexOf('bookName') != -1){
92
+    		book_name = brr[i].split('=')[1];
93
+    		book_name = decodeURI(book_name);
94
+    	}
95
+    	if(brr[i].indexOf('message') != -1){
96
+    		message = brr[i].split('=')[1];
97
+    		message = decodeURI(message);
98
+    	}
99
+    	if(brr[i].indexOf('appUrl') != -1){
100
+    		appUrl = brr[i].split('=')[1];
101
+    	}
102
+   }
68 103
 	
69 104
 	window.onload = function (){
105
+		$(".mask").css("visibility","visible");
106
+		$(".content p").html(message);
70 107
 		if(avatar == "null" || avatar == ""){
71 108
 			$(".userImg").attr("src","image/logo.png");
72 109
 		}else{
73 110
 			$(".userImg").attr("src",avatar);
74 111
 		}
112
+		if(code != 0){
113
+			$(".inviting").html(message);
114
+		}
75 115
 		$(".inviting text").html(book_name);
76 116
 		$(".inviting span").html(user_name);
77 117
 	}
118
+	
119
+function iknow () {
120
+	$(".mask").css("visibility","hidden");
121
+}
122
+
78 123
 function goApp () {
79 124
 	if(navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)){
80 125
 		window.location.href=appUrl;