feat: URL trailing slashes remove + All pages basepath

This commit is contained in:
NGPixel
2017-04-23 10:56:14 -04:00
parent db16eb72f0
commit f44d0a3c44
6 changed files with 46 additions and 4 deletions

View File

@@ -32,7 +32,11 @@ module.exports = (alerts, socket) => {
}
},
mounted: function () {
this.fetch('')
let basePath = window.location.pathname.slice(0, -4)
if (basePath.length > 1) {
basePath = basePath.slice(1)
}
this.fetch(basePath)
}
})
}