Commit 4a3e4daa authored by 毛线's avatar 毛线

样式优化

parent e69e7700
......@@ -33,16 +33,36 @@ export default {
redirectUrl,
deviceId,
}
console.log('query', query)
this.$request({
url: '/api/gaming',
method: 'post',
data: {
deviceId,
},
}).then(({ data }) => {
this.$router.replace({ path: '/loading', query, })
})
this.network().isGaming(query)
})
},
isGaming: (query) => {
// 判断当前是否有在其他设备
const url = '/api/gaming/isGaming'
this.$request({
url,
method: 'get',
}).then(({ data }) => {
if (!data) { // 没有在其他设备
const { deviceId } = query
// 加入设备
this.$request({
url: '/api/gaming',
method: 'post',
data: {
deviceId,
},
}).then(({ data }) => {
this.$router.replace({ path: '/loading', query, })
})
return
}
const { id } = data
if (id) {
if (this.$route.name !== 'index-game') {
this.$router.replace(`/game?id=${id}`)
}
}
})
},
}
......
......@@ -203,6 +203,7 @@ export default {
color: #dbd5d0;
font-size: 18px;
font-weight: bold;
z-index: 22;
}
.bg {
width: 100%;
......@@ -210,12 +211,14 @@ export default {
position: absolute;
left: 0;
top: 0;
z-index: 20;
}
.top-icon {
top: 1px;
right: 5px;
width: 70px;
position: absolute;
z-index: 21;
}
@keyframes twinkle {
from {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment