Commit 59e8e9ca by doszhang

dos

parent 742b9a0a
...@@ -65,6 +65,8 @@ let noInfo = { ...@@ -65,6 +65,8 @@ let noInfo = {
height: 12 height: 12
} }
let createPosterLock = false;
preloadimages(preloadImageList, function () { preloadimages(preloadImageList, function () {
$('.page1').show(); $('.page1').show();
$('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');; $('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');;
...@@ -131,6 +133,8 @@ function backToHome() { ...@@ -131,6 +133,8 @@ function backToHome() {
} }
function checkInfo() { function checkInfo() {
if (!createPosterLock) {
createPosterLock = true;
let name = $('input[name=name]').val(); let name = $('input[name=name]').val();
let business = $('input[name=business]').val(); let business = $('input[name=business]').val();
// name = '张三三'; // name = '张三三';
...@@ -138,19 +142,23 @@ function checkInfo() { ...@@ -138,19 +142,23 @@ function checkInfo() {
if (name.match(/^\s*$/)) { if (name.match(/^\s*$/)) {
$('#notification_area').remove(); $('#notification_area').remove();
my_notify('请填写姓名'); my_notify('请填写姓名');
createPosterLock = false;
return false; return false;
} }
if (!business.match(/^\d{10}$/)) { if (!business.match(/^\d{10}$/)) {
$('#notification_area').remove(); $('#notification_area').remove();
my_notify('业务号填写有误'); my_notify('业务号填写有误');
createPosterLock = false;
return false; return false;
} }
if ($('input[name=btn-upload]').val() == '') { if ($('input[name=btn-upload]').val() == '') {
$('#notification_area').remove(); $('#notification_area').remove();
my_notify('请上传头像'); my_notify('请上传头像');
createPosterLock = false;
return false; return false;
} }
createPoster(name, business); createPoster(name, business);
}
} }
function createPoster(name, business) { function createPoster(name, business) {
...@@ -191,6 +199,7 @@ function createPoster(name, business) { ...@@ -191,6 +199,7 @@ function createPoster(name, business) {
$('.page1').hide(); $('.page1').hide();
$('.poster-page').show(); $('.poster-page').show();
$('#notification_area').remove(); $('#notification_area').remove();
createPosterLock = false;
}, 500); }, 500);
} }
......
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