Commit 12401f2e by doszhang

dos

parent 214e5270
...@@ -157,12 +157,12 @@ function createPoster(name, business) { ...@@ -157,12 +157,12 @@ function createPoster(name, business) {
let oldPosterIndex = nowPosterIndex; let oldPosterIndex = nowPosterIndex;
nowPosterIndex = RandomNumBoth(1, 3, oldPosterIndex); nowPosterIndex = RandomNumBoth(1, 3, oldPosterIndex);
console.log('nowPosterIndex:', nowPosterIndex); console.log('nowPosterIndex:', nowPosterIndex);
$('.poster-canvas').html(''); $('.poster-canvas canvas').remove();
let canvasinfo = initCanvas('.poster-canvas', 'posterCanvas', 425 * 2, 820 * 2); let canvasinfo = initCanvas('.poster-canvas', 'posterCanvas', 425 * 2, 820 * 2);
posterCanvas = canvasinfo[0]; posterCanvas = canvasinfo[0];
posterCtx = canvasinfo[1]; posterCtx = canvasinfo[1];
$('.poster-canvas').append('<img class="posterimg" />');
var posterObj = new Image(); var posterObj = new Image();
posterObj.src = '/Public/static/image2/poster' + nowPosterIndex + '.jpg'; posterObj.src = '/Public/static/image2/poster' + nowPosterIndex + '.jpg';
...@@ -182,6 +182,8 @@ function createPoster(name, business) { ...@@ -182,6 +182,8 @@ function createPoster(name, business) {
drawNum(); drawNum();
}, 200); }, 200);
setTimeout(function () { setTimeout(function () {
$('.poster-canvas .posterimg').remove();
$('.poster-canvas').append('<img class="posterimg" />');
$('.posterimg').attr('src', getManBase64(posterCanvas)); $('.posterimg').attr('src', getManBase64(posterCanvas));
$('.page1').hide(); $('.page1').hide();
$('.poster-page').show(); $('.poster-page').show();
......
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