Commit 5835703b by doszhang

dos

parent f6fa467d
...@@ -118,10 +118,25 @@ $(document).ready(function () { ...@@ -118,10 +118,25 @@ $(document).ready(function () {
}); });
function toUploadPage() { function toUploadPage() {
checkInfo();
$('.page1').hide(); $('.page1').hide();
$('.upload-page').show(); $('.upload-page').show();
} }
function checkInfo() {
let name = $('input[name=name]').val();
let code = $('input[name=job-number]').val();
if (name.match(/^\s*$/)) {
$('#notification_area').remove();
my_notify('请填写姓名');
return false;
} else if (code.match(/^\s*$/)) {
$('#notification_area').remove();
my_notify('请填写工号');
return false;
}
}
function initPage() { function initPage() {
const transformTop = Math.abs(parseFloat(getTranslateDistance())); const transformTop = Math.abs(parseFloat(getTranslateDistance()));
// $('.top').css('top', transformTop + 'px'); // $('.top').css('top', transformTop + 'px');
...@@ -130,7 +145,7 @@ function initPage() { ...@@ -130,7 +145,7 @@ function initPage() {
// bottom: transformTop + 'px' // bottom: transformTop + 'px'
// }); // });
const displacement = parseFloat(transformTop); const displacement = parseFloat(getTranslateDistance());
if (displacement > 0) { if (displacement > 0) {
const scale = document.documentElement.clientHeight / $('.page').height(); const scale = document.documentElement.clientHeight / $('.page').height();
$('.wrap-inner').css({ $('.wrap-inner').css({
......
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