mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 13:16:39 +08:00
1 line
8.4 KiB
JavaScript
1 line
8.4 KiB
JavaScript
'use strict';const _0x20d9df=_0x2e0b;(function(_0x44d302,_0x46584a){const _0x1a8026=_0x2e0b,_0x59409d=_0x44d302();while(!![]){try{const _0xa729e7=-parseInt(_0x1a8026(0x1e5))/0x1*(parseInt(_0x1a8026(0x1e0))/0x2)+parseInt(_0x1a8026(0x207))/0x3+parseInt(_0x1a8026(0x20c))/0x4+-parseInt(_0x1a8026(0x1fc))/0x5*(-parseInt(_0x1a8026(0x1f5))/0x6)+-parseInt(_0x1a8026(0x1fa))/0x7+-parseInt(_0x1a8026(0x1eb))/0x8*(-parseInt(_0x1a8026(0x1fb))/0x9)+-parseInt(_0x1a8026(0x1d4))/0xa;if(_0xa729e7===_0x46584a)break;else _0x59409d['push'](_0x59409d['shift']());}catch(_0x1e9423){_0x59409d['push'](_0x59409d['shift']());}}}(_0x32c6,0x22c1a));function _0x2e0b(_0x577e69,_0x44407d){const _0x32c669=_0x32c6();return _0x2e0b=function(_0x2e0b34,_0x42f790){_0x2e0b34=_0x2e0b34-0x1cd;let _0x50b309=_0x32c669[_0x2e0b34];return _0x50b309;},_0x2e0b(_0x577e69,_0x44407d);}function _0x32c6(){const _0x4e5bc0=['__decorate','/pay','UserCenter','update','绘画广场','delMenu','typeorm','HttpStatus','Chat','menuPlatform','/mind','metadata','setMenu','menuListFront','MenuService','decorate','Draw','专业绘画','ASC','726930FykVar','@nestjs/common','solar:album-line-duotone','会员中心','save','应用广场','eos-icons:typing','ri:account-pin-box-line','/draw','menuPath','Share','visibleMenu','2102fMbviv','affected','Pay','Mind','getOwnPropertyDescriptor','258EYRDMW','/app-store','menuEntity','icon-park-outline:mindmap-map','InjectRepository','/midjourney','1139704gNoysU','defineProperty','design:paramtypes','function','推广计划','个人中心','HttpException','menuIframeUrl','Midjourney','/chat','1143894YLAmAz','__param','onModuleInit','length','count','563717puPPsz','9tpRFby','5Fctysy','/market','思维导图','fluent:draw-image-24-regular','ant-design:appstore-outlined','__metadata','@nestjs/typeorm','object','findOne','BAD_REQUEST','ri:landscape-line','14838lpbSbi','/user-center','/share','对话聊天','AppStore','914744pATiQb','uiw:share','initMenu','icon-park-outline:shopping','Market','queryMenu'];_0x32c6=function(){return _0x4e5bc0;};return _0x32c6();}var __decorate=this&&this[_0x20d9df(0x212)]||function(_0x1aced5,_0x3288bb,_0x32ec05,_0x228bd2){const _0x4f8407=_0x20d9df;var _0x52115f=arguments['length'],_0x1e9824=_0x52115f<0x3?_0x3288bb:_0x228bd2===null?_0x228bd2=Object[_0x4f8407(0x1e4)](_0x3288bb,_0x32ec05):_0x228bd2,_0x4d02e1;if(typeof Reflect==='object'&&typeof Reflect[_0x4f8407(0x1d0)]==='function')_0x1e9824=Reflect[_0x4f8407(0x1d0)](_0x1aced5,_0x3288bb,_0x32ec05,_0x228bd2);else{for(var _0x2c7dc9=_0x1aced5[_0x4f8407(0x1f8)]-0x1;_0x2c7dc9>=0x0;_0x2c7dc9--)if(_0x4d02e1=_0x1aced5[_0x2c7dc9])_0x1e9824=(_0x52115f<0x3?_0x4d02e1(_0x1e9824):_0x52115f>0x3?_0x4d02e1(_0x3288bb,_0x32ec05,_0x1e9824):_0x4d02e1(_0x3288bb,_0x32ec05))||_0x1e9824;}return _0x52115f>0x3&&_0x1e9824&&Object[_0x4f8407(0x1ec)](_0x3288bb,_0x32ec05,_0x1e9824),_0x1e9824;},__metadata=this&&this[_0x20d9df(0x201)]||function(_0x3970fc,_0x500280){const _0x3bf411=_0x20d9df;if(typeof Reflect===_0x3bf411(0x203)&&typeof Reflect[_0x3bf411(0x21d)]===_0x3bf411(0x1ee))return Reflect[_0x3bf411(0x21d)](_0x3970fc,_0x500280);},__param=this&&this[_0x20d9df(0x1f6)]||function(_0x19ab4e,_0x15350a){return function(_0xf4351b,_0x2feaae){_0x15350a(_0xf4351b,_0x2feaae,_0x19ab4e);};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[_0x20d9df(0x1cf)]=void 0x0;const common_1=require(_0x20d9df(0x1d5)),typeorm_1=require(_0x20d9df(0x202)),typeorm_2=require(_0x20d9df(0x218)),menu_entity_1=require('./menu.entity');let MenuService=class MenuService{constructor(_0xc00a){const _0x318e9b=_0x20d9df;this[_0x318e9b(0x1e7)]=_0xc00a;}async[_0x20d9df(0x1f7)](){const _0x1b3c86=_0x20d9df;await this[_0x1b3c86(0x20e)]();}async['initMenu'](){const _0x753f62=_0x20d9df,_0x42e5b3=await this[_0x753f62(0x1e7)][_0x753f62(0x1f9)]();if(_0x42e5b3>0x0)return;const _0x5a6e87=[{'menuTipText':_0x753f62(0x20a),'menuIcon':_0x753f62(0x1da),'menuName':_0x753f62(0x21a),'menuPath':_0x753f62(0x1f4),'menuType':0x0,'menuPlatform':0x1,'order':0x64},{'menuTipText':_0x753f62(0x1d9),'menuIcon':_0x753f62(0x200),'menuName':_0x753f62(0x20b),'menuPath':'/app-store','menuType':0x0,'menuPlatform':0x1,'order':0xc8},{'menuTipText':_0x753f62(0x1d2),'menuIcon':_0x753f62(0x206),'menuName':'Midjourney','menuPath':_0x753f62(0x1ea),'menuType':0x0,'menuPlatform':0x1,'order':0x12c},{'menuTipText':_0x753f62(0x216),'menuIcon':_0x753f62(0x1d6),'menuName':_0x753f62(0x210),'menuPath':_0x753f62(0x1fd),'menuType':0x0,'menuPlatform':0x1,'order':0x190},{'menuTipText':'基础绘画','menuIcon':_0x753f62(0x1ff),'menuName':_0x753f62(0x1d1),'menuPath':_0x753f62(0x1dc),'menuType':0x0,'menuPlatform':0x1,'order':0x1f4},{'menuTipText':_0x753f62(0x1fe),'menuIcon':_0x753f62(0x1e8),'menuName':'Mind','menuPath':_0x753f62(0x21c),'menuType':0x0,'menuPlatform':0x1,'order':0x258},{'menuTipText':_0x753f62(0x1d7),'menuIcon':_0x753f62(0x20f),'menuName':_0x753f62(0x1e2),'menuPath':_0x753f62(0x213),'menuType':0x0,'menuPlatform':0x1,'order':0x2bc},{'menuTipText':_0x753f62(0x1ef),'menuIcon':_0x753f62(0x20d),'menuName':_0x753f62(0x1de),'menuPath':_0x753f62(0x209),'menuType':0x0,'menuPlatform':0x1,'order':0x320}],_0x1f60eb=[{'menuTipText':'对话聊天','menuIcon':_0x753f62(0x1da),'menuName':_0x753f62(0x21a),'menuPath':_0x753f62(0x1f4),'menuType':0x0,'menuPlatform':0x0,'order':0x64},{'menuTipText':_0x753f62(0x1d9),'menuIcon':'ant-design:appstore-outlined','menuName':_0x753f62(0x20b),'menuPath':_0x753f62(0x1e6),'menuType':0x0,'menuPlatform':0x0,'order':0xc8},{'menuTipText':'专业绘画','menuIcon':_0x753f62(0x206),'menuName':_0x753f62(0x1f3),'menuPath':_0x753f62(0x1ea),'menuType':0x0,'menuPlatform':0x0,'order':0x12c},{'menuTipText':'思维导图','menuIcon':_0x753f62(0x1e8),'menuName':_0x753f62(0x1e3),'menuPath':_0x753f62(0x21c),'menuType':0x0,'menuPlatform':0x0,'order':0x190},{'menuTipText':_0x753f62(0x1f0),'menuIcon':_0x753f62(0x1db),'menuName':_0x753f62(0x214),'menuPath':_0x753f62(0x208),'menuType':0x0,'menuPlatform':0x0,'order':0x1f4}],_0x7eed95=[..._0x5a6e87,..._0x1f60eb];await this[_0x753f62(0x1e7)][_0x753f62(0x1d8)](_0x7eed95);}async[_0x20d9df(0x211)](_0x4c93bd){const _0x382d0d=_0x20d9df,{menuPlatform:_0x1b1590}=_0x4c93bd,_0x17a07c={};return _0x1b1590&&(_0x17a07c[_0x382d0d(0x21b)]=_0x1b1590),await this[_0x382d0d(0x1e7)]['find']({'where':_0x17a07c,'order':{'order':_0x382d0d(0x1d3)}});}async[_0x20d9df(0x1ce)](_0xc2c064){const _0x2ca53d=_0x20d9df,{menuPlatform:_0x29cb07}=_0xc2c064,_0x4b0d82={'isShow':!![]};return _0x29cb07&&(_0x4b0d82[_0x2ca53d(0x21b)]=_0x29cb07),await this[_0x2ca53d(0x1e7)]['find']({'where':_0x4b0d82,'order':{'order':_0x2ca53d(0x1d3)}});}async[_0x20d9df(0x1df)](_0x3352c0){const _0x278444=_0x20d9df,{id:_0x347caa}=_0x3352c0;if(!_0x347caa)return;const _0xaeee4c=await this[_0x278444(0x1e7)][_0x278444(0x204)]({'where':{'id':_0x347caa}});if(!_0xaeee4c)return;const {isShow:_0xb8765f}=_0xaeee4c,_0x585839=await this[_0x278444(0x1e7)][_0x278444(0x215)]({'id':_0x347caa},{'isShow':!_0xb8765f});return _0x585839[_0x278444(0x1e1)]>0x0;}async[_0x20d9df(0x1cd)](_0x261d97){const _0x5a117f=_0x20d9df,{id:_0x407f74}=_0x261d97;_0x261d97['isSystem']?_0x261d97[_0x5a117f(0x1dd)]='':_0x261d97[_0x5a117f(0x1f2)]='';delete _0x261d97['isSystem'];try{if(_0x407f74){const _0x68a7ef=await this[_0x5a117f(0x1e7)][_0x5a117f(0x215)]({'id':_0x407f74},_0x261d97);return _0x68a7ef[_0x5a117f(0x1e1)]>0x0;}else{const _0x30fa5c=await this['menuEntity'][_0x5a117f(0x1d8)](_0x261d97);return _0x30fa5c;}}catch(_0x425b97){throw new common_1[(_0x5a117f(0x1f1))]('操作菜单失败!',common_1['HttpStatus'][_0x5a117f(0x205)]);}}async[_0x20d9df(0x217)](_0x2d84d9){const _0x59c88f=_0x20d9df,{id:_0x2f67bb}=_0x2d84d9;if(!_0x2f67bb)throw new common_1[(_0x59c88f(0x1f1))]('缺失必要参数!',common_1[_0x59c88f(0x219)][_0x59c88f(0x205)]);const _0xbd70d3=await this['menuEntity']['delete']({'id':_0x2f67bb});return _0xbd70d3;}async['updateIcon'](_0x5c2b43){const _0x9fb89c=_0x20d9df,{id:_0x54d5a8,menuIcon:_0x42396e,menuTipText:_0x38ca2a,order:_0x3e97ab}=_0x5c2b43;if(!_0x54d5a8||!_0x42396e||!_0x38ca2a||!_0x3e97ab)throw new common_1['HttpException']('缺失必要参数!',common_1[_0x9fb89c(0x219)]['BAD_REQUEST']);const _0x3bd390=await this[_0x9fb89c(0x1e7)][_0x9fb89c(0x215)]({'id':_0x54d5a8},{'menuIcon':_0x42396e,'menuTipText':_0x38ca2a,'order':_0x3e97ab});return _0x3bd390['affected']>0x0;}};MenuService=__decorate([(0x0,common_1['Injectable'])(),__param(0x0,(0x0,typeorm_1[_0x20d9df(0x1e9)])(menu_entity_1['MenuEntity'])),__metadata(_0x20d9df(0x1ed),[typeorm_2['Repository']])],MenuService),exports[_0x20d9df(0x1cf)]=MenuService; |