mini-program/utils/http.interceptor.js
@@ -1,10 +1,10 @@ const install = (Vue, vm) => { // 请求拦截器 uni.$u.http.interceptors.request.use((config) => { // const Headtoken = vm.$store.state.token // if (Headtoken) { config.header['token'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjE4MDU1MTU5NDUzIiwiZXhwIjoxNzcwMTg3MDgxfQ.xoNzXq98cZQEAlCO3UeJU6zn5obIdoCWxWLRJumlj4AAzVeBNQosrVfxZMBfYOAZKB7qBcM_4JiWlDCEyL8hrg'; // } const Headtoken = vm.$store.state.token if (Headtoken) { config.header['token'] = Headtoken; } return config }, config => { return Promise.reject(config)