diff --git a/src/http.js b/src/http.js index 1b597f8..b4e3f89 100644 --- a/src/http.js +++ b/src/http.js @@ -25,7 +25,7 @@ axios.interceptors.response.use( response => { if (response.data.errno === 999) { router.replace('/') - console.log('token过期') + // console.log('token过期') } return response }, @@ -39,7 +39,7 @@ router.beforeEach((to, from, next) => { // 判断该路由是否需要登录权限 if (sessionStorage.id) { // 获取当前的token是否存在 - console.log('token存在') + // console.log('token存在') next() // if (to.name !== 'application') { diff --git a/src/router.js b/src/router.js index 46ca108..a982708 100644 --- a/src/router.js +++ b/src/router.js @@ -190,7 +190,7 @@ export default new Router({ }, /** 新闻详情 */ { - path: '/newsDetails', + path: '/newsDetails:id', name: 'newsDetails', component: NewsDetails }, diff --git a/src/views/home/HomePage.vue b/src/views/home/HomePage.vue index 8cf460e..c66801b 100644 --- a/src/views/home/HomePage.vue +++ b/src/views/home/HomePage.vue @@ -234,7 +234,7 @@ export default { }); setTimeout(() => { loading.close(); - }, 2000); + }, 1000); }, link(href) { window.location.href = href diff --git a/src/views/home/NewsDetails.vue b/src/views/home/NewsDetails.vue index 712b06b..2cb1feb 100644 --- a/src/views/home/NewsDetails.vue +++ b/src/views/home/NewsDetails.vue @@ -155,8 +155,8 @@ export default { // let type = this.$route.params.type // this.getData(this.id) }, - mounted() { - this.id = this.$route.params.id + mounted() { + this.id = this.$route.params.id let type = this.$route.params.type this.getData(this.id) }