+ :justify=" (user.userInfo?.id || '') === item.userId ? 'end' : 'start'">
-
@@ -39,7 +39,7 @@
-
@@ -83,7 +83,6 @@ const emits = defineEmits<{
const gameHub = useGameHubStore()
const user = useUserStore()
-const userId = user.userInfo?.id || ''
const messages = ref
([])
const inputMessage = ref('')
const chatBoard = ref()
diff --git a/src/mobile/views/game/CypherChallenge.vue b/src/mobile/views/game/CypherChallenge.vue
index 8fa8d03..141ba14 100644
--- a/src/mobile/views/game/CypherChallenge.vue
+++ b/src/mobile/views/game/CypherChallenge.vue
@@ -263,6 +263,8 @@ onUnmounted(() => {
position: relative;
overflow: hidden;
+ max-width: 1000px;
+
.game-panel {
height: 100%;
background: url(@/assets/images/cypherChallenge/loading.jpg) center / cover no-repeat;
diff --git a/src/mobile/views/room/WaitingRoomBase.vue b/src/mobile/views/room/WaitingRoomBase.vue
index 229f64f..10821ef 100644
--- a/src/mobile/views/room/WaitingRoomBase.vue
+++ b/src/mobile/views/room/WaitingRoomBase.vue
@@ -92,7 +92,6 @@ const router = useRouter()
const gameHub = useGameHubStore()
const user = useUserStore()
-const userId = user.userInfo?.id || ''
const roomId = Array.isArray(route.params.roomId) ? route.params.roomId.join(',') : route.params.roomId
const isHost = ref(false)
@@ -123,7 +122,7 @@ async function gameInfoListener(response: SignalrResponse) {
const playerList = response.PlayerList
- isHost.value = response.Game.CreatorId == userId
+ isHost.value = response.Game.CreatorId == (user.userInfo?.id || '')
hostId.value = response.Game.CreatorId
players.value = playerList.map((p: SignalrResponse) => {
const avatar = p.UserAvatar ? p.UserAvatar : '/avatar.webp'
@@ -152,7 +151,7 @@ async function playerLeftListener(response: SignalrResponse) {
players.value = players.value.filter((p) => p.id !== playerId)
// 如果是自己被踢,弹出提示并返回首页
- if (playerId == userId && method == 'Kicked') {
+ if (playerId == (user.userInfo?.id || '') && method == 'Kicked') {
await toast('您已被房主踢出房间', 'warning')
}
}