57 lines
1.7 KiB
Vue
57 lines
1.7 KiB
Vue
<template>
|
|
<div class="content">
|
|
<!-- <iframe style="width:100%;height:100%" :src="url" allow="microphone;camera;midi;encrypted-media;"></iframe> -->
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getSafeyHatSessionApi
|
|
} from '@/assets/js/api/demo'
|
|
// import iframe from '../vrCenter/iframe.vue'
|
|
export default {
|
|
// components: { iframe },
|
|
data() {
|
|
return {
|
|
url: 'https://caps.runde.pro/login'
|
|
}
|
|
},
|
|
created(){
|
|
this.getSafeyHatSession()
|
|
},
|
|
methods: {
|
|
getSafeyHatSession(){
|
|
getSafeyHatSessionApi().then(res=>{
|
|
console.log(res)
|
|
// {
|
|
// "success":true,
|
|
// "message":"操作成功!",
|
|
// "code":200,
|
|
// "result":{
|
|
// "msg_code":"GetSucc",
|
|
// "session_id":"d3a3c4d17c46e29dab9c9178d5b380c5",
|
|
// "userName":"rdys_test",
|
|
// "status":true,
|
|
// "token":"d3a3c4d17c46e29dab9c9178d5b380c5"
|
|
// },
|
|
// "timestamp":1634904162951
|
|
// }
|
|
if(res.code == 200){
|
|
// this.url = this.url + '#'+ res.result.token + '=' + res.result.session_id + '&user_name=' + res.result.userName + '&target=home'
|
|
this.url = this.url + '#token='+ res.result.token + '&user_name=' + res.result.userName + '&target=home'
|
|
window.open(this.url)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.content{
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #fff;
|
|
}
|
|
|
|
</style> |