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>
  • 相关阅读:
    二、java 与 scala相互调用
    Gradle Tips#1-tasks
    Guice 学习(六)使用Provider注入服务( Provider Inject Service)
    C++第15周(春)项目3
    cocos2d-x3.2中怎样优化Cocos2d-X游戏的内存
    jqGrid源代码分析(一)
    OCP-1Z0-051-题目解析-第6题
    PHP连接sql server 2005环境配置
    【剑指offer】替换字符串中的空格
    android 推断Apk是否签名和 签名是否一致
  • 原文地址:https://www.cnblogs.com/xiaoxiao95/p/12712321.html
Copyright © 2011-2022 走看看