{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js??ref--13-0!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/api/request.js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/api/request.js","mtime":1748326175588},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/babel.config.js","mtime":1725957645200},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/@babel/runtime-corejs2/helpers/esm/asyncToGenerator.js\";\nimport axios from \"axios\";\n\n// 创建axios实例\nvar instance = axios.create({\n // axios中请求配置有baseURL选项,表示请求URL公共部分\n baseURL: process.env.VUE_APP_API_ROOT,\n timeout: 10000\n});\ninstance.interceptors.request.use(/*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(config) {\n var dispatchToken;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n // config.headers[\"skip-ip-validation\"] = 1;\n dispatchToken = localStorage.getItem(\"dispatchToken\");\n if (dispatchToken) {\n config.headers.dispatchToken = dispatchToken;\n }\n return _context.abrupt(\"return\", config);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n}(), function (error) {\n return Promise.reject(error);\n});\ninstance.interceptors.response.use(function (response) {\n var status = response.status,\n data = response.data;\n if (status === 200) {\n var url = response.config.url;\n if (url.indexOf(\"json\") > -1) {\n // mock api\n return data;\n } else {\n return data.data;\n }\n }\n});\nexport default instance;",null]}