// 对指定请求链接进行加密

import { AxiosRequestConfig } from "axios";
import { useUserStore } from "@/store/user";

export const handleUrl = async (config: (AxiosRequestConfig & {unEncrypt?: boolean})) => {
    const userStore = useUserStore()
    if(userStore.getToken){
        config.headers!!["Authorization"] = `Bearer ${userStore.getToken}`
    }
    return config;
}