环卫车小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
368 B

/**
* 请求拦截
* @param {Object} http
*/
module.exports = (vm) => {
uni.$u.http.interceptors.request.use((config) => {
config.data = config.data || {}
config.header['X-Access-Token'] = uni.getStorageSync('token');
config.header['Content-Type'] = 'application/x-www-form-urlencoded'
return config
}, config => {
return Promise.reject(config)
})
}