mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-27 05:36:40 +08:00
1 line
5.3 KiB
JavaScript
1 line
5.3 KiB
JavaScript
'use strict';function _0x5749(_0x332a8c,_0x583b89){const _0x3b86d0=_0x3b86();return _0x5749=function(_0x574909,_0x5d2a10){_0x574909=_0x574909-0x137;let _0x238dbd=_0x3b86d0[_0x574909];return _0x238dbd;},_0x5749(_0x332a8c,_0x583b89);}const _0x1952a5=_0x5749;(function(_0x4b5660,_0x573dd4){const _0x33f645=_0x5749,_0x3f6668=_0x4b5660();while(!![]){try{const _0xbf98d7=-parseInt(_0x33f645(0x150))/0x1+parseInt(_0x33f645(0x166))/0x2*(parseInt(_0x33f645(0x137))/0x3)+parseInt(_0x33f645(0x142))/0x4*(parseInt(_0x33f645(0x139))/0x5)+-parseInt(_0x33f645(0x13b))/0x6+-parseInt(_0x33f645(0x13e))/0x7*(parseInt(_0x33f645(0x164))/0x8)+-parseInt(_0x33f645(0x158))/0x9*(-parseInt(_0x33f645(0x168))/0xa)+-parseInt(_0x33f645(0x151))/0xb*(-parseInt(_0x33f645(0x138))/0xc);if(_0xbf98d7===_0x573dd4)break;else _0x3f6668['push'](_0x3f6668['shift']());}catch(_0xc4ac09){_0x3f6668['push'](_0x3f6668['shift']());}}}(_0x3b86,0x9aa80));function _0x3b86(){const _0x39f9d6=['includes','visitor','HttpException','zRange','516778bTiefc','10196142aWkGiK','token:','admin','saveToken','defineProperty','UNAUTHORIZED','invalidateTokens','27BGjEEA','tokens:','expire','HttpStatus','REDIS_CLIENT','metadata','design:paramtypes','length','super','ttl','__esModule','redisClient','2098608FmZQtl','onModuleInit','46wIvDzr','decorate','602190CAaBKQ','93306jtwUWW','12uVpbrV','492145jjYGyN','getOwnPropertyDescriptor','5810496OJTlkH','__decorate','@nestjs/common','21JeVpkL','set','forEach','__metadata','44DWqMhg','BAD_REQUEST','get','function','Injectable','aaa','您已在其他设备覆盖登录、请您重新登录!','Inject','del','object'];_0x3b86=function(){return _0x39f9d6;};return _0x3b86();}var __decorate=this&&this[_0x1952a5(0x13c)]||function(_0x12f65d,_0x217348,_0x585854,_0x476804){const _0x1ac2ba=_0x1952a5;var _0x88d313=arguments[_0x1ac2ba(0x15f)],_0x3e9dda=_0x88d313<0x3?_0x217348:_0x476804===null?_0x476804=Object[_0x1ac2ba(0x13a)](_0x217348,_0x585854):_0x476804,_0x313e47;if(typeof Reflect===_0x1ac2ba(0x14b)&&typeof Reflect[_0x1ac2ba(0x167)]===_0x1ac2ba(0x145))_0x3e9dda=Reflect[_0x1ac2ba(0x167)](_0x12f65d,_0x217348,_0x585854,_0x476804);else{for(var _0x4f12e5=_0x12f65d['length']-0x1;_0x4f12e5>=0x0;_0x4f12e5--)if(_0x313e47=_0x12f65d[_0x4f12e5])_0x3e9dda=(_0x88d313<0x3?_0x313e47(_0x3e9dda):_0x88d313>0x3?_0x313e47(_0x217348,_0x585854,_0x3e9dda):_0x313e47(_0x217348,_0x585854))||_0x3e9dda;}return _0x88d313>0x3&&_0x3e9dda&&Object[_0x1ac2ba(0x155)](_0x217348,_0x585854,_0x3e9dda),_0x3e9dda;},__metadata=this&&this[_0x1952a5(0x141)]||function(_0x3080d9,_0x378564){const _0x3007e9=_0x1952a5;if(typeof Reflect===_0x3007e9(0x14b)&&typeof Reflect['metadata']===_0x3007e9(0x145))return Reflect[_0x3007e9(0x15d)](_0x3080d9,_0x378564);},__param=this&&this['__param']||function(_0x11b7bd,_0x27b974){return function(_0x424cfd,_0x47a703){_0x27b974(_0x424cfd,_0x47a703,_0x11b7bd);};};Object[_0x1952a5(0x155)](exports,_0x1952a5(0x162),{'value':!![]}),exports['RedisCacheService']=void 0x0;const common_1=require(_0x1952a5(0x13d));let RedisCacheService=class RedisCacheService{constructor(_0x45f40d){this['redisClient']=_0x45f40d;}async[_0x1952a5(0x165)](){}['test'](){const _0x292b39=_0x1952a5;return this[_0x292b39(0x163)][_0x292b39(0x13f)](_0x292b39(0x147),0x6f),0x1;}async['get'](_0x118cbf){const _0x2242d7=_0x1952a5,{key:_0x33c5a8}=_0x118cbf,_0xa4ec7a=await this[_0x2242d7(0x163)][_0x2242d7(0x144)](_0x33c5a8);return await this['redisClient']['get'](_0x33c5a8);}async[_0x1952a5(0x13f)](_0x11e4c5,_0x26fc51){const _0x55a776=_0x1952a5;try{const {key:_0x45f9f1,val:_0x146d82}=_0x11e4c5;await this[_0x55a776(0x163)][_0x55a776(0x13f)](_0x45f9f1,_0x146d82),_0x26fc51&&await this[_0x55a776(0x163)][_0x55a776(0x15a)](_0x45f9f1,_0x26fc51);return;}catch(_0x11d94d){throw new common_1['HttpException'](_0x11d94d,common_1[_0x55a776(0x15b)][_0x55a776(0x143)]);}}async[_0x1952a5(0x161)](_0xf6c0ad){const _0x4c74ee=_0x1952a5;return await this[_0x4c74ee(0x163)][_0x4c74ee(0x161)](_0xf6c0ad);}async[_0x1952a5(0x14a)](_0x48f279){const _0x50bac7=_0x1952a5,{key:_0x5c123a}=_0x48f279;await this[_0x50bac7(0x163)][_0x50bac7(0x14a)](_0x5c123a);return;}async[_0x1952a5(0x154)](_0x2ad30c,_0x1be52c){const _0x312cc1=_0x1952a5,_0x3d2b4d=await this[_0x312cc1(0x163)][_0x312cc1(0x14f)](_0x312cc1(0x159)+_0x2ad30c,0x0,-0x1);await this[_0x312cc1(0x157)](_0x2ad30c,_0x3d2b4d),this[_0x312cc1(0x163)][_0x312cc1(0x13f)](_0x312cc1(0x152)+_0x2ad30c,_0x1be52c);}async[_0x1952a5(0x157)](_0x258049,_0x35892f){const _0x3a42ae=_0x1952a5;_0x35892f[_0x3a42ae(0x140)](_0xcd844b=>{const _0x4f6993=_0x3a42ae;this[_0x4f6993(0x163)][_0x4f6993(0x14a)](_0x4f6993(0x152)+_0x258049+':'+_0xcd844b);});}async['checkTokenAuth'](_0x3563f5,_0x5e5d18){const _0x4b2e4d=_0x1952a5,{id:_0x4fa73f,role:_0x3d7cc2}=_0x5e5d18['user'];if(_0x3d7cc2===_0x4b2e4d(0x14d))return!![];const _0x4fd44=await this[_0x4b2e4d(0x163)]['get']('token:'+_0x4fa73f);if(_0x4fd44===null)return await this[_0x4b2e4d(0x163)][_0x4b2e4d(0x13f)](_0x4b2e4d(0x152)+_0x4fa73f,_0x3563f5),!![];if(_0x4fd44!==_0x3563f5){if([_0x4b2e4d(0x160),_0x4b2e4d(0x153)][_0x4b2e4d(0x14c)](_0x3d7cc2))return!![];throw new common_1[(_0x4b2e4d(0x14e))](_0x4b2e4d(0x148),common_1['HttpStatus'][_0x4b2e4d(0x156)]);}}};RedisCacheService=__decorate([(0x0,common_1[_0x1952a5(0x146)])(),__param(0x0,(0x0,common_1[_0x1952a5(0x149)])(_0x1952a5(0x15c))),__metadata(_0x1952a5(0x15e),[Object])],RedisCacheService),exports['RedisCacheService']=RedisCacheService; |