1234567891011121314151617181920 |
- module.exports = vm => {
- uni.$u.http.interceptors.request.use(
- config => {
-
-
- config.data = config.data || {}
- if (vm.$store.getters.hasLogin) {
- config.header.Authorization = 'Bearer ' + vm.$store.getters.accessToken
- }
- return config
- },
- (
- config
- ) => Promise.reject(config)
- )
- }
|