810244966
V2EX  ›  Vue.js

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

  •  
  •   810244966 · Jul 22, 2021 · 2590 views
    This topic created in 1763 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   ·   1479 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 229ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    ♥ Do have faith in what you're doing.