|
@@ -88,7 +88,7 @@
|
|
|
</div>
|
|
|
<script>
|
|
|
toastr.options.positionClass = 'toast-center-center';
|
|
|
- toastr.options.timeOut = '1500';
|
|
|
+ toastr.options.timeOut = '3000';
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
var baseUrl = 'http://14.18.190.141:1280'
|
|
@@ -139,20 +139,17 @@
|
|
|
success: function (res) {
|
|
|
if(res.status == 0){
|
|
|
myCode = res.data;
|
|
|
- // $('.copy-dialog').animate({top: '1.8rem'},"fast");
|
|
|
- // $('.copy-dialog').show()
|
|
|
- // // $('.copy-mask').show();
|
|
|
- // $('.close').show()
|
|
|
- // document.documentElement.style.overflow='hidden';
|
|
|
if (isIOS) {
|
|
|
operate(`周年庆h5落地页打开${isIOS}`);
|
|
|
}else if(isAndroid) {
|
|
|
operate(`周年庆h5落地页打开${isAndroid}`);
|
|
|
}
|
|
|
download();
|
|
|
- toastr.error(`复制成功`);
|
|
|
+ toastr.error(`领取成功`);
|
|
|
}else{
|
|
|
- toastr.error(res.msg);
|
|
|
+ stopManyClick(() =>{
|
|
|
+ toastr.error(res.msg)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -171,8 +168,13 @@
|
|
|
getCode();
|
|
|
},false);
|
|
|
// 获取验证码接口
|
|
|
+ let flag1 = false // 标志验证码防止重复点击
|
|
|
function getCode() {
|
|
|
let phone = $('.phone-ipt').eq(0).val();
|
|
|
+ if (flag1) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ flag1 = true
|
|
|
phone = phone.replace(/\s+/g,"");
|
|
|
$.ajax({
|
|
|
url: baseUrl + '/api/message/v5/phone/send',
|
|
@@ -186,7 +188,10 @@
|
|
|
cache:false,
|
|
|
success: function (res) {
|
|
|
if(res.status == 0) {
|
|
|
- toastr.error(`验证码已发送`);
|
|
|
+ stopManyClick(() =>{
|
|
|
+ toastr.error(`验证码已发送`);
|
|
|
+ })
|
|
|
+ flag1 = false
|
|
|
isStart = true;
|
|
|
$('.get-code').eq(0).text('60s');
|
|
|
$('.get-code')[0].className = 'get-code get-code-active';
|
|
@@ -236,9 +241,6 @@
|
|
|
if(!reg_tel.test(phone)){
|
|
|
$('.phone-tip').eq(0).css('display', 'block');
|
|
|
}
|
|
|
- // if(phone == '') {
|
|
|
- // $('.phone-tip').eq(0).css('display', 'none');
|
|
|
- // }
|
|
|
if(phone !== '') {
|
|
|
$(".btn-dowlond").attr({"style":"background: #E85A4B;"});
|
|
|
}else{
|
|
@@ -378,6 +380,14 @@
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
+ function stopManyClick(fn) {
|
|
|
+ if (flag) {
|
|
|
+ fn();
|
|
|
+ }
|
|
|
+ flag = false;
|
|
|
+ if (timer) { clearTimeout(timer); }
|
|
|
+ timer = setTimeout(() => { flag = true }, 1500);
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
|