Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix room #99

Merged
merged 4 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/code/Normal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,6 @@ export default {
}
this.socket.send(JSON.stringify(outMessage))
this.disconnect()
},
beforeDestroy() {
// 컴포넌트가 파괴되기전 이벤트 리스너 제거
window.removeEventListener('beforeunload', this.beforeUnloadHandler)
}
}
</script>
Expand Down
16 changes: 10 additions & 6 deletions src/views/room/WaitingRoom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export default {
this.socket.send(JSON.stringify(outMessage))
// this.socket.close()
}
if (this.roomStatus == 1) {
if (this.roomInfo.roomStatus == 1) {
SweetAlert.warning('방이 삭제되었습니다.').then((ok) => {
if (ok.isConfirmed) {
if (this.socket.readyState === WebSocket.OPEN) {
Expand Down Expand Up @@ -348,11 +348,15 @@ export default {
this.socket.send(JSON.stringify(talkMessage))
this.startButton = ''
const url = `${this.backURL}/room/${this.roomNo}`
apiClient.put(url, {
headers: {
'Content-Type': 'application/json'
}
})
apiClient
.put(url, {
headers: {
'Content-Type': 'application/json'
}
})
.then(() => {
this.roomInfo.roomStatus = 0
})
},

async roomOutButtonClickHandler() {
Expand Down