Commit c3fcd7d8 by doszhang

dos

parent 76c05635
...@@ -67,6 +67,13 @@ let noInfo = { ...@@ -67,6 +67,13 @@ let noInfo = {
let createPosterLock = false; let createPosterLock = false;
let level = 0;
preloadimages(preloadImageList, function () { preloadimages(preloadImageList, function () {
initPage(); initPage();
$('.page1').show(); $('.page1').show();
...@@ -75,9 +82,9 @@ preloadimages(preloadImageList, function () { ...@@ -75,9 +82,9 @@ preloadimages(preloadImageList, function () {
$('input[name=job-number]').attr('placeholder', '请输入工号').attr('type', 'tel'); $('input[name=job-number]').attr('placeholder', '请输入工号').attr('type', 'tel');
// blackUrl = $('.black').css('background-image').replace(/^url\((['"]?)(.*)\1\)$/, '$2'); // blackUrl = $('.black').css('background-image').replace(/^url\((['"]?)(.*)\1\)$/, '$2');
// $('.black').css('background-image', 'none'); // $('.black').css('background-image', 'none');
// let canvasinfo = initCanvas('.black', 'uploadCanvas', 259, 259); let canvasinfo = initCanvas('.upload-canvas-block', 'uploadCanvas', 640, 1238);
// uploadCanvas = canvasinfo[0]; uploadCanvas = canvasinfo[0];
// uploadCtx = canvasinfo[1]; uploadCtx = canvasinfo[1];
}, function (progress) {}); }, function (progress) {});
...@@ -93,17 +100,16 @@ $(document).ready(function () { ...@@ -93,17 +100,16 @@ $(document).ready(function () {
//提交信息 //提交信息
$('.page1 .btn-next').on('click', checkInfo); $('.page1 .btn-next').on('click', checkInfo);
// $('input[name=btn-upload]').change(function () { $('input[name=btn-upload]').change(function () {
// $('.regulate-block').show(); imgInfo = {};
// imgInfo = {}; img = '';
// img = ''; bindUpload(this, uploadCtx, uploadCanvas, 1, function (img) {
// bindUpload(this, uploadCtx, uploadCanvas, 1, function (img) { avatar = img;
// avatar = img; 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); }, imgInfo);
// }, imgInfo); return false;
// return false; });
// });
// $('.btn-retry').on('click', () => { // $('.btn-retry').on('click', () => {
// $('input[name=btn-upload]').click() // $('input[name=btn-upload]').click()
// }); // });
...@@ -143,6 +149,7 @@ function checkInfo() { ...@@ -143,6 +149,7 @@ function checkInfo() {
}, },
success: function (resp) { success: function (resp) {
if (resp.status == 1) { if (resp.status == 1) {
level = resp.poster;
toUploadPage(); toUploadPage();
} else { } else {
$('#notification_area').remove(); $('#notification_area').remove();
...@@ -531,7 +538,6 @@ function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) { ...@@ -531,7 +538,6 @@ function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
canvasWidth = pxToRem(canvasWidth); canvasWidth = pxToRem(canvasWidth);
canvasHeight = pxToRem(canvasHeight); canvasHeight = pxToRem(canvasHeight);
} }
black = loadedImages[blackUrl];
$(target).append($('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>')); $(target).append($('<canvas id="' + id + '" width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>'));
canvas = $('#' + id)[0]; canvas = $('#' + id)[0];
ctx = canvas.getContext("2d"); ctx = canvas.getContext("2d");
......
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