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 {
|
||||
const dataObject = JSON.parse(event.data);
|
||||
console.log(dataObject)
|
||||
|
||||
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
||||
eventBus.emit('dataChat', event.data);
|
||||
@@ -40,6 +41,12 @@ export function ConnectToChat() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dataObject.MessageType == 'DoubleGameState') {
|
||||
eventBus.emit('doubleGame', event.data)
|
||||
console.log('data')
|
||||
return;
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
void(error);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, ref} from 'vue'
|
||||
import { reactive, ref, onMounted } from 'vue'
|
||||
|
||||
import AsideBarComponent from "@/components/AsidebarComponent.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/global.css";
|
||||
import {eventBus} from "@/main";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -89,6 +90,13 @@ export default {
|
||||
])
|
||||
let autoPlay = ref(500)
|
||||
|
||||
onMounted(() => {
|
||||
eventBus.on('doubleGame', (dataDouble) => {
|
||||
console.log(dataDouble)
|
||||
})
|
||||
console.log('mount')
|
||||
})
|
||||
|
||||
function handleStepCarousel(data) {
|
||||
try {
|
||||
let { currentSlideIndex } = data
|
||||
|
||||
Reference in New Issue
Block a user