代码之家  ›  专栏  ›  技术社区  ›  Remy Wang

Vue-未显示URL查询参数

  •  0
  • Remy Wang  · 技术社区  · 5 年前

    我正在用Vue路由器添加查询参数 hash 模式。 config/

    that.$router.push({ name: "confirmation", query: {type: "payment"} })
    

    这对我当地人来说是这样的。 http://localhost:5000/#/confirmation?type=payment

    在生产环境中,我将编译好的Vue脚本作为前端应用程序加载到网站上。

    <script type="text/javascript" async="" src="https://[project].herokuapp.com/booking/assets/booking.js?"></script>
    

    但查询参数未显示。

    https://[site]/pages/booking/#/confirmation
    

    预期 : https://site/pages/booking/#/confirmation?type=payment

    有人有主意吗?

    0 回复  |  直到 5 年前