zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    通过远程linux shell传输文件
    Windows下 postgresql安装报错
    python安装tesserocr错误解决办法
    django makemigrations
    Windows下eric安装的几个小问题
    _WinMain结构
    python学习第七天——输入输出、file
    python学习第六天——模块的概念(重要)
    python学习第五天——函数(重点)
    python学习第四天——控制流
  • 原文地址:https://www.cnblogs.com/xiaoxiao95/p/12712321.html
Copyright © 2011-2022 走看看