iframe跳转
<template>
<div class="box">
<!-- 跳转url -->
<iframe src=""
height="800"
width="100%"
id="mobsf"
scrolling="no"
frameborder="0"></iframe>
</div>
</template>
<script>
import { getToken, removeToken } from "@/util/auth";
import * as Api from "@/api/Project/project-management";
export default {
data() {
return {
authUrl: '',
requestId: '',
xinUrl: ''
}
},
mounted() {
this.getzutai();
},
methods:{
getzutai() {
Api.SealAppServeice().then(({ data }) => {
// 请求成功
if(data.Code == 200) {
const resData = JSON.parse(data.Data)
// 获取跳转url
if(resData.message == "SUCCESS") {
this.authUrl = resData.result.authUrl
this.xinUrl = this.authUrl.slice(0, this.authUrl.indexOf(this.authUrl.substring(this.authUrl.length-4))) + 'false'
this.requestId = resData.result.requestId
document.getElementById('mobsf').src = this.xinUrl;
}else {
return resData.message.error
}
}else {
return
}
})
}
}
}
</script>