fix navigation and search routing
This commit is contained in:
parent
f421548979
commit
b8f9cfe90e
@ -69,7 +69,7 @@ class SearchProvider implements IProvider {
|
||||
$result['favicon'],
|
||||
$result['name'],
|
||||
str_replace(",",", ",$result['tags']),
|
||||
$this->url->linkToRouteAbsolute('radio.page.index') . 'search#'.$term,
|
||||
$this->url->linkToRouteAbsolute('radio.page.index') . '#/search/' . $term,
|
||||
'icon-radio-trans'
|
||||
);
|
||||
}, $parsed);
|
||||
|
@ -179,21 +179,21 @@ export default {
|
||||
|
||||
const vm = this
|
||||
const queryBase = this.$apiUrl + '/json/stations'
|
||||
let queryURI = queryBase
|
||||
let sortBy = 'clickcount'
|
||||
|
||||
if (vm.offset === 0) {
|
||||
vm.pageLoading = true
|
||||
}
|
||||
|
||||
let sortBy = 'clickcount'
|
||||
if (menuState === 'TOP') {
|
||||
sortBy = 'clickcount'
|
||||
} else if (menuState === 'NEW') {
|
||||
sortBy = 'lastchangetime'
|
||||
}
|
||||
|
||||
let queryURI = queryBase
|
||||
if (menuState === 'SEARCH') {
|
||||
const searchQuery = vm.$route.hash.substr(1)
|
||||
} else if (menuState === 'SEARCH') {
|
||||
// const searchQuery = vm.$route.hash.substr(1)
|
||||
const searchQuery = vm.$route.params.query
|
||||
console.log(searchQuery)
|
||||
queryURI = queryBase + '/byname/' + searchQuery
|
||||
} else if (menuState === 'FAVORITES') {
|
||||
queryURI = generateUrl('/apps/radio/api/favorites')
|
||||
@ -221,6 +221,7 @@ export default {
|
||||
vm.pageLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* On scroll event, load more stations if bottom reached
|
||||
*/
|
||||
|
@ -103,8 +103,6 @@ export default {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
background: red;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
.volumeIcon {
|
||||
|
@ -9,8 +9,7 @@ import store from './store.js'
|
||||
Vue.use(Router)
|
||||
|
||||
const router = new Router({
|
||||
mode: 'history',
|
||||
base: generateUrl('/apps/radio'),
|
||||
base: generateUrl('/apps/radio/'),
|
||||
linkActiveClass: 'active',
|
||||
routes: [
|
||||
{
|
||||
@ -39,9 +38,10 @@ const router = new Router({
|
||||
name: 'CATEGORIES',
|
||||
},
|
||||
{
|
||||
path: '/search',
|
||||
path: '/search/:query',
|
||||
component: Main,
|
||||
name: 'SEARCH',
|
||||
props: {},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user