Skip to content

Commit

Permalink
store
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyhhssyy committed Jun 22, 2024
1 parent 4ae63d3 commit 19cd16c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mobile/views/RegularHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<n-form>
<n-form-item label="房间号">
<n-input-group>
<n-input placeholder="请输入房间号" v-model:value="joinRoomCode"></n-input>
<n-input placeholder="请输入房间号" v-model:value="joinRoomCode" style="margin-right: 10px"></n-input>
<icon-button :icon="Lightning" type="success" @click="joinGame()">确认加入</icon-button>
</n-input-group>
</n-form-item>
Expand Down
3 changes: 2 additions & 1 deletion src/stores/gamehub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export const useGameHubStore = defineStore('gameHub', () => {
})

connection.value.on('Alert', async (response) => {
await toast(response.Message, 'error')
const responseObj = JSON.parse(response)
await toast(responseObj.Message, 'error')
})

connection.value.on('ServerTime', (response) => {
Expand Down

0 comments on commit 19cd16c

Please sign in to comment.