Commit d78a521c by doszhang

dos

parent ff42db25
...@@ -66,6 +66,8 @@ let answerArr = []; ...@@ -66,6 +66,8 @@ let answerArr = [];
let watchedQuestion = [1]; let watchedQuestion = [1];
//结果 //结果
let resultType = 8; let resultType = 8;
//提交信息按钮防抖
let submit = true;
//记录初始状态下fontsize //记录初始状态下fontsize
const fontSize = parseFloat($('html').css('fontSize')); const fontSize = parseFloat($('html').css('fontSize'));
...@@ -146,6 +148,8 @@ $(document).ready(function () { ...@@ -146,6 +148,8 @@ $(document).ready(function () {
}); });
function submit() { function submit() {
if (submit) {
submit = false;
const name = $('input[name=name]').val(); const name = $('input[name=name]').val();
const tel = $('input[name=tel]').val(); const tel = $('input[name=tel]').val();
...@@ -167,12 +171,19 @@ function submit() { ...@@ -167,12 +171,19 @@ function submit() {
tel: tel tel: tel
}, },
success: function () { success: function () {
$('#notification_area').remove();
my_notify('提交成功', 1500);
setTimeout(function () {
$('.prize-page').hide(); $('.prize-page').hide();
$('.poster-page').show(); $('.poster-page').show();
$('input[name=name]').val(''); $('input[name=name]').val('');
$('input[name=tel]').val(''); $('input[name=tel]').val('');
submit = true;
}, 1500);
} }
}) })
}
} }
function tryprize() { function tryprize() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment