In the Vue project, hash route ‘this. $router. go (- 1)’ is used, and click button the url ‘#’ before has a ‘?’ & Causes the previous page to fail , double click It will take effect but url err
this origin url
http: / / localhost/ payment/ #/ certification/ detail
if i click goback the url change
http: / / localhost/ payment/ ? #/ certification/ detail
my code
< button class = "btn back p-cu-p" @click= "goback" > GoBack< / button>
goback ( ) {
this . $router. go ( - 1 )
} ,
{
path: '/certification' ,
name: 'CertifictionIndex' ,
component : ( ) => import ( '@/views/CustomerManagement/certificationIndex.vue' ) ,
children: [
{
path: '/' ,
name: 'Certifiction' ,
component : ( ) => import ( '@/views/CustomerManagement/certification.vue' ) ,
} ,
{
path: 'detail' ,
name: 'CertifictionDetail' ,
component : ( ) => import ( '@/views/CustomerManagement/certificationDetail.vue' ) ,
} ,
] ,
}