feat: dplayer

This commit is contained in:
2025-12-29 15:40:42 +08:00
parent 27c4a247d3
commit b40691a4a3
10 changed files with 394 additions and 168 deletions

38
src/store/playroom.ts Normal file
View File

@@ -0,0 +1,38 @@
import { ref } from "vue";
import { defineStore } from "pinia";
interface PlayroomState {
id: number
r_id: number;
r_name: string;
r_introduction: string;
r_avatar: string;
role: number;
}
export const PlayroomStore = defineStore("PlayroomStore",
() =>{
const currentPlayroom = ref<PlayroomState>();
const currentUrl = ref<string>("");
const setCurrentPlayroom = (playroom: PlayroomState) => {
currentPlayroom.value = playroom;
}
const setCurrentUrl = (url: string) => {
currentUrl.value = url;
}
const clearPlayroom = () => {
currentPlayroom.value = undefined;
currentUrl.value = "";
}
return {
currentPlayroom,
setCurrentPlayroom,
setCurrentUrl,
clearPlayroom,
}
})

View File

@@ -1,15 +0,0 @@
import { ref } from "vue";
import { defineStore } from "pinia";
export const roomStore = defineStore("room",{
state: () => ({
r_id: '',
r_name: '',
r_avatar: '',
inroomTag: '',
currentURL: '',
}),
actions:{
}
})