File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,16 @@ Vue.use(VueRouter)
3030
3131const ConfiguredVueRouter = config => {
3232 const routes = [ ]
33+ const url_base = config . router_mode === 'history' ? config . url_root : '/'
3334 if ( config . mode === 'grid' ) {
3435 routes . push (
3536 {
36- path : config . url_root + ':type(s|q)?/:link(\\d+-[\\w-]+)?' ,
37+ path : url_base + ':type(s|q)?/:link(\\d+-[\\w-]+)?' ,
3738 name : 'index' ,
3839 component : grid ,
3940 children : [
4041 {
41- path : config . url_root + ':link(\\d+-[\\w-]+)' ,
42+ path : url_base + ':link(\\d+-[\\w-]+)' ,
4243 name : 'con-modal' ,
4344 component : con_modal ,
4445 }
@@ -48,20 +49,20 @@ const ConfiguredVueRouter = config => {
4849 } else if ( config . mode === 'enquiry' ) {
4950 routes . push (
5051 {
51- path : config . url_root ,
52+ path : url_base ,
5253 name : 'index' ,
5354 component : enquiry ,
5455 } ,
5556 )
5657 } else if ( config . mode === 'enquiry-modal' ) {
5758 routes . push (
5859 {
59- path : config . url_root ,
60+ path : url_base ,
6061 name : 'index' ,
6162 component : enquiry_button ,
6263 children : [
6364 {
64- path : config . url_root + 'enquiry' ,
65+ path : url_base + 'enquiry' ,
6566 name : 'enquiry-modal' ,
6667 component : enquiry_modal ,
6768 }
You can’t perform that action at this time.
0 commit comments