// 引入配置
// import config from '@/common/config.js'
// import store from '@/store'
uni.$u.http.setConfig((config) => {
	console.log('到config配置');
	/* config 为默认全局配置 */


	config.baseURL = 'http://t18.9026.com/api'
	// config.baseURL = 'http://jmapi.tangyuhao.cn/index.php'

	config.header = {
		// 'Content-Type': 'application/x-www-form-urlencoded',
		'Content-type': 'application/json',
		'X-Requested-With': 'XMLHttpRequest',
		'Accept': 'application/vnd.api.v1+json'
	}
	// if (store.getters.token) {
	if (true) {
		// config.header['Authorization'] = store.getters.token
	}

	return config
})

module.exports = (vm) => {
	require('./requestInterceptors')(vm)
	require('./responseInterceptors')(vm)
}