1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/65e415034da21f8e85bd1a6c1b6...

1 line
3.0 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\login.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\login.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import axios from 'axios';\nimport Cookies from 'js-cookie';\nvar ajax = axios.create({\n baseURL: window.GLOBAL_CONFIG['loginUrl'],\n timeout: 1000 * 180\n});\n/**\n * 请求拦截\n */\n\najax.interceptors.request.use(function (config) {\n if (config.url !== '/map/account/token') {\n config.headers['Authorization'] = 'Bearer ' + Cookies.get('token') || '';\n }\n\n return config;\n}, function (error) {\n return Promise.reject(error);\n});\n/**\n * 响应拦截\n */\n\najax.interceptors.response.use(function (response) {\n return response;\n}, function (error) {\n console.error(error);\n return Promise.reject(error.response);\n});\nexport default ajax;",{"version":3,"sources":["C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\login.js"],"names":["axios","Cookies","ajax","create","baseURL","window","GLOBAL_CONFIG","timeout","interceptors","request","use","config","url","headers","get","error","Promise","reject","response","console"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,IAAMC,IAAI,GAAGF,KAAK,CAACG,MAAN,CAAa;AACtBC,EAAAA,OAAO,EAAEC,MAAM,CAACC,aAAP,CAAqB,UAArB,CADa;AAEtBC,EAAAA,OAAO,EAAE,OAAO;AAFM,CAAb,CAAb;AAIA;;;;AAGAL,IAAI,CAACM,YAAL,CAAkBC,OAAlB,CAA0BC,GAA1B,CAA8B,UAAAC,MAAM,EAAI;AACpC,MAAIA,MAAM,CAACC,GAAP,KAAe,oBAAnB,EAAyC;AACvCD,IAAAA,MAAM,CAACE,OAAP,CAAe,eAAf,IAAkC,YAAYZ,OAAO,CAACa,GAAR,CAAY,OAAZ,CAAZ,IAAoC,EAAtE;AACD;;AACD,SAAOH,MAAP;AACD,CALH,EAKK,UAAAI,KAAK,EAAI;AACV,SAAOC,OAAO,CAACC,MAAR,CAAeF,KAAf,CAAP;AACD,CAPH;AAQA;;;;AAGAb,IAAI,CAACM,YAAL,CAAkBU,QAAlB,CAA2BR,GAA3B,CAA+B,UAAAQ,QAAQ,EAAI;AACvC,SAAOA,QAAP;AACH,CAFD,EAEG,UAAAH,KAAK,EAAI;AACRI,EAAAA,OAAO,CAACJ,KAAR,CAAcA,KAAd;AACA,SAAOC,OAAO,CAACC,MAAR,CAAeF,KAAK,CAACG,QAArB,CAAP;AACH,CALD;AAOA,eAAehB,IAAf","sourcesContent":["import axios from 'axios'\nimport Cookies from 'js-cookie'\nconst ajax = axios.create({\n baseURL: window.GLOBAL_CONFIG['loginUrl'],\n timeout: 1000 * 180,\n})\n/**\n * 请求拦截\n */\najax.interceptors.request.use(config => {\n if (config.url !== '/map/account/token') {\n config.headers['Authorization'] = 'Bearer ' + Cookies.get('token') || ''\n }\n return config\n }, error => {\n return Promise.reject(error)\n })\n/**\n * 响应拦截\n */\najax.interceptors.response.use(response => {\n return response\n}, error => {\n console.error(error)\n return Promise.reject(error.response)\n})\n\nexport default ajax"]}]}