refactor(core): and cover

This commit is contained in:
qingwei.li 2017-02-18 17:02:16 +08:00 committed by cinwell.li
commit 27e7e749af
6 changed files with 69 additions and 8 deletions

View file

@ -1,5 +1,5 @@
import { merge } from '../util/core'
import { parseQuery, stringifyQuery, cleanPath } from './util'
import { parseQuery, stringifyQuery } from './util'
function replaceHash (path) {
const i = window.location.href.indexOf('#')

View file

@ -39,10 +39,13 @@ export function initRoute (vm) {
on('hashchange', _ => {
normalize()
vm.route = parse()
if (lastRoute.path === vm.route.path) {
// TODO: goto xxx
return
}
vm._fetchCover()
vm._fetch()
lastRoute = vm.route
})