|
@@ -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++) {
|