Skip to content

Commit 7b9821a

Browse files
author
shimh-develop
committed
gotop提到最外层
1 parent d3bbb2c commit 7b9821a

File tree

6 files changed

+6
-15
lines changed

6 files changed

+6
-15
lines changed

blog-app/src/App.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<template>
22
<div id="app">
33
<router-view/>
4+
<go-top></go-top>
45
</div>
56
</template>
67

78
<script>
9+
import GoTop from '@/components/gotop/GoTop'
810
export default {
9-
name: 'app'
11+
name: 'App',
12+
components: { GoTop }
1013
}
1114
</script>
1215

blog-app/src/Home.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
</el-container>
1212

13-
<go-top></go-top>
1413
</div>
1514

1615
</template>

blog-app/src/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@ import lodash from 'lodash'
1010
import ElementUI from 'element-ui'
1111
import '@/assets/theme/index.css'
1212

13-
1413
import '@/assets/icon/iconfont.css'
1514

16-
import GoTop from '@/components/gotop/GoTop'
1715

1816
Vue.config.productionTip = false
1917

2018
Vue.use(ElementUI)
2119

2220
Object.defineProperty(Vue.prototype, '$_', { value: lodash })
2321

24-
Vue.component('go-top', GoTop)
25-
2622
new Vue({
2723
el: '#app',
2824
router,

blog-app/src/request/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const service = axios.create({
1212
service.interceptors.request.use(config => {
1313

1414
if (store.state.token) {
15-
console.info("拦截器-" + getToken())
1615
config.headers['Oauth-Token'] = getToken()
1716
}
1817
return config
@@ -24,8 +23,6 @@ service.interceptors.request.use(config => {
2423
// respone拦截器
2524
service.interceptors.response.use(
2625
response => {
27-
console.info("拦截器response")
28-
console.info(response)
2926

3027
//全局统一处理 Session超时
3128
if(response.headers['session_time_out'] == 'timeout'){

blog-app/src/router/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,12 @@ const router = new Router({
7272
})
7373

7474
router.beforeEach((to, from, next) => {
75-
console.info("守卫--" + getToken())
75+
7676
if (getToken()) {
7777

7878
if (to.path === '/login') {
7979
next({ path: '/' })
8080
} else {
81-
console.info(store.state)
8281
if (store.state.account.length === 0) {
8382
store.dispatch('getUserInfo').then(data => { //获取用户信息
8483
next()
@@ -94,10 +93,9 @@ router.beforeEach((to, from, next) => {
9493
Message({
9594
type: 'warning',
9695
showClose: true,
97-
message: '写文章 请先登录哦'
96+
message: '请先登录哦'
9897
})
9998

100-
//next({ path: '/login' });
10199
}
102100
else {
103101
next();

blog-app/src/views/blog/BlogWrite.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
</el-main>
3030
</el-container>
3131

32-
<go-top></go-top>
33-
3432
<el-dialog title="摘要 分类 标签"
3533
:visible.sync="publishVisible"
3634
:close-on-click-modal=false

0 commit comments

Comments
 (0)