kun 19/1017 23:17
This commit is contained in:
@@ -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') {
|
||||
|
||||
@@ -190,7 +190,7 @@ export default new Router({
|
||||
},
|
||||
/** 新闻详情 */
|
||||
{
|
||||
path: '/newsDetails',
|
||||
path: '/newsDetails:id',
|
||||
name: 'newsDetails',
|
||||
component: NewsDetails
|
||||
},
|
||||
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
});
|
||||
setTimeout(() => {
|
||||
loading.close();
|
||||
}, 2000);
|
||||
}, 1000);
|
||||
},
|
||||
link(href) {
|
||||
window.location.href = href
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user