修改,两个房主相互邀请时,跳转房间路径bug的问题

This commit is contained in:
lVAL 2019-12-09 10:52:08 +08:00
parent d8b0577c77
commit eeb69eac26

View File

@ -73,7 +73,8 @@ export default {
members: [], members: [],
stationList: [], stationList: [],
standList: [], standList: [],
doorList: [] doorList: [],
timer: null
}; };
}, },
computed: { computed: {
@ -109,19 +110,27 @@ export default {
// //
'$store.state.socket.realDeviceInfo': async function (val) { '$store.state.socket.realDeviceInfo': async function (val) {
await this.getStandList(); await this.getStandList();
},
//
'$route': async function() {
await this.loadInit();
} }
}, },
async created() { async created() {
await this.getRoomInfo(); await this.loadInit();
await this.getUserList();
await this.getStandList();
await this.getStaionList(this.room.mapId);
await this.getDoorList(this.room.mapId, this.stationList);
this.timeDemon = setInterval(() => {
checkLoginLine();
}, 5000 * 60);
}, },
methods: { methods: {
async loadInit() {
await this.getRoomInfo();
await this.getUserList();
await this.getStandList();
await this.getStaionList(this.room.mapId);
await this.getDoorList(this.room.mapId, this.stationList);
if (this.timer) { clearInterval(this.timer); }
this.timer = setInterval(() => {
checkLoginLine();
}, 5000 * 60);
},
async getRoomInfo() { async getRoomInfo() {
const resp = await postRoomDetail(this.group); const resp = await postRoomDetail(this.group);
this.room = { this.room = {