Commit adfc9ba0 by doszhang

dos

parent deb61181
......@@ -95,7 +95,6 @@ preloadimages(preloadImageList, function () {
}
}, 60);
$('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');;
$('input[name=business]').attr('placeholder', '业务号').attr('type', 'tel').attr('maxlength', 10);
$('.page1 .num').html('已有<span class="numbig">' + window.num + '</span>人发起承诺');
......@@ -143,8 +142,6 @@ $(document).ready(function () {
$('.btn-retry').on('click', () => {
$('input[name=btn-upload]').click()
});
//署名输入框限制长度事件
$('.page1 input[name=name]').on('input propertychange', inputLength);
//上传头像确认
$('.page1 .btn-ok').on('click', confirmAvatar);
//检查用户输入后生成海报
......@@ -212,6 +209,18 @@ function checkInfo() {
createPosterLock = false;
return false;
}
if (name.checkIt('name', 8)) {
$('#notification_area').remove();
my_notify('姓名最长为4位哦');
createPosterLock = false;
return false;
}
if (business == '') {
$('#notification_area').remove();
my_notify('请填写业务号');
createPosterLock = false;
return false;
}
if (!business.match(/^\d{10}$/)) {
$('#notification_area').remove();
my_notify('业务号填写有误');
......@@ -286,9 +295,7 @@ function confirmAvatar() {
$('.regulate-block').hide();
}
function inputLength() {
checkIt('name', 8);
}
function inputLength() {}
function bindMc(mc, ctx, myCanvas, img, imgInfo) {
mc.get('pan').set({
......@@ -536,9 +543,11 @@ function checkIt(bind, maxNum) {
}
if (len >= maxNum) {
if (i != v.length - 1) {
$("#" + bind).val(v.substr(0, i + 1))
break;
return false;
} else {
return true;
}
}
}
}
\ No newline at end of file
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