Commit 222718a3 by kubisk

dos

parent 2038c498
...@@ -99,7 +99,7 @@ $(document).ready(function () { ...@@ -99,7 +99,7 @@ $(document).ready(function () {
bindUpload(this, uploadCtx, uploadCanvas, 1, function (img, imgInfo) { bindUpload(this, uploadCtx, uploadCanvas, 1, function (img, imgInfo) {
$('.btn-upload-block').css('left', '53px'); $('.btn-upload-block').css('left', '53px');
$('.btn-createposter').show(); $('.btn-createposter').show();
$('.upload-before').show(); $('.upload-before').hide();
$('.upload-after').show(); $('.upload-after').show();
var mc = new Hammer($('#uploadCanvas').get(0)); var mc = new Hammer($('#uploadCanvas').get(0));
bindMc(mc, uploadCtx, uploadCanvas, img, imgInfo); bindMc(mc, uploadCtx, uploadCanvas, img, imgInfo);
...@@ -142,30 +142,36 @@ function checkInfo() { ...@@ -142,30 +142,36 @@ function checkInfo() {
my_notify('请填写工号'); my_notify('请填写工号');
return false; return false;
} }
$.ajax({ level = '1';
url: '/index/getInfo', username = '张三';
type: 'POST', company = '北京';
data: { toUploadPage();
name: name, $('.username').text(username);
code: code $('.company').html('中信保诚人寿<br/>' + company + '分公司');
}, // $.ajax({
success: function (resp) { // url: '/index/getInfo',
if (resp.status == 1) { // type: 'POST',
level = resp.poster; // data: {
username = name; // name: name,
company = resp.branch; // code: code
toUploadPage(); // },
$('.username').text(username); // success: function (resp) {
$('.company').html('中信保诚人寿<br/>' + company + '分公司'); // if (resp.status == 1) {
setShare(); // level = resp.poster;
// username = name;
} else { // company = resp.branch;
$('#notification_area').remove(); // toUploadPage();
my_notify(resp.msg); // $('.username').text(username);
return false; // $('.company').html('中信保诚人寿<br/>' + company + '分公司');
} // setShare();
}
}) // } else {
// $('#notification_area').remove();
// my_notify(resp.msg);
// return false;
// }
// }
// })
} }
function setShare() { function setShare() {
...@@ -239,46 +245,7 @@ function backToHome() { ...@@ -239,46 +245,7 @@ function backToHome() {
$('.page1').show(); $('.page1').show();
} }
// function checkInfo() {
// if (!createPosterLock) {
// createPosterLock = true;
// let name = $('input[name=name]').val();
// let business = $('input[name=business]').val();
// // name = '张三三';
// // business = '1234567890';
// if (name.match(/^\s*$/)) {
// $('#notification_area').remove();
// my_notify('请填写姓名');
// createPosterLock = false;
// return false;
// }
// if (!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('业务号填写有误');
// createPosterLock = false;
// return false;
// }
// if ($('input[name=btn-upload]').val() == '') {
// $('#notification_area').remove();
// my_notify('请上传头像');
// createPosterLock = false;
// return false;
// }
// createPoster(name, business);
// }
// }
function createPoster() { function createPoster() {
$('#notification_area').remove(); $('#notification_area').remove();
......
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