微信h5用web-view嵌套显示不了!

微信h5用web-view嵌套显示不了!

<template>
  <view class="content">
    <!-- <iframe width="100%" height="100%" :src="jumpLink" frameborder="0">
    </iframe> -->
    <web-view width="100%" height="100%" :webview-styles="webviewStyles" :src="jumpLink"></web-view>
  </view>
</template>

<script>
import { readGetIntegral } from "@/api/period";
export default {
  data() {
    return {
      jumpLink: "",
      id: "",
      equipment: "",
    };
  },
  onLoad(options) {
    this.jumpLink = options.jumpLink;
    // window.location.href = this.jumpLink;
    this.id = options.id;
    this.getIntegral();
  },
  methods: {
    getIntegral() {
      let timer1 = setTimeout(() => {
        readGetIntegral({ id: this.id })
          .then((res) => {
            console.log("上传成功");
          })
          .catch((err) => {
            console.log("上传失败");
          });
        clearTimeout(timer1);
        timer1 = null;
      }, 60 * 1000);
    }
  },
};
</script>

<style scoped>
.content {
  height: 100vh;
  position: relative;
}
</style>
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题