我目前正在做一个电子商务项目..对于产品页面,我需要这样的网址
http://example.com/products/<category_name>/<product_name>
一切正常,但是每当我尝试使用 <Nuxtlink :to="`/products/${product.get_absolute_url}`"/>
导航到它时,其中 get_absolute_url='/iPhone/iPhone-12-black'
会给出 404 错误,但是当我使用完全相同的 url 刷新页面时,它会显示正确的内容
页面目录:
pages/
--- products/
------ _category/
--------- _product.vue
--------- _index.vue
------ index.vue
--- about.vue
--- index.vue