Commit 533580a2 by doszhang

dos

parent 28ab220f

4 KB | W: | H:

4 KB | W: | H:

Public/static/image2/._loading.gif
Public/static/image2/._loading.gif
Public/static/image2/._loading.gif
Public/static/image2/._loading.gif
  • 2-up
  • Swipe
  • Onion skin

59 KB | W: | H:

46.7 KB | W: | H:

Public/static/image2/loading.gif
Public/static/image2/loading.gif
Public/static/image2/loading.gif
Public/static/image2/loading.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,12 +31,12 @@ var picUrl = window.base_resource_url + '/image2/';
var preloadImageList = [
// picUrl + 'share.png',
picUrl + 'colorbar-red.png',
picUrl + 'colorbar-yellow.png',
picUrl + 'colorbar-lightgreen.png',
picUrl + 'colorbar-darkgreen.png',
picUrl + 'colorbar-blue.png',
picUrl + 'colorbar-purple.png',
// picUrl + 'colorbar-red.png',
// picUrl + 'colorbar-yellow.png',
// picUrl + 'colorbar-lightgreen.png',
// picUrl + 'colorbar-darkgreen.png',
// picUrl + 'colorbar-blue.png',
// picUrl + 'colorbar-purple.png',
];
if ($('div').length > 0) {
$.each($('div'), function (index, val) {
......@@ -51,24 +51,24 @@ if ($('div').length > 0) {
$('.loading-page .loading-gif-block').append('<img class="loading-gif" src="' + picUrl + 'loading.gif" />');
$('.loading-page').show();
preloadimages(preloadImageList, function () {
if (browser.versions.weixin) {
let musicTime = setInterval(function () {
if ($('#music')[0].currentTime > 0) {
$('.loading-page').fadeOut();
$('.home-page').fadeIn(300);
$('.home-page .candle-block').addClass('animate');
$('.home-page .btn-next').addClass('animate');
$('.wrap-inner').prepend($('<div class="font">1</div>'));
clearInterval(musicTime);
}
}, 100);
} else {
$('.loading-page').fadeOut();
$('.home-page').fadeIn(300);
$('.home-page .candle-block').addClass('animate');
$('.home-page .btn-next').addClass('animate');
$('.wrap-inner').prepend($('<div class="font">1</div>'));
}
// if (browser.versions.weixin) {
// let musicTime = setInterval(function () {
// if ($('#music')[0].currentTime > 0) {
// $('.loading-page').fadeOut();
// $('.home-page').fadeIn(300);
// $('.home-page .candle-block').addClass('animate');
// $('.home-page .btn-next').addClass('animate');
// $('.wrap-inner').prepend($('<div class="font">1</div>'));
// clearInterval(musicTime);
// }
// }, 100);
// } else {
// $('.loading-page').fadeOut();
// $('.home-page').fadeIn(300);
// $('.home-page .candle-block').addClass('animate');
// $('.home-page .btn-next').addClass('animate');
// $('.wrap-inner').prepend($('<div class="font">1</div>'));
// }
}, function (progress) {
$('.loading-page .loading-text').text(Math.floor(progress * 100) + '%');
......@@ -214,8 +214,8 @@ let wrapNum = 0;
const fontSize = parseFloat($('html').css('fontSize'));
//记录flag选择页的flag模版
// let flagTemplate = $('.flag-page .flag-frame').find('.flag-block').clone();
// $('.flag-frame').html('').addClass('clearfix');
let flagTemplate = $('.flag-page .flag-frame').find('.flag-block').clone();
$('.flag-frame').html('').addClass('clearfix');
//自定义flag的placeholder
......@@ -256,31 +256,9 @@ $(document).ready(function () {
// $('.flag-list-content').attr('id', 'flag-list-content');
// colorbarLeft = $('.colorbar').offset().left;
// new Sortable(document.getElementById('flag-list-content'), {
// animation: 150,
// ghostClass: 'flag-sortable-ghost',
// chosenClass: "flag-sortable-active",
// delay: 100,
// direction: 'horizontal',
// onChoose: function (event) {
// const dragEl = $(event.item);
// dragEl.find('.btn-checked-item-delete').css('color', '#fcfcfd');
// },
// onChange: function (event) {
// const dragEl = $(event.item);
// swapArray(flagStack, event.oldIndex, event.newIndex);
// const nodeList = $('.flag-list-content .checked-item:not(.sortable-drag)');
// $('.sortable-drag').find('.checked-flag-no').text(event.newIndex + 1);
// for (let i = 0; i < nodeList.length; i++) {
// $(nodeList[i]).find('.checked-flag-no').text(i + 1);
// }
// },
// onEnd: function (event) {
// const dragEl = $(event.item);
// dragEl.find('.btn-checked-item-delete').css('color', '#c30101');
// }
// });
//调整flag顺序页面初始化排序插件
// createFlagListSort();
//跳转到page1
$('.home-page .btn-next').on('click', showPage1);
......@@ -360,6 +338,33 @@ $(document).ready(function () {
});
function createFlagListSort() {
new Sortable(document.getElementById('flag-list-content'), {
animation: 150,
ghostClass: 'flag-sortable-ghost',
chosenClass: "flag-sortable-active",
delay: 100,
direction: 'horizontal',
onChoose: function (event) {
const dragEl = $(event.item);
dragEl.find('.btn-checked-item-delete').css('color', '#fcfcfd');
},
onChange: function (event) {
const dragEl = $(event.item);
swapArray(flagStack, event.oldIndex, event.newIndex);
const nodeList = $('.flag-list-content .checked-item:not(.sortable-drag)');
$('.sortable-drag').find('.checked-flag-no').text(event.newIndex + 1);
for (let i = 0; i < nodeList.length; i++) {
$(nodeList[i]).find('.checked-flag-no').text(i + 1);
}
},
onEnd: function (event) {
const dragEl = $(event.item);
dragEl.find('.btn-checked-item-delete').css('color', '#c30101');
}
});
}
function setCustomizeVal() {
if ($('input[name=customize-flag]').val() == '也能在这里写下你的Flag哦' ||
$('input[name=customize-flag]').val().match(/^\s*$/)) {
......
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