heyang 4 éve%!(EXTRA string=óta)
szülő
commit
078822d5de

+ 13 - 8
microserviceUserH5/vcloud/invite.html

@@ -85,6 +85,7 @@
 		var n2 = loc.indexOf("=");//取得=号的位置
 		// var id = loc.substr(n2 + 1, n1 - n2);//从=号后面的内容
 		var id = loc.substr(n2 + 1, n1 - n2);//从=号后面的内容
+		
 
 		var u = navigator.userAgent;
 		var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
@@ -102,17 +103,21 @@
 				$('#invitationCode').text(res.data.invitationCode)
 				//加载数据
 				$('#passwordCopy').val($('#invitationCode').text());
-
 				//复制按钮
+				let timer,flag = true;
 				$('.btn-code-copy').on('click', function () {
-					var input = document.getElementById("passwordCopy");
-					// 选中文本
-					input.select();
-					// 执行浏览器复制命令
-					document.execCommand("copy");
-					toastr.error('复制成功', 0)
+					if (flag) {
+						var input = document.getElementById("passwordCopy");
+						// 选中文本
+						input.select();
+						// 执行浏览器复制命令
+						document.execCommand("copy");
+						toastr.error('复制成功', 0)
+					}
+					flag = false;
+					if(timer){clearTimeout(timer);}
+					timer = setTimeout(() => {flag = true}, 1000);
 				});
-
 				if (res.data.friendList.length > 0) {
 					var str = ''
 					for (var i = 0; i < res.data.friendList.length; i++) {

+ 10 - 2
microserviceUserH5/vcloud/register.html

@@ -57,6 +57,7 @@
 	<script type="text/javascript" th:inline="javascript">
 		var parameters = GetRequest();
 		var phone = parameters["phone"];
+		var timer, flag = true;
 		$("#recv_ipt").val(phone ? phone : '');
 
 
@@ -114,7 +115,7 @@
 					var imageType = xhr.getResponseHeader("Content-Type");
         	var blob = new Blob([res], { type: imageType });
 					var imageUrl = (window.URL || window.webkitURL).createObjectURL(blob);
-        	$('.head img').attr('src', imageUrl);
+        	$('.head img').attr('src', imageUrl || '/static/img/register/tuoguan_icon.png');
 				}
 			})
 		}
@@ -128,8 +129,15 @@
   	}
 
 		getUserInfo();
-
 		function handleClick() {
+			if (flag) {
+				result();
+			}
+			flag = false;
+			if(timer){clearTimeout(timer);}
+			timer = setTimeout(() => {flag = true}, 2000);
+		}
+		function result() {
 			var time = new Date().getTime()
 			var data = {}
 			data.userName = parameters['username'] ? parameters['username'] : null