修复动效和榜单bug

This commit is contained in:
Dragon
2023-08-15 17:11:50 +08:00
parent 4f5a4bd2f1
commit 7c0ec3a053
2 changed files with 7 additions and 5 deletions

View File

@@ -291,15 +291,14 @@ var parser4;
function svga1Fun (id) {
var parser = id == 1 ? parser1 : id == 2 ? parser2 : id == 3 ? parser3 : parser4;
var player = id == 1 ? player1 : id == 2 ? player2 : id == 3 ? player3 : player4;
$(`.page2 .blessingTree .blessingTreeSvga${id}`).show();
setTimeout(function () {
parser.load(`./images/blessingTree1.svga`, function (videoItem) {
$(`.page2 .blessingTree .blessingTreeSvga${id}`).show();
$(`.page2 .blessingTree .lantern${id}`).hide();
}, 200)
parser.load('./images/blessingTree.svga', function (videoItem) {
player.loops = 1;
player1.clearsAfterStop = false;
player.setVideoItem(videoItem);
player.startAnimation();
player.setContentMode('AspectFill')
player.setContentMode('AspectFill');
player.onFinished(() => {
$(`.page2 .blessingTree .lantern${id}`).show();
$(`.page2 .blessingTree .blessingTreeSvga${id}`).hide();
@@ -736,6 +735,7 @@ function getzf (num) {
// 七夕榜單tab切換
var type = 'a';//a:甜蜜b:心動
$('.page4 .page4Tab div').click(function () {
$('.page4 .timeList').show();
$('.page4 .dayAll').removeClass('dayAll2');
var i = $(this).index() + 1;
if (i == 1) {
@@ -765,12 +765,14 @@ $('.page4 .dayAll div').click(function () {
$('.page4 .dayAll').removeClass('dayAll2');
rankType = type == "a" ? 1 : 3;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
data = null;
$('.page4 ul').css('margin','6rem auto 2rem');
getRank(data, rankType);
$('.page4 .timeList').show();
} else {
$('.page4 .dayAll').addClass('dayAll2');
rankType = type == "a" ? 2 : 4;//排行榜類型1=甜蜜日榜2=甜蜜總榜3=愛意日榜4=愛意總榜)
data = null;
$('.page4 ul').css('margin','7rem auto 2rem');
getRank(data, rankType);
$('.page4 .timeList').hide();
}