import axios from "axios";

const request = axios.create({
  baseURL: process.env.TARO_POSTER_DOMAIN,
});

// 创建全局的axios实例，并安装请求拦截器
request.interceptors.request.use(
  (config) => {
    config.headers["Authorization"] = "Bearer abc123";
    return config;
  },
  (error) => {
    // 处理请求错误
    return Promise.reject(error);
  },
);

export default request;
