收藏
回答

小程序内嵌我的h5,配置了域名,在h5想打开第三方链接,能通过location.href跳过去吗

小程序内<web-view src="{{webUrl}}" ></web-view>

h5内

<template>

  <!-- <iframe

    :src="webUrl"

    frameborder="0"

    style="width: 100%; height: 100%"

  ></iframe> -->

  <div></div>

</template>


<script>

import { Base64 } from "js-base64";


export default {

  name: "ExternalWeb",

  props: {},

  data() {

    return {

      webUrl: "",

    };

  },

  mounted() {

    this.webUrl = decodeURIComponent(Base64.decode(this.$route.query.url));

    location.href = this.webUrl

  },

};

</script>

回答关注问题邀请回答
收藏

2 个回答

  • 智能回答 智能回答 本次回答由AI生成
    01-13
    有用
  • 😴💤
    😴💤
    01-13

    iframe过不去了

    01-13
    有用
    回复
登录 后发表内容