你好,我想重定向 url 示例 https://mylink.com/some-page.html和我的獲取鏈接https://mylink.com/another-page.html
我正在使用 router.replace 但在第一個鏈接中添加最后一個鏈接如何解決此問題以將第一個鏈接替換為第二個
我正在使用window.locationvue 路由器或 nuxt 中的另一個解決方案?
這個想法是一個,params {'another-page'}但 api 回傳所有 url https://mylink.com/another-page.html而不僅僅是引數。
怎么做。請
uj5u.com熱心網友回復:
您可能應該獲取接收到的 URL 并將其最后一部分剪切為只有路徑。然后你可以使用 Vue 路由器移動到 Nuxt 應用程式內的相應頁面。
uj5u.com熱心網友回復:
您可以this.$router.push('/another-page');用于內部鏈接。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/333773.html
