Commit deb61181 by doszhang

dos

parent 16eaaa4d
...@@ -69,20 +69,32 @@ let noInfo = { ...@@ -69,20 +69,32 @@ let noInfo = {
let createPosterLock = false; let createPosterLock = false;
$('.loading-page').show(); $('.loading-page').show();
preloadimages(preloadImageList, function () { preloadimages(preloadImageList, function () {
if (browser.versions.weixin) { let progress = 0.3;
let musicTime = setInterval(function () { let timer = setInterval(function () {
if ($('#music')[0].currentTime > 0) { if (progress < 1) {
progress += 0.05;
$('.loading-page .loading-text').text(Math.floor(progress * 100) + '%');
$('.loading-page .progress').css('width', 368 * progress + 'px');
$('.loading-page .plant').css('transform', 'translateX(' + (-368 + (368 * progress)) + 'px)');
} else {
clearInterval(timer);
if (browser.versions.weixin) {
let musicTime = setInterval(function () {
if ($('#music')[0].currentTime > 0) {
initPage();
$('.loading-page').hide();
$('.page1').show();
clearInterval(musicTime);
}
}, 100);
} else {
initPage(); initPage();
$('.loading-page').hide(); $('.loading-page').hide();
$('.page1').show(); $('.page1').show();
clearInterval(musicTime);
} }
}, 100); }
} else { }, 60);
initPage();
$('.loading-page').hide();
$('.page1').show();
}
$('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');; $('input[name=name]').attr('placeholder', '姓名').attr('id', 'name');;
$('input[name=business]').attr('placeholder', '业务号').attr('type', 'tel').attr('maxlength', 10); $('input[name=business]').attr('placeholder', '业务号').attr('type', 'tel').attr('maxlength', 10);
...@@ -94,6 +106,7 @@ preloadimages(preloadImageList, function () { ...@@ -94,6 +106,7 @@ preloadimages(preloadImageList, function () {
uploadCtx = canvasinfo[1]; uploadCtx = canvasinfo[1];
}, function (progress) { }, function (progress) {
progress = progress * 0.3;
$('.loading-page .loading-text').text(Math.floor(progress * 100) + '%'); $('.loading-page .loading-text').text(Math.floor(progress * 100) + '%');
$('.loading-page .progress').css('width', 368 * progress + 'px'); $('.loading-page .progress').css('width', 368 * progress + 'px');
$('.loading-page .plant').css('transform', 'translateX(' + (-368 + (368 * progress)) + 'px)'); $('.loading-page .plant').css('transform', 'translateX(' + (-368 + (368 * progress)) + 'px)');
......
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