UNPKG

egg-minifapp

Version:

对接各种小程序之类app的sdk

1 lines 5.05 kB
'use strict';function a9_0x41d7(){const _0x1256ee=['账号已经在别处登录','request','eggPro','req_start_time','1826WlIcVg','EggInit','path','18aDsdZv','parse','header','service','__awaiter','add','26530vxwYVY','log','stringify','default','2949222jWesDg','529678sOtBQw','code','836732tvDdCg','__importDefault','GET','init','1301634wevyUO','15pvvaUL','74622RaEZbp','multiple_login','lasttimemd5','/admin/','__esModule','query','defineProperty','throw','split','body','find','then','response','next','4292281GTEHLn','8fkRMAH','./common/AccountApiPool','done','/list','stack','/api/','md5','isMultipoint','egg_config_info','router','includes','lastLoginTime'];a9_0x41d7=function(){return _0x1256ee;};return a9_0x41d7();}const a9_0x322aa4=a9_0x331e;(function(_0x12b37b,_0x471e3e){const _0x479945=a9_0x331e,_0x36ba0e=_0x12b37b();while(!![]){try{const _0x1f9617=-parseInt(_0x479945(0x1a6))/0x1+parseInt(_0x479945(0x19b))/0x2*(-parseInt(_0x479945(0x1ae))/0x3)+-parseInt(_0x479945(0x1a8))/0x4*(-parseInt(_0x479945(0x1ad))/0x5)+parseInt(_0x479945(0x1a5))/0x6+parseInt(_0x479945(0x187))/0x7*(parseInt(_0x479945(0x188))/0x8)+-parseInt(_0x479945(0x1ac))/0x9+parseInt(_0x479945(0x1a1))/0xa*(-parseInt(_0x479945(0x198))/0xb);if(_0x1f9617===_0x471e3e)break;else _0x36ba0e['push'](_0x36ba0e['shift']());}catch(_0x192086){_0x36ba0e['push'](_0x36ba0e['shift']());}}}(a9_0x41d7,0x601e5));var __awaiter=this&&this[a9_0x322aa4(0x19f)]||function(_0x2c7c4c,_0x7e4075,_0x5eda02,_0x24ee16){function _0x2b1655(_0x1e58db){return _0x1e58db instanceof _0x5eda02?_0x1e58db:new _0x5eda02(function(_0x1f17f0){_0x1f17f0(_0x1e58db);});}return new(_0x5eda02||(_0x5eda02=Promise))(function(_0x3d9b1d,_0x1c7f8c){const _0x16077a=a9_0x331e;function _0x4bf107(_0x195318){const _0x36a7a8=a9_0x331e;try{_0x5902f3(_0x24ee16[_0x36a7a8(0x186)](_0x195318));}catch(_0x460d66){_0x1c7f8c(_0x460d66);}}function _0x53b6ff(_0x10447d){const _0x140d79=a9_0x331e;try{_0x5902f3(_0x24ee16[_0x140d79(0x180)](_0x10447d));}catch(_0x2f31dd){_0x1c7f8c(_0x2f31dd);}}function _0x5902f3(_0xd5d25e){const _0x22a9e6=a9_0x331e;_0xd5d25e[_0x22a9e6(0x18a)]?_0x3d9b1d(_0xd5d25e['value']):_0x2b1655(_0xd5d25e['value'])[_0x22a9e6(0x184)](_0x4bf107,_0x53b6ff);}_0x5902f3((_0x24ee16=_0x24ee16['apply'](_0x2c7c4c,_0x7e4075||[]))[_0x16077a(0x186)]());});},__importDefault=this&&this[a9_0x322aa4(0x1a9)]||function(_0x2e1468){const _0x24a05b=a9_0x322aa4;return _0x2e1468&&_0x2e1468[_0x24a05b(0x17d)]?_0x2e1468:{'default':_0x2e1468};};Object[a9_0x322aa4(0x17f)](exports,a9_0x322aa4(0x17d),{'value':!![]}),exports['eggPro']=void 0x0;const md5_1=__importDefault(require(a9_0x322aa4(0x18e))),index_1=require('../index'),AccountApiPool_1=require(a9_0x322aa4(0x189));function a9_0x331e(_0x90e222,_0xe7701){const _0x41d779=a9_0x41d7();return a9_0x331e=function(_0x331e15,_0x3f2091){_0x331e15=_0x331e15-0x17d;let _0x3483b9=_0x41d779[_0x331e15];return _0x3483b9;},a9_0x331e(_0x90e222,_0xe7701);}class eggPro{[a9_0x322aa4(0x1af)](_0x20e238,_0x36c232){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x962003=a9_0x331e;yield(0x0,index_1[_0x962003(0x199)])()[_0x962003(0x1ab)]();if(_0x36c232[_0x962003(0x18f)]===0x0){const _0x1f8fbb=(0x0,md5_1[_0x962003(0x1a4)])(_0x36c232[_0x962003(0x193)]),_0x28858e=_0x20e238[_0x962003(0x195)][_0x962003(0x19d)][_0x962003(0x1b0)];if(_0x1f8fbb!==_0x28858e){_0x20e238[_0x962003(0x182)]={'code':0x191,'data':'','message':_0x962003(0x194)};return;}}});}[a9_0x322aa4(0x1a2)](_0xf712a7,_0x2db108){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x2961b4=a9_0x331e;yield(0x0,index_1[_0x2961b4(0x199)])()['init']();const _0x477667=Date['now']()-_0xf712a7[_0x2961b4(0x197)];let {url:_0x1d2bb5}=_0xf712a7['request'];const {method:_0x51901d}=_0xf712a7[_0x2961b4(0x195)],_0x55288e=JSON[_0x2961b4(0x19c)](JSON[_0x2961b4(0x1a3)](_0xf712a7['app'][_0x2961b4(0x191)]))[_0x2961b4(0x18c)],_0x2b5840=_0x55288e[_0x2961b4(0x183)](_0x93ed5c=>_0x93ed5c[_0x2961b4(0x19a)]===_0x1d2bb5);if(!_0x2b5840)return;if(_0x51901d===_0x2961b4(0x1aa))_0x1d2bb5=_0x1d2bb5[_0x2961b4(0x181)]('?')[0x0];const _0x4a9e20=_0x1d2bb5[_0x2961b4(0x192)](_0x2961b4(0x18d))?_0x2961b4(0x18d):_0x1d2bb5[_0x2961b4(0x192)]('/admin/')?_0x2961b4(0x1b1):'',_0x203862=_0x1d2bb5[_0x2961b4(0x192)](_0x2961b4(0x18b));if(_0x4a9e20==='/api/'||_0x203862)return;const _0x1ce340=_0xf712a7[_0x2961b4(0x185)][_0x2961b4(0x182)];let _0x10dbdf=_0xf712a7[_0x2961b4(0x195)][_0x2961b4(0x182)];if(_0x51901d==='GET')_0x10dbdf=_0xf712a7[_0x2961b4(0x195)][_0x2961b4(0x17e)];const _0x86edbb=_0xf712a7[_0x2961b4(0x195)][_0x2961b4(0x19d)]['x-real-ip']||'--',_0x16518b={'adminId':_0x2db108['id']||0x1,'ip':_0x86edbb,'title':_0x2b5840['name']||'','url':_0x1d2bb5,'method':_0x51901d,'args':JSON[_0x2961b4(0x1a3)](_0x10dbdf),'message':_0x1ce340['message'],'status':_0x1ce340[_0x2961b4(0x1a7)]===0xc8?0x1:0x2,'task_time':_0x477667};_0xf712a7[_0x2961b4(0x19e)]['log'][_0x2961b4(0x1a0)](_0x16518b);});}[a9_0x322aa4(0x190)](){const _0x3cb06a=a9_0x322aa4,_0x546c2f=(0x0,AccountApiPool_1['getCache'])(_0x3cb06a(0x190));return _0x546c2f;}}exports[a9_0x322aa4(0x196)]=eggPro;;