How does VUE put the number of pages in the address path when turning pages? The first time you enter the page, the route parameter `/: page` cannot be entered due to specification problems, resulting in 404.

The

list has 3 pages. Enter for details and return to the first page.
wants to click on the address bar record on the second page so that it returns directly to the list on the second page.

currently the menu is returned from the backend and the number of pages cannot be included in the route.
look at the picture, product_list here is his path, route file configuration, if you add : page will result in 404. Can you bring the default value to : id ?

{
    path: "/product/product_list/",
    name: "product_list",
    component: product_list,
    props: true,
  },

has also tried to use the following words when turning pages

this.$router.push({
        name: "product_lise",
        path: `/product/product_lise`,
        params: {
          page: pageNum,
        }
      });

No change in the address bar after trigger

Mar.24,2021

I see that page routing is required to support optional parameters, right?

add a question mark
path:'/ product/product_list/:page?'


the legendary Advanced matching pattern what about it?

ide/essentials/dynamic-matching.html-sharp%E9%AB%98%E7%BA%A7%E5%8C%B9%E9%85%8D%E6%A8%A1%E5%BC%8F" rel=" nofollow noreferrer "> https://router.vuejs.org/zh/g.

path: '/product/product_list/:page?'

in this case, you can match / product/product_list and / product/product_list/1

at the same time.

routes: [

]
{
  path: '/',
  name: 'Home',
  component: Home,
  children: [
    {
      path: '/detail/:id',
      name: 'Detail',
      component: Detail
    },
  ]
}]

vue router 

routing with parameters can solve

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b361bb-2c000.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b361bb-2c000.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?