Commit 5dd339c6 authored by 毛线's avatar 毛线

跳转大厅页面

parent 079bb431
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { getToken } from '@/utils/auth' // 验权 import { getToken } from '@/utils/auth' // 验权
const whiteList = ['/loading', '/loading/', '/login', '/login/', '/test', '/index/test', '/goToGame/', '/goToGame'] // 不重定向白名单 const whiteList = ['/loading', '/loading/', '/login', '/login/', '/test', '/index/test', '/goToGame/', '/goToGame', '/goToGameList', '/goToGameList/'] // 不重定向白名单
export default ({ app, redirect, route }) => { export default ({ app, redirect, route }) => {
const { fullPath, path } = route const { fullPath, path } = route
......
<template>
<div/>
</template>
<script>
import { mapMutations } from 'vuex'
import { setToken, setImToken, setUserData, removeToken } from '@/utils/auth' // 验权
export default {
data() {
return {}
},
created() {
this.SetShowSlot(false)
// https://app-dev.eslotsys.com/goToGame?ticket=a079fbdf3ac4463f9dd67632d990c940
removeToken()
const { ticket } = this.$route.query
if (ticket) {
this.network().getInfo(ticket)
}
},
methods: {
...mapMutations([
'SetImToken',
'SetShowSlot',
]),
network() {
return {
getInfo: (ticket) => {
const params = {
ticket,
}
this.$request({
url: '/api/gaming/getGagingInfoByTicket',
method: 'get',
params,
}).then(({ data }) => {
console.log('登录成功')
const { deviceId, imToken, redirectUrl, token } = data
setUserData({ token, openImToken: imToken })
this.SetImToken(imToken)
this.$router.replace({ path: '/loading', })
})
},
}
},
},
}
</script>
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