抽奖相关

This commit is contained in:
zhx 2026-06-24 13:47:47 +08:00
parent c6837f2f6b
commit f88ace4673
9 changed files with 41 additions and 19 deletions

View File

@ -11,7 +11,7 @@
rel="stylesheet"
href="../../common/theme.css?v=20260618-wheel-batch2"
/>
<link rel="stylesheet" href="./style.css?v=20260618-wheel-batch2" />
<link rel="stylesheet" href="./style.css?v=20260624-reward-total" />
</head>
<body>
<div id="app" v-cloak>
@ -365,21 +365,25 @@
{{ replaceOne('rewardTips',
active.currentReward.rewardValue) }}
</p> -->
<div
v-if="rewardTotalValue(active.currentReward) > 0"
class="reward-total"
>
<span class="reward-total-label">
{{ t('totalRewards') }}
</span>
<span class="reward-total-value">
<img :src="asset('gold_new.png')" alt="" />
<span
v-text="rewardTotalText(active.currentReward)"
></span>
</span>
</div>
<button
class="again-btn"
type="button"
@click="startLottery"
>
<span
v-if="rewardTotalValue(active.currentReward) > 0"
class="again-total"
>
<img :src="asset('gold_new.png')" alt="" />
<span
class="again-total-value"
v-text="rewardTotalText(active.currentReward)"
></span>
</span>
<span
class="again-label"
v-text="t('drawAgain')"
@ -431,6 +435,6 @@
<script src="../../common/api.js?v=20260618-wheel-batch2"></script>
<script src="../../common/toast.js?v=20260618-wheel-batch2"></script>
<script src="../../common/effect-player.js?v=20260618-wheel-batch2"></script>
<script src="./script.js?v=20260618-wheel-batch2"></script>
<script src="./script.js?v=20260624-reward-total"></script>
</body>
</html>

View File

@ -18,6 +18,7 @@
rewardTips:
'Congratulations on receiving: A precious gift worth {} gold coins! Already put in the backpack',
drawAgain: 'Draw again',
totalRewards: 'total rewards:',
userAward: 'Congratulations to {1} for receiving the {2} award',
rule1: '1. Select a wheel and draw with coins.',
rule2: '2. Rewards are issued to the backpack after a successful draw.',

View File

@ -841,8 +841,6 @@ button {
flex: 0 0 auto;
align-items: center;
justify-content: center;
flex-direction: column;
gap: calc(2 * var(--wheel-vw));
width: 85%;
height: calc(56 * var(--wheel-vw));
margin: calc(8 * var(--wheel-vw)) auto 0;
@ -856,13 +854,14 @@ button {
background: linear-gradient(to right, #1897ff, #2472ff);
}
.again-total {
.reward-total {
display: flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
max-width: 92%;
width: 85%;
gap: calc(4 * var(--wheel-vw));
overflow: hidden;
margin: calc(8 * var(--wheel-vw)) auto 0;
color: #fff35a;
font-size: calc(13 * var(--wheel-vw));
font-weight: 800;
@ -871,13 +870,25 @@ button {
rgba(116, 38, 0, 0.7);
}
.again-total img {
.reward-total-label,
.reward-total-value {
min-width: 0;
}
.reward-total-value {
display: flex;
align-items: center;
gap: calc(4 * var(--wheel-vw));
overflow: hidden;
}
.reward-total img {
width: calc(16 * var(--wheel-vw));
height: calc(16 * var(--wheel-vw));
flex: 0 0 auto;
}
.again-total span {
.reward-total-value span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

View File

@ -73,6 +73,7 @@
"wheel.historyRecord": "سجل التاريخ",
"wheel.rewardTips": "تهانينا على استلام: هدية ثمينة بقيمة {} قطعة ذهبية! وُضعت في حقيبة الظهر.",
"wheel.drawAgain": "اسحب مرة أخرى.",
"wheel.totalRewards": "إجمالي المكافآت:",
"wheel.userAward": "تهانينا لـ {1} على حصوله على جائزة {2}",
"wheel.roomId": "لا يمكن أن يكون معرف الغرفة فارغًا",
"wheel.rule1": "1. اختر عجلة واسحب باستخدام العملات.",

View File

@ -73,6 +73,7 @@
"wheel.historyRecord": "History Record",
"wheel.rewardTips": "Congratulations on receiving: A precious gift worth {} gold coins! Already put in the backpack",
"wheel.drawAgain": "Draw again",
"wheel.totalRewards": "total rewards:",
"wheel.userAward": "Congratulations to {1} for receiving the {2} award",
"wheel.roomId": "Room ID cannot be empty",
"wheel.rule1": "1. Select a wheel and draw with coins.",

View File

@ -73,6 +73,7 @@
"wheel.historyRecord": "Historial",
"wheel.rewardTips": "Felicidades por recibir: un regalo valioso de {} monedas de oro. Ya está en la mochila",
"wheel.drawAgain": "Girar otra vez",
"wheel.totalRewards": "recompensas totales:",
"wheel.userAward": "Felicidades a {1} por recibir el premio {2}",
"wheel.roomId": "El ID de la sala no puede estar vacío",
"wheel.rule1": "1. Selecciona una rueda y gira con monedas.",

View File

@ -40,6 +40,7 @@
"wheel.historyRecord": "Riwayat Hadiah",
"wheel.rewardTips": "Selamat mendapatkan: hadiah bernilai {} koin emas! Sudah masuk ke backpack",
"wheel.drawAgain": "Undi lagi",
"wheel.totalRewards": "total hadiah:",
"wheel.userAward": "Selamat kepada {1} karena menerima hadiah {2}",
"wheel.roomId": "ID room tidak boleh kosong",
"wheel.rule1": "1. Pilih wheel dan undi dengan koin.",

View File

@ -40,6 +40,7 @@
"wheel.historyRecord": "Tarih Kaydı",
"wheel.rewardTips": "Aldığınız için tebrikler: {} altın değerinde değerli bir hediye! Zaten sırt çantasına koydum",
"wheel.drawAgain": "Tekrar çekiliş",
"wheel.totalRewards": "toplam ödül:",
"wheel.userAward": "{1}'i {2} ödülünü aldığı için tebrik ederiz",
"wheel.roomId": "Oda kimliği boş olamaz",
"wheel.rule1": "1. Bir çark seçin ve coin ile çekiliş yapın.",

View File

@ -40,6 +40,7 @@
"wheel.historyRecord": "中奖历史",
"wheel.rewardTips": "恭喜获得:价值 {} 金币的珍贵礼物!已放入背包",
"wheel.drawAgain": "再抽一次",
"wheel.totalRewards": "奖励总计:",
"wheel.userAward": "恭喜 {1} 获得 {2} 奖励",
"wheel.roomId": "房间 ID 不能为空",
"wheel.rule1": "1. 选择转盘并消耗金币抽奖。",