Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
ccb-lantern
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
533580a2
authored
Jan 28, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
28ab220f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
50 deletions
+55
-50
Public/static/image2/._loading.gif
+0
-0
Public/static/image2/loading.gif
+0
-0
Public/static/js/common.js
+55
-50
No files found.
Public/static/image2/._loading.gif
View file @
533580a2
4 KB
|
W:
|
H:
4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Public/static/image2/loading.gif
View file @
533580a2
59 KB
|
W:
|
H:
46.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Public/static/js/common.js
View file @
533580a2
...
...
@@ -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
*$/
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment