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

	// 数趣Ai项目接口根路径
	config.baseURL = 'https://www.ai5566.top/api/' /* 根域名 */

	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)
}