mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
sdfgef dgsdf
This commit is contained in:
@@ -150,9 +150,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</Slide>
|
</Slide>
|
||||||
</Carousel>
|
</Carousel>
|
||||||
<!-- <button @click="stopCarousel">
|
<button @click="stopCarousel">
|
||||||
Остановить автопрокрутку
|
Остановить автопрокрутку
|
||||||
</button> -->
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -190,7 +190,6 @@ import { Carousel, Slide } from "vue3-carousel";
|
|||||||
import "vue3-carousel/dist/carousel.css";
|
import "vue3-carousel/dist/carousel.css";
|
||||||
|
|
||||||
import { eventBus } from "@/main";
|
import { eventBus } from "@/main";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
@@ -205,38 +204,50 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
JackpotNumbers,
|
JackpotNumbers,
|
||||||
autoplay: 0,
|
autoplay: 20,
|
||||||
// slides: [
|
slides: [
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Hepatir.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Hepatir",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Hepatir.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Hepatir",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Ckutls_",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Ckutls_",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Ckutls_",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
img: "https://avatar.spworlds.ru/face/55/Hepatir.png",
|
||||||
// nickname: "Ckutls_",
|
nickname: "Hepagfdtir",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// img: "https://avatar.spworlds.ru/face/55/Hepatir.png",
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
// nickname: "Hepatir",
|
nickname: "Ckutls_",
|
||||||
// },
|
},
|
||||||
// ],
|
{
|
||||||
slides: [],
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
|
nickname: "Ckutls_",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: "https://avatar.spworlds.ru/face/55/Ckutls_.png",
|
||||||
|
nickname: "Ckutls_",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: "https://avatar.spworlds.ru/face/55/Hepatir.png",
|
||||||
|
nickname: "Hepgdfatir",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// slides: [],
|
||||||
currentSlide: 0,
|
currentSlide: 0,
|
||||||
value: 0,
|
value: 0,
|
||||||
max: 100,
|
max: 100,
|
||||||
@@ -258,6 +269,12 @@ export default {
|
|||||||
players.forEach((player) => {
|
players.forEach((player) => {
|
||||||
const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка
|
const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка
|
||||||
for (let i = 0; i < numberOfCards; i++) {
|
for (let i = 0; i < numberOfCards; i++) {
|
||||||
|
if (i==0) {
|
||||||
|
this.slides.push({
|
||||||
|
img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя
|
||||||
|
nickname: player.UserName,
|
||||||
|
})
|
||||||
|
}
|
||||||
this.slides.push({
|
this.slides.push({
|
||||||
img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя
|
img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя
|
||||||
nickname: player.UserName,
|
nickname: player.UserName,
|
||||||
@@ -299,8 +316,6 @@ export default {
|
|||||||
if (diff <= 0) {
|
if (diff <= 0) {
|
||||||
this.remainingSeconds = 0;
|
this.remainingSeconds = 0;
|
||||||
this.progressBarWidth = 100; // Полный прогресс
|
this.progressBarWidth = 100; // Полный прогресс
|
||||||
clearInterval(this.timerInterval); // Остановить таймер
|
|
||||||
this.autoplay = 20;
|
|
||||||
|
|
||||||
// Действия после окончания таймера, если необходимо
|
// Действия после окончания таймера, если необходимо
|
||||||
} else {
|
} else {
|
||||||
@@ -332,21 +347,25 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSlideStart(data) {
|
handleSlideStart(data) {
|
||||||
try {
|
// try {
|
||||||
const { slidingToIndex } = data;
|
// let { slidingToIndex,currentSlideIndex } = data;
|
||||||
// Проверяем, существует ли слайд и имеет ли он свойство nickname
|
// // Проверяем, существует ли слайд и имеет ли он свойство nickname
|
||||||
if (this.slides[slidingToIndex] && this.slides[slidingToIndex].nickname) {
|
// if (this.slides[slidingToIndex] && this.slides[slidingToIndex].nickname) {
|
||||||
this.currentSlideIndex = slidingToIndex;
|
// if (this.isStopButtonPressed) {
|
||||||
if (this.isStopButtonPressed) {
|
// if (this.slides[currentSlideIndex].nickname == "Hepatir") {
|
||||||
if (this.slides[this.currentSlideIndex].nickname == "Hepatir") {
|
|
||||||
// if (this.slides[this.currentSlideIndex].nickname == this.targetNickname) {
|
// // this.$refs.carousel.slideTo(this.currentSlideIndex);
|
||||||
this.stopAutoplay();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
// // if (this.slides[this.currentSlideIndex].nickname == this.targetNickname) {
|
||||||
} catch (error) {
|
// this.stopAutoplay();
|
||||||
console.error("Error in handleSlideStart:", error);
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
// } catch (error) {
|
||||||
|
// console.error("Error in handleSlideStart:", error);
|
||||||
|
// }
|
||||||
// try {
|
// try {
|
||||||
// const { slidingToIndex } = data;
|
// const { slidingToIndex } = data;
|
||||||
// this.currentSlideIndex = slidingToIndex;
|
// this.currentSlideIndex = slidingToIndex;
|
||||||
@@ -361,34 +380,32 @@ export default {
|
|||||||
// console.error("Error in handleSlideStart:", error);
|
// console.error("Error in handleSlideStart:", error);
|
||||||
// // Здесь вы можете обработать ошибку, например, остановить карусель
|
// // Здесь вы можете обработать ошибку, например, остановить карусель
|
||||||
// }
|
// }
|
||||||
// try {
|
try {
|
||||||
// const { slidingToIndex } = data;
|
const { slidingToIndex } = data;
|
||||||
// this.currentSlideIndex = slidingToIndex;
|
this.currentSlideIndex = slidingToIndex;
|
||||||
// if (this.isStopButtonPressed) {
|
if (this.isStopButtonPressed) {
|
||||||
// if (
|
if (
|
||||||
// this.slides[this.currentSlideIndex].nickname ==
|
this.slides[this.currentSlideIndex].nickname ==
|
||||||
// "Hepatir"
|
"Hepatir"
|
||||||
// ) {
|
) {
|
||||||
// this.stopAutoplay();
|
this.stopAutoplay();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// console.error("Error in handleSlideStart:", error);
|
console.error("Error in handleSlideStart:", error);
|
||||||
// // Здесь вы можете обработать ошибку, например, остановить карусель
|
// Здесь вы можете обработать ошибку, например, остановить карусель
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
stopCarousel() {
|
stopCarousel() {
|
||||||
this.isStopButtonPressed = true;
|
this.isStopButtonPressed = true;
|
||||||
this.autoplay = 200;
|
this.autoplay = 200;
|
||||||
},
|
},
|
||||||
stopAutoplay() {
|
stopAutoplay() {
|
||||||
this.autoplay = 0;
|
|
||||||
this.targetNickname = "";
|
this.targetNickname = "";
|
||||||
|
this.autoplay = 0;
|
||||||
this.isGameTimerStarted = false;
|
this.isGameTimerStarted = false;
|
||||||
this.isStopButtonPressed = false;
|
this.isStopButtonPressed = false;
|
||||||
if (this.interval) {
|
|
||||||
clearInterval(this.interval);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
changeLastFiveImages() {
|
changeLastFiveImages() {
|
||||||
const newImage = "https://avatar.spworlds.ru/face/55/Hepatir.png";
|
const newImage = "https://avatar.spworlds.ru/face/55/Hepatir.png";
|
||||||
|
|||||||
Reference in New Issue
Block a user