mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added code for listening event doubleGame, but he dont work
This commit is contained in:
@@ -23,6 +23,7 @@ export function ConnectToChat() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const dataObject = JSON.parse(event.data);
|
const dataObject = JSON.parse(event.data);
|
||||||
|
console.log(dataObject)
|
||||||
|
|
||||||
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
||||||
eventBus.emit('dataChat', event.data);
|
eventBus.emit('dataChat', event.data);
|
||||||
@@ -40,6 +41,12 @@ export function ConnectToChat() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dataObject.MessageType == 'DoubleGameState') {
|
||||||
|
eventBus.emit('doubleGame', event.data)
|
||||||
|
console.log('data')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
void(error);
|
void(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {reactive, ref} from 'vue'
|
import { reactive, ref, onMounted } from 'vue'
|
||||||
|
|
||||||
import AsideBarComponent from "@/components/AsidebarComponent.vue";
|
import AsideBarComponent from "@/components/AsidebarComponent.vue";
|
||||||
import HeaderComponent from "@/components/HeaderComponent.vue";
|
import HeaderComponent from "@/components/HeaderComponent.vue";
|
||||||
@@ -51,6 +51,7 @@ import "vue3-carousel/dist/carousel.css";
|
|||||||
|
|
||||||
import "@/assets/css/PagesStyles/games-pages/jackpot.css";
|
import "@/assets/css/PagesStyles/games-pages/jackpot.css";
|
||||||
import "@/assets/css/global.css";
|
import "@/assets/css/global.css";
|
||||||
|
import {eventBus} from "@/main";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -89,6 +90,13 @@ export default {
|
|||||||
])
|
])
|
||||||
let autoPlay = ref(500)
|
let autoPlay = ref(500)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
eventBus.on('doubleGame', (dataDouble) => {
|
||||||
|
console.log(dataDouble)
|
||||||
|
})
|
||||||
|
console.log('mount')
|
||||||
|
})
|
||||||
|
|
||||||
function handleStepCarousel(data) {
|
function handleStepCarousel(data) {
|
||||||
try {
|
try {
|
||||||
let { currentSlideIndex } = data
|
let { currentSlideIndex } = data
|
||||||
|
|||||||
Reference in New Issue
Block a user