12345678910111213141516171819 |
- module.exports = (vm) => {
- uni.$u.http.interceptors.request.use((config) => {
-
- config.data = config.data || {}
-
-
-
- if (uni.getStorageSync('token')) {
-
- config.header.Authorization = uni.getStorageSync('token')
- }
- return config
- }, (config) =>
- Promise.reject(config))
- }
|