kun 19/1017 23:17

This commit is contained in:
沈学坤
2019-10-17 23:16:38 +08:00
parent 14a447b038
commit 53a93f6612
4 changed files with 6 additions and 6 deletions

View File

@@ -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') {

View File

@@ -190,7 +190,7 @@ export default new Router({
},
/** 新闻详情 */
{
path: '/newsDetails',
path: '/newsDetails:id',
name: 'newsDetails',
component: NewsDetails
},

View File

@@ -234,7 +234,7 @@ export default {
});
setTimeout(() => {
loading.close();
}, 2000);
}, 1000);
},
link(href) {
window.location.href = href

View File

@@ -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)
}