V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
810244966
V2EX  ›  Vue.js

迫于没学过 vue,碰上了 vue 里 iframe 相关的问题

  •  
  •   810244966 · Jul 22, 2021 · 2552 views
    This topic created in 1743 days ago, the information mentioned may be changed or developed.

    彦祖们,在 vue 里面放个 iframe,iframe 里的链接会 301 跳到另外个链接去。这时候 iframe 整个显示不出来该咋改呢?

    1 replies    2021-07-22 14:46:49 +08:00
    RRRSSS
        1
    RRRSSS  
       Jul 22, 2021
    这应该是那个网站做了防引用盗链(不确定是不是这么叫),这样的话,你就没有任何办法去引用了

    一般大一点的网站都会这么做,代码也挺简单,大概这么写:

    // 假设引用的是 abc.com
    if (window.parent.location.href != 'abc.com') {
    location.repliace('某个 404 地址')
    }

    这和 vue 不 vue 没关系。建议改成 js 相关话题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2751 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 14:19 · PVG 22:19 · LAX 07:19 · JFK 10:19
    ♥ Do have faith in what you're doing.