Skip to content

Commit bd260b1

Browse files
committed
axios interceptors request -> para
1 parent bba137b commit bd260b1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/api/http.js

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function filterNull(o) {
3535
var storeTemp=store;
3636
axios.interceptors.request.use(
3737
config => {
38+
console.log(config.params)
3839
if (storeTemp.state.token) {
3940
// 判断是否存在token,如果存在的话,则每个http header都加上token
4041
config.headers.Authorization ="Bearer "+ storeTemp.state.token;

src/views/Home.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default {
106106
if (urlPage) {
107107
that.page = urlPage;
108108
}
109-
this.$api.get("Blog/?page=" + that.page, null, r => {
109+
this.$api.get("Blog/?page=" + that.page, {test:33}, r => {
110110
this.list = r.data;
111111
this.page = r.page;
112112
this.TotalCount = r.pageCount;

0 commit comments

Comments
 (0)