1 |
- {"remainingRequest":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\cloud\\cemp\\cemp-ui\\src\\api\\login.js","dependencies":[{"path":"D:\\cloud\\cemp\\cemp-ui\\src\\api\\login.js","mtime":1625203826105},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\cloud\\cemp\\cemp-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000}],"contextDependencies":[],"result":["/*\n * Copyright (c) 2018-2025, lengleng All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * Neither the name of the pig4cloud.com developer nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n * Author: lengleng (wangiegie@gmail.com)\n */\nimport request from '@/router/axios';\nvar scope = 'server';\nexport var loginByUsername = function loginByUsername(username, password, code, randomStr) {\n var grant_type = 'password';\n return request({\n url: '/auth/oauth/token',\n headers: {\n isToken: false,\n 'Authorization': 'Basic Y2VtcDpjZW1w'\n },\n method: 'post',\n params: {\n username: username,\n password: password,\n randomStr: randomStr,\n code: code,\n grant_type: grant_type,\n scope: scope\n }\n });\n};\nexport var refreshToken = function refreshToken(refresh_token) {\n var grant_type = 'refresh_token';\n return request({\n url: '/auth/oauth/token',\n headers: {\n 'isToken': false,\n 'Authorization': 'Basic Y2VtcDpjZW1w'\n },\n method: 'post',\n params: {\n refresh_token: refresh_token,\n grant_type: grant_type,\n scope: scope\n }\n });\n};\nexport var getUserInfo = function getUserInfo() {\n return request({\n url: '/admin/user/info',\n method: 'get'\n });\n};\nexport var logout = function logout() {\n return request({\n url: '/auth/token/logout',\n method: 'delete'\n });\n};",{"version":3,"sources":["D:/cloud/cemp/cemp-ui/src/api/login.js"],"names":["request","scope","loginByUsername","username","password","code","randomStr","grant_type","url","headers","isToken","method","params","refreshToken","refresh_token","getUserInfo","logout"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,OAAP,MAAoB,gBAApB;AACA,IAAMC,KAAK,GAAG,QAAd;AAEA,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,QAAD,EAAWC,QAAX,EAAqBC,IAArB,EAA2BC,SAA3B,EAAyC;AACtE,MAAMC,UAAU,GAAG,UAAnB;AAEA,SAAOP,OAAO,CAAC;AACbQ,IAAAA,GAAG,EAAE,mBADQ;AAEbC,IAAAA,OAAO,EAAE;AACPC,MAAAA,OAAO,EAAC,KADD;AAEP,uBAAiB;AAFV,KAFI;AAMbC,IAAAA,MAAM,EAAE,MANK;AAObC,IAAAA,MAAM,EAAE;AAAET,MAAAA,QAAQ,EAARA,QAAF;AAAYC,MAAAA,QAAQ,EAARA,QAAZ;AAAsBE,MAAAA,SAAS,EAATA,SAAtB;AAAiCD,MAAAA,IAAI,EAAJA,IAAjC;AAAuCE,MAAAA,UAAU,EAAVA,UAAvC;AAAmDN,MAAAA,KAAK,EAALA;AAAnD;AAPK,GAAD,CAAd;AASD,CAZM;AAcP,OAAO,IAAMY,YAAY,GAAG,SAAfA,YAAe,CAACC,aAAD,EAAmB;AAC7C,MAAMP,UAAU,GAAG,eAAnB;AACA,SAAOP,OAAO,CAAC;AACbQ,IAAAA,GAAG,EAAE,mBADQ;AAEbC,IAAAA,OAAO,EAAE;AACP,iBAAW,KADJ;AAEP,uBAAiB;AAFV,KAFI;AAMbE,IAAAA,MAAM,EAAE,MANK;AAObC,IAAAA,MAAM,EAAE;AAAEE,MAAAA,aAAa,EAAbA,aAAF;AAAiBP,MAAAA,UAAU,EAAVA,UAAjB;AAA6BN,MAAAA,KAAK,EAALA;AAA7B;AAPK,GAAD,CAAd;AASD,CAXM;AAaP,OAAO,IAAMc,WAAW,GAAG,SAAdA,WAAc,GAAM;AAC/B,SAAOf,OAAO,CAAC;AACbQ,IAAAA,GAAG,EAAE,kBADQ;AAEbG,IAAAA,MAAM,EAAE;AAFK,GAAD,CAAd;AAID,CALM;AAOP,OAAO,IAAMK,MAAM,GAAG,SAATA,MAAS,GAAM;AAC1B,SAAOhB,OAAO,CAAC;AACbQ,IAAAA,GAAG,EAAE,oBADQ;AAEbG,IAAAA,MAAM,EAAE;AAFK,GAAD,CAAd;AAID,CALM","sourcesContent":["/*\n * Copyright (c) 2018-2025, lengleng All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * Neither the name of the pig4cloud.com developer nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n * Author: lengleng (wangiegie@gmail.com)\n */\nimport request from '@/router/axios'\nconst scope = 'server'\n\nexport const loginByUsername = (username, password, code, randomStr) => {\n const grant_type = 'password'\n\n return request({\n url: '/auth/oauth/token',\n headers: {\n isToken:false,\n 'Authorization': 'Basic Y2VtcDpjZW1w'\n },\n method: 'post',\n params: { username, password, randomStr, code, grant_type, scope }\n })\n}\n\nexport const refreshToken = (refresh_token) => {\n const grant_type = 'refresh_token'\n return request({\n url: '/auth/oauth/token',\n headers: {\n 'isToken': false,\n 'Authorization': 'Basic Y2VtcDpjZW1w',\n },\n method: 'post',\n params: { refresh_token, grant_type, scope }\n })\n}\n\nexport const getUserInfo = () => {\n return request({\n url: '/admin/user/info',\n method: 'get'\n })\n}\n\nexport const logout = () => {\n return request({\n url: '/auth/token/logout',\n method: 'delete'\n })\n}\n"]}]}
|