完善幸运数字首页部分逻辑
This commit is contained in:
@@ -90,6 +90,7 @@ function translateFun() {
|
||||
$('.Hours').html(langReplace(localLang.demoModule.Hours));
|
||||
$('.Mins').html(langReplace(localLang.demoModule.Mins));
|
||||
$('.Secs').html(langReplace(localLang.demoModule.Secs));
|
||||
$('.Congratulations').html(langReplace(localLang.demoModule.Congratulations));
|
||||
|
||||
|
||||
}
|
||||
@@ -121,14 +122,19 @@ function getData() {
|
||||
`
|
||||
$('.top_bg .tip_chang .tip_txt').html(str)
|
||||
}
|
||||
// 补零- 自己投的幸运数字
|
||||
res.data.numberList.forEach((item,index) => {
|
||||
if (String(item).length == 1) {
|
||||
res.data.numberList[index] = '0' + item;
|
||||
}
|
||||
})
|
||||
|
||||
// 幸运数字个位数情况
|
||||
if (res.data.luckyNumber) {
|
||||
if (String(res.data.luckyNumber).length == 1) {
|
||||
res.data.luckyNumber = '0' + res.data.luckyNumber
|
||||
}
|
||||
|
||||
// 关闭数字滚动动画
|
||||
// pauseAnimation(res.data);
|
||||
// 如果中奖了则数字高亮
|
||||
let numStr = '';
|
||||
res.data.numberList.forEach((item, index) => {
|
||||
if (item == res.data.luckyNumber) {
|
||||
@@ -150,6 +156,7 @@ function getData() {
|
||||
const initialTime = formatTime(totalSeconds);
|
||||
updateCountdownDisplay(initialTime);
|
||||
pauseCountdown();
|
||||
// 倒计时不为0时 开始倒计时
|
||||
if (totalSeconds != 0) {
|
||||
localStorage.setItem("displayStatus", JSON.stringify(false));
|
||||
// 开始倒计时
|
||||
@@ -215,7 +222,8 @@ function pauseAnimation(obj) {
|
||||
$('.popup_congratulations').show();
|
||||
// 阻止背景滚动
|
||||
$('body').css('overflow', 'hidden');
|
||||
$('.popup_congratulations .popup_content .detail_txt .date').text(obj.date)
|
||||
$('.popup_congratulations .popup_content .detail_txt ').text(langReplace(localLang.demoModule.Congratulations_txt(obj.date)))
|
||||
|
||||
localStorage.setItem("displayStatus", JSON.stringify(true));
|
||||
} else {
|
||||
localStorage.setItem("displayStatus", JSON.stringify(true));
|
||||
|
@@ -2,7 +2,9 @@
|
||||
langAr = {
|
||||
// 模块
|
||||
demoModule: {
|
||||
describe_txt:'أدخل رقماً بين 01-99، وإذا كان مطابقاً لرقم مولستار، يمكنك مشاركة مجموعة العملات المعدنية!',
|
||||
layerIndex1: "جارٍ التحميل...",
|
||||
layerIndex2: "نجاح",
|
||||
describe_txt:'أدخل رقماً بين 00-99، وإذا كان مطابقاً لرقم مولستار، يمكنك مشاركة مجموعة العملات المعدنية!',
|
||||
reward_txt:'شارك لمشاركة العملات المعدنية واحصل على ميداليات الحظ.',
|
||||
Share:'شارك',
|
||||
My_Fortunate_Numbers:'أرقامي المحظوظة',
|
||||
@@ -44,5 +46,9 @@ langAr = {
|
||||
Hours: `ساعات`,
|
||||
Mins: `دقائق`,
|
||||
Secs: `ثواني`,
|
||||
Congratulations:'تهانينا',
|
||||
Congratulations_txt:function (date) {
|
||||
return `تهانينا على فوزك بالعدد ${date} . انطلق واحصل على الجائزة الآن!`;
|
||||
},
|
||||
}
|
||||
}
|
@@ -2,7 +2,9 @@
|
||||
langEn = {
|
||||
// 模块
|
||||
demoModule: {
|
||||
describe_txt:'Enter a number between 01-99 and if it matches a Molistar number, you can share the coin pool!',
|
||||
layerIndex1: `Loading...`,
|
||||
layerIndex2: `Success`,
|
||||
describe_txt:'Enter a number between 00-99 and if it matches a Molistar number, you can share the coin pool!',
|
||||
reward_txt:'Participate to share Coins and get Fortunate Medals.',
|
||||
Share:'Share',
|
||||
My_Fortunate_Numbers:'My Fortunate Numbers',
|
||||
@@ -44,5 +46,9 @@ langEn = {
|
||||
Hours: `Hours`,
|
||||
Mins: `Mins`,
|
||||
Secs: `Secs`,
|
||||
Congratulations:'Congratulations',
|
||||
Congratulations_txt:function (date) {
|
||||
return `Congratulations on becoming the lucky one in the ${date}th issue. Go and receive the reward now!`;
|
||||
},
|
||||
}
|
||||
}
|
@@ -2,7 +2,9 @@
|
||||
langTr = {
|
||||
// 模块
|
||||
demoModule: {
|
||||
describe_txt:'01-99 arasında bir sayı girin ve bir Molistar numarasıyla eşleşirse, jeton havuzunu paylaşabilirsiniz!',
|
||||
layerIndex1: "Yükleniyor...",
|
||||
layerIndex2: "Başarılı",
|
||||
describe_txt:'00-99 arasında bir sayı girin ve bir Molistar numarasıyla eşleşirse, jeton havuzunu paylaşabilirsiniz!',
|
||||
reward_txt:'Madeni Paraları paylaşmak ve Şans Madalyaları kazanmak için katılın.',
|
||||
Share:'Paylaş',
|
||||
My_Fortunate_Numbers:'Şanslı Numaralarım',
|
||||
@@ -44,5 +46,9 @@ langTr = {
|
||||
Hours: `Hours`,
|
||||
Mins: `Mins`,
|
||||
Secs: `Secs`,
|
||||
Congratulations:'Tebrikler',
|
||||
Congratulations_txt:function (date) {
|
||||
return `${date}. sayıda şanslı kişi olduğunuz için tebrikler. Hemen gidip ödülü alın!`;
|
||||
},
|
||||
}
|
||||
}
|
@@ -2,7 +2,9 @@
|
||||
langZh = {
|
||||
// 模塊
|
||||
demoModule: {
|
||||
describe_txt:'輸入 01-99 之間的數字,若與 Molistar 的數字相符,即可分享硬幣池中的硬幣!',
|
||||
layerIndex1: "加载中...",
|
||||
layerIndex2: "成功",
|
||||
describe_txt:'輸入 00-99 之間的數字,若與 Molistar 的數字相符,即可分享硬幣池中的硬幣!',
|
||||
reward_txt:'參與分享金幣並獲得幸運獎牌。',
|
||||
Share:'分享',
|
||||
My_Fortunate_Numbers:'我的幸運號碼',
|
||||
@@ -44,5 +46,10 @@ langZh = {
|
||||
Hours: `Hours`,
|
||||
Mins: `Mins`,
|
||||
Secs: `Secs`,
|
||||
Congratulations:'恭喜',
|
||||
Congratulations_txt:function (date) {
|
||||
return `恭喜您成为${date}期的幸运儿。快去领取奖励吧!`;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user