优化了登录

This commit is contained in:
2020-11-12 18:03:30 +08:00
parent 3b2c47e0ec
commit 5d893d26b5
4 changed files with 36 additions and 73 deletions

View File

@@ -1,18 +1,29 @@
<template>
<iframe style="width:100%;height: 100%" src="/zhibo.html" frameborder="0"></iframe>
<iframe style="width:100%;height: 100%" :src="url" frameborder="0"></iframe>
</template>
<style lang="scss" scoped>
</style>
<script lang="ts">
import { defineComponent } from 'vue';
import { getliveinfo } from '@/api';
import { defineComponent, ref } from 'vue';
import { useRoute } from 'vue-router';
export default defineComponent({
setup(){
return {
const id = useRoute().query.id;
const url = ref<string>()
if(id && typeof id == 'string'){
getliveinfo(parseInt(id)).then((res: any)=>{
url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}`
})
}
return {
url
}
}
})