From 2c01e4350af34384edf9339ffe39ec3552a3489b Mon Sep 17 00:00:00 2001 From: xuqm Date: Tue, 4 Apr 2023 09:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npm/index.d.ts | 7 +++---- npm/index.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/npm/index.d.ts b/npm/index.d.ts index ae30666..8e02c89 100644 --- a/npm/index.d.ts +++ b/npm/index.d.ts @@ -54,7 +54,6 @@ export declare interface Message { toClientId: string; timestamp: number; message: string | TextMessage | PictureMessage; - describe: string; } @@ -62,7 +61,7 @@ export declare interface ISzyxPush { setBaseUrl(url: string) - install(app, tenantNo: string, osType: OsType, url: string | null): Promise; + install(app, tenantNo: string, osType: OsType, url?: string): Promise; /** @@ -71,7 +70,7 @@ export declare interface ISzyxPush { * @param osType 设备类型 {@link OsType} * @param url 服务端地址,可以不传 */ - init(tenantNo: string, osType: OsType, url: string | null): Promise; + init(tenantNo: string, osType: OsType, url?: string): Promise; register(userId: string): Promise; @@ -88,5 +87,5 @@ export declare interface ISzyxPush { */ unMessage(callId): void; - sendTextMsg(userId: string, text: string): Promise; + sendTextMsg(userId: string, text: string, describe?: string): Promise; } diff --git a/npm/index.js b/npm/index.js index 71e4d9a..71db5fb 100644 --- a/npm/index.js +++ b/npm/index.js @@ -1 +1 @@ -const _0x36fe=['socketOpen','SENDACK','random','_client','windows','192.168.115.137','setHostAndPort','sendTextMsg','_port','/ws','message','send','map','租户id不能为空','15774','ws://','connect','get','_userId','_user','http://192.168.115.137:8888','stringify','_baseUrl','_mapMsg','web','onSocketOpen','mapCall','sendMessage','SEND','/topic/','packetType','_host','/hello/123','unknown','messageType','{\x22text\x22:\x22','messageId','onSocketMessage','then','订阅消息失败::','_password','guid','setDeviceType','_connectClient','sendSocketMessage','values','over','data','_userName','mac','ios','setInterval','用户id不能为空','value','_tenantNo','request','_parseMsg','client','android','parse'];const _0x59d2=function(_0x36feb4,_0x59d201){_0x36feb4=_0x36feb4-0x0;let _0x46cdee=_0x36fe[_0x36feb4];return _0x46cdee;};import _0x537267 from'fingerprintjs2';import _0x55451e from'axios';import _0x75729b from'stompjs';export var OsType;(function(_0x2fd960){_0x2fd960[_0x2fd960['unknown']=-0x1]=_0x59d2('0x21');_0x2fd960[_0x2fd960[_0x59d2('0x32')]=0x1]='ios';_0x2fd960[_0x2fd960[_0x59d2('0x3a')]=0x2]=_0x59d2('0x3a');_0x2fd960[_0x2fd960[_0x59d2('0x18')]=0x3]='web';_0x2fd960[_0x2fd960[_0x59d2('0x4')]=0x4]='windows';_0x2fd960[_0x2fd960[_0x59d2('0x31')]=0x5]=_0x59d2('0x31');_0x2fd960[_0x2fd960['wx']=0x6]='wx';}(OsType||(OsType={})));export const MsgType={'unknown':-0x1,'text':0x1,'voice':0x2,'image':0x3,'location':0x4,'video':0x5,'file':0x6,'at':0x7,'other':0x8,'log':0x9};class SzyxPushClient{constructor(){this[_0x59d2('0x1a')]=new Map();this['_mapMsg']=new Map();this[_0x59d2('0x1f')]=null;this['_port']=null;this['_deviceType']=null;this[_0x59d2('0x13')]=null;this[_0x59d2('0x3')]=null;this[_0x59d2('0x0')]=![];this['ws']={'send':this[_0x59d2('0x2c')]};}[_0x59d2('0x29')](){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'['replace'](/[xy]/g,function(_0x582108){const _0x5aaf64=Math[_0x59d2('0x2')]()*0x10|0x0,_0x2ac91d=_0x582108==='x'?_0x5aaf64:_0x5aaf64&0x3|0x8;return _0x2ac91d['toString'](0x10);});}['_parseMsg'](_0x26cf61){let _0x2567af=_0x26cf61[_0x59d2('0xa')];try{_0x2567af=JSON[_0x59d2('0x3b')](_0x26cf61['message']);}catch(_0x206cc4){}return{..._0x26cf61,'message':_0x2567af};}[_0x59d2('0x6')](_0x42ad99,_0x36e67e){this['_host']=_0x42ad99;this['_port']=_0x36e67e;}[_0x59d2('0x2a')](_0x7bd0e5){this['_deviceType']=_0x7bd0e5;}['onMessage'](_0x41ff5d){let _0x5def3e=Math['random']();if(this[_0x59d2('0x1a')]['has'](_0x5def3e))_0x5def3e=Math[_0x59d2('0x2')]();this[_0x59d2('0x1a')]['set'](_0x5def3e,_0x41ff5d);return _0x5def3e;}['unMessage'](_0x145eed){this['mapCall']['delete'](_0x145eed);}[_0x59d2('0x7')](_0x58a194,_0x479622,_0x39c3aa){return this[_0x59d2('0x1b')]({'toClientId':_0x58a194,'messageType':MsgType['file'],'message':_0x59d2('0x23')+_0x479622+'\x22}'},_0x39c3aa);}['sendMessage'](_0x253409,_0xf8c109){return new Promise((_0x71d6d6,_0x4671a5)=>{let _0x32e2c1=this['guid']();let _0x415208={'messageId':_0x32e2c1,'target':this['_user']['_userId'],'fromClientId':this[_0x59d2('0x13')][_0x59d2('0x12')],'tenantNo':this[_0x59d2('0x13')]['_tenantNo'],'timestamp':Date['now'](),'packetType':_0x59d2('0x1c'),..._0x253409};if(_0xf8c109)_0x415208['describe']=_0xf8c109;this['_mapMsg']['set'](_0x32e2c1,{'call':_0x71d6d6,'message':_0x415208});this[_0x59d2('0x3')][_0x59d2('0xb')]('/topic/server',{},JSON[_0x59d2('0x15')](_0x415208));setTimeout(()=>{if(this[_0x59d2('0x17')]['has'](_0x32e2c1))_0x4671a5({'msg':'发送消息失败','content':this[_0x59d2('0x38')](_0x415208)});this['_mapMsg']['delete'](_0x32e2c1);},0x1f4);});}['sendSocketMessage'](_0xf136a){wx['sendSocketMessage']({'data':_0xf136a});}['_connectClient'](_0x1c2fa0,_0x4c8874){this['_client']['debug']=null;this[_0x59d2('0x3')][_0x59d2('0x10')](this['_user']['_userName'],this['_user'][_0x59d2('0x28')],()=>{_0x1c2fa0();this[_0x59d2('0x3')]['subscribe'](_0x59d2('0x1d')+this[_0x59d2('0x13')][_0x59d2('0x12')],_0x47949f=>{const _0x186a55=JSON['parse'](_0x47949f['body']);if(_0x186a55[_0x59d2('0x1e')]==='SEND'){this[_0x59d2('0x3')][_0x59d2('0xb')]('/topic/server',{},JSON['stringify']({'packetType':_0x59d2('0x1'),'messageId':_0x186a55[_0x59d2('0x24')]}));for(const _0x2b2fed of this[_0x59d2('0x1a')][_0x59d2('0x2d')]()){_0x2b2fed(_0x186a55[_0x59d2('0x22')],this[_0x59d2('0x38')](_0x186a55));}}else if(_0x186a55[_0x59d2('0x1e')]==='SENDACK'){const _0x1e4e16=this['_mapMsg']['get'](_0x186a55['messageId']);if(_0x1e4e16)_0x1e4e16['call'](this['_parseMsg'](_0x1e4e16[_0x59d2('0xa')]));this[_0x59d2('0x17')]['delete'](_0x186a55['messageId']);}},_0x509318=>_0x4c8874(_0x59d2('0x27')+_0x509318));},_0x344795=>_0x4c8874('连接服务器失败::'+_0x344795),'/');}[_0x59d2('0x10')](_0x37ee87){this['_user']=_0x37ee87;return new Promise((_0x14b4fc,_0x2e69b9)=>{if(!this[_0x59d2('0x1f')]||!this['_port'])_0x2e69b9('环境信息错误');if(!this[_0x59d2('0x13')]||!this[_0x59d2('0x13')][_0x59d2('0x30')]||!this[_0x59d2('0x13')]['_password'])_0x2e69b9('用户信息错误');if(_isWx()){wx['connectSocket']({'url':_0x59d2('0xf')+this['_host']+':'+this[_0x59d2('0x8')]+_0x59d2('0x9')});wx[_0x59d2('0x19')](_0x3bd1ad=>{this[_0x59d2('0x0')]=!![];this['ws']['onopen']();});wx[_0x59d2('0x25')](_0x205a28=>{this['ws']['onmessage'](_0x205a28);});_0x75729b[_0x59d2('0x33')]=(_0x953097,_0x1e8dfc)=>{return setInterval(_0x1e8dfc,_0x953097);};_0x75729b['clearInterval']=_0xd78a3c=>{return clearInterval(_0xd78a3c);};this[_0x59d2('0x3')]=_0x75729b[_0x59d2('0x2e')](this['ws']);}else{this[_0x59d2('0x3')]=_0x75729b[_0x59d2('0x39')](_0x59d2('0xf')+this['_host']+':'+this[_0x59d2('0x8')]+_0x59d2('0x9'));}this[_0x59d2('0x2b')](_0x14b4fc,_0x2e69b9);});}}class SzyxPushUser{constructor(){this[_0x59d2('0x36')]=null;this[_0x59d2('0x12')]=null;this['_deviceId']=null;this['_account']=null;this[_0x59d2('0x30')]=null;this['_password']=null;}}let _imClient=new SzyxPushClient();let _imUser=new SzyxPushUser();const _isWx=()=>{return _imClient['_deviceType']===0x6;};const _createFingerprint=()=>{return new Promise(_0x4f0a25=>{_0x537267[_0x59d2('0x11')](_0x171a56=>{const _0x5d8139=_0x171a56[_0x59d2('0xc')](function(_0x165d7e,_0x538e0a){if(_0x538e0a===0x0&&_0x165d7e[_0x59d2('0x35')]){return _0x165d7e[_0x59d2('0x35')]['replace'](/\bNetType\/\w+\b/,'');}return _0x165d7e['value'];});_0x4f0a25(_0x537267['x64hash128'](_0x5d8139['join'](''),0x1f));});});};const _connect=(_0x5322c3,_0x36e2dc,_0x15e4d0)=>{_imClient[_0x59d2('0x6')](_0x59d2('0x5'),_0x59d2('0xe'));_imUser['_account']='56465456';_imUser['_userName']=_imUser[_0x59d2('0x12')];_imUser[_0x59d2('0x28')]=_imUser[_0x59d2('0x12')];_imClient[_0x59d2('0x10')](_imUser)['then'](()=>_0x36e2dc())['catch'](_0x3ffa6a=>_0x15e4d0(_0x3ffa6a));};const SzyxPush={'_baseUrl':_0x59d2('0x14'),'setBaseUrl':function(_0x271bc4){this[_0x59d2('0x16')]=_0x271bc4;},'install':function(_0xb8ebd9,_0xaf5aad,_0x367525,_0x5df51a){return this['init'](_0xaf5aad,_0x367525,_0x5df51a);},'init':function(_0x4aebfb,_0x28db29,_0x149be){this[_0x59d2('0x16')]=_0x149be;console['log'](_0x4aebfb+'::'+_0x28db29);_imUser[_0x59d2('0x36')]=_0x4aebfb;_imClient[_0x59d2('0x2a')](_0x28db29);return new Promise((_0x56fc09,_0x5e075c)=>{if(!_0x4aebfb)_0x5e075c(_0x59d2('0xd'));_createFingerprint()[_0x59d2('0x26')](_0xae3494=>{_imUser['_deviceId']=_0xae3494;_0x56fc09();});});},'onMessage':function(_0x44d45f){return _imClient['onMessage'](_0x44d45f);},'unMessage':function(_0x1e6ed0){_imClient['unMessage'](_0x1e6ed0);},'register':function(_0x556cd8){return new Promise((_0x17264d,_0x2c6ab0)=>{if(!_0x556cd8)_0x2c6ab0(_0x59d2('0x34'));_imUser[_0x59d2('0x12')]=_0x556cd8;if(_isWx()){uni[_0x59d2('0x37')]({'url':this[_0x59d2('0x16')]+_0x59d2('0x20'),'success':_0x13f1c4=>{_connect(_0x13f1c4[_0x59d2('0x2f')],_0x17264d,_0x2c6ab0);},'fail':_0x4b9c60=>{_0x2c6ab0('注册im服务失败::'+error);}});}else{_0x55451e['create']({'timeout':0xea60})[_0x59d2('0x11')](this['_baseUrl']+'/hello/123')[_0x59d2('0x26')](_0x1bb89e=>{_connect(_0x1bb89e[_0x59d2('0x2f')],_0x17264d,_0x2c6ab0);})['catch'](_0x553093=>{_0x2c6ab0('注册im服务失败::'+_0x553093);});}});},'sendTextMsg':function(_0x3cbd40,_0x58565c,_0x4acd7c){return _imClient[_0x59d2('0x7')](_0x3cbd40,_0x58565c,_0x4acd7c);}};export default SzyxPush; +const _0x4f19=['unknown','/topic/server','sendSocketMessage','/hello/123','http://192.168.115.137:8888','_tenantNo','map','describe','onopen','parse','mapCall','join','random','_port','body','{\x22text\x22:\x22','_user','_baseUrl','onSocketOpen','_userName','message','value','send','mac','request','client','_deviceType','_client','file','setHostAndPort','get','web','用户信息错误','delete','_parseMsg','_host','192.168.115.137','SEND','setDeviceType','环境信息错误','unMessage','setInterval','windows','has','replace','guid','toString','onmessage','clearInterval','catch','用户id不能为空','http','_deviceId','subscribe','注册im服务失败::','connect','call','onMessage','socketOpen','ws://','stringify','ios','_mapMsg','_userId','_password','_account','xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx','/topic/','租户id不能为空','_connectClient','/ws','sendMessage','发送消息失败'];const _0x4f81=function(_0x4f192e,_0x4f81ad){_0x4f192e=_0x4f192e-0x0;let _0x4807ea=_0x4f19[_0x4f192e];return _0x4807ea;};import _0x3bce0c from'fingerprintjs2';import _0x447914 from'axios';import _0x2087cc from'stompjs';export var OsType;(function(_0x3938e7){_0x3938e7[_0x3938e7['unknown']=-0x1]=_0x4f81('0x0');_0x3938e7[_0x3938e7['ios']=0x1]=_0x4f81('0x3d');_0x3938e7[_0x3938e7['android']=0x2]='android';_0x3938e7[_0x3938e7['web']=0x3]=_0x4f81('0x1f');_0x3938e7[_0x3938e7['windows']=0x4]=_0x4f81('0x2a');_0x3938e7[_0x3938e7[_0x4f81('0x17')]=0x5]=_0x4f81('0x17');_0x3938e7[_0x3938e7['wx']=0x6]='wx';}(OsType||(OsType={})));export const MsgType={'unknown':-0x1,'text':0x1,'voice':0x2,'image':0x3,'location':0x4,'video':0x5,'file':0x6,'at':0x7,'other':0x8,'log':0x9};class SzyxPushClient{constructor(){this[_0x4f81('0xa')]=new Map();this[_0x4f81('0x3e')]=new Map();this[_0x4f81('0x23')]=null;this['_port']=null;this['_deviceType']=null;this[_0x4f81('0x10')]=null;this[_0x4f81('0x1b')]=null;this[_0x4f81('0x3a')]=![];this['ws']={'send':this['sendSocketMessage']};}[_0x4f81('0x2d')](){return _0x4f81('0x42')['replace'](/[xy]/g,function(_0x3f4e63){const _0x411dff=Math['random']()*0x10|0x0,_0x5c72a4=_0x3f4e63==='x'?_0x411dff:_0x411dff&0x3|0x8;return _0x5c72a4[_0x4f81('0x2e')](0x10);});}[_0x4f81('0x22')](_0x2fc8fd){let _0x24d0a1=_0x2fc8fd[_0x4f81('0x14')];try{_0x24d0a1=JSON[_0x4f81('0x9')](_0x2fc8fd['message']);}catch(_0x449be2){}return{..._0x2fc8fd,'message':_0x24d0a1};}['setHostAndPort'](_0x2b8fca,_0x187cad){this['_host']=_0x2b8fca;this[_0x4f81('0xd')]=_0x187cad;}[_0x4f81('0x26')](_0x15f221){this[_0x4f81('0x1a')]=_0x15f221;}['onMessage'](_0x58c8eb){let _0x19a783=Math[_0x4f81('0xc')]();if(this[_0x4f81('0xa')][_0x4f81('0x2b')](_0x19a783))_0x19a783=Math[_0x4f81('0xc')]();this['mapCall']['set'](_0x19a783,_0x58c8eb);return _0x19a783;}['unMessage'](_0x345814){this['mapCall'][_0x4f81('0x21')](_0x345814);}['sendTextMsg'](_0x53d469,_0x4b0098,_0x2a7d24){return this[_0x4f81('0x47')]({'toClientId':_0x53d469,'messageType':MsgType[_0x4f81('0x1c')],'message':_0x4f81('0xf')+_0x4b0098+'\x22}'},_0x2a7d24);}['sendMessage'](_0x651330,_0x7cf5ae){return new Promise((_0x472b1d,_0x2cda80)=>{let _0x1211dc=this['guid']();let _0x2ff1fd={'messageId':_0x1211dc,'target':this[_0x4f81('0x10')][_0x4f81('0x3f')],'fromClientId':this['_user']['_userId'],'tenantNo':this[_0x4f81('0x10')][_0x4f81('0x5')],'timestamp':Date['now'](),'packetType':'SEND',..._0x651330};if(_0x7cf5ae)_0x2ff1fd[_0x4f81('0x7')]=_0x7cf5ae;this[_0x4f81('0x3e')]['set'](_0x1211dc,{'call':_0x472b1d,'message':_0x2ff1fd});this['_client'][_0x4f81('0x16')](_0x4f81('0x1'),{},JSON['stringify'](_0x2ff1fd));setTimeout(()=>{if(this['_mapMsg'][_0x4f81('0x2b')](_0x1211dc))_0x2cda80({'msg':_0x4f81('0x48'),'content':this['_parseMsg'](_0x2ff1fd)});this['_mapMsg'][_0x4f81('0x21')](_0x1211dc);},0x1f4);});}[_0x4f81('0x2')](_0x575052){wx['sendSocketMessage']({'data':_0x575052});}[_0x4f81('0x45')](_0x356fa4,_0x5b47a5){this[_0x4f81('0x1b')]['debug']=null;this[_0x4f81('0x1b')][_0x4f81('0x37')](this[_0x4f81('0x10')][_0x4f81('0x13')],this[_0x4f81('0x10')]['_password'],()=>{_0x356fa4();this['_client'][_0x4f81('0x35')](_0x4f81('0x43')+this['_user']['_userId'],_0x2f57aa=>{const _0x4ae897=JSON['parse'](_0x2f57aa[_0x4f81('0xe')]);if(_0x4ae897['packetType']===_0x4f81('0x25')){this['_client']['send'](_0x4f81('0x1'),{},JSON[_0x4f81('0x3c')]({'packetType':'SENDACK','messageId':_0x4ae897['messageId']}));for(const _0x349011 of this['mapCall']['values']()){_0x349011(_0x4ae897['messageType'],this['_parseMsg'](_0x4ae897));}}else if(_0x4ae897['packetType']==='SENDACK'){const _0x2cd6e9=this[_0x4f81('0x3e')]['get'](_0x4ae897['messageId']);if(_0x2cd6e9)_0x2cd6e9[_0x4f81('0x38')](this['_parseMsg'](_0x2cd6e9['message']));this[_0x4f81('0x3e')][_0x4f81('0x21')](_0x4ae897['messageId']);}},_0x1ccd24=>_0x5b47a5('订阅消息失败::'+_0x1ccd24));},_0xb6d4ff=>_0x5b47a5('连接服务器失败::'+_0xb6d4ff),'/');}[_0x4f81('0x37')](_0x47a902){this['_user']=_0x47a902;return new Promise((_0x4ebfa8,_0x1afb7f)=>{if(!this['_host']||!this[_0x4f81('0xd')])_0x1afb7f(_0x4f81('0x27'));if(!this['_user']||!this['_user']['_userName']||!this['_user']['_password'])_0x1afb7f(_0x4f81('0x20'));if(_isWx()){wx['connectSocket']({'url':_0x4f81('0x3b')+this[_0x4f81('0x23')]+':'+this['_port']+_0x4f81('0x46')});wx[_0x4f81('0x12')](_0x43c4ad=>{this['socketOpen']=!![];this['ws'][_0x4f81('0x8')]();});wx['onSocketMessage'](_0x234731=>{this['ws'][_0x4f81('0x2f')](_0x234731);});_0x2087cc[_0x4f81('0x29')]=(_0x21c84e,_0x43f11b)=>{return setInterval(_0x43f11b,_0x21c84e);};_0x2087cc[_0x4f81('0x30')]=_0x47367c=>{return clearInterval(_0x47367c);};this['_client']=_0x2087cc['over'](this['ws']);}else{this['_client']=_0x2087cc[_0x4f81('0x19')](_0x4f81('0x3b')+this['_host']+':'+this[_0x4f81('0xd')]+'/ws');}this[_0x4f81('0x45')](_0x4ebfa8,_0x1afb7f);});}}class SzyxPushUser{constructor(){this[_0x4f81('0x5')]=null;this[_0x4f81('0x3f')]=null;this[_0x4f81('0x34')]=null;this[_0x4f81('0x41')]=null;this[_0x4f81('0x13')]=null;this[_0x4f81('0x40')]=null;}}let _imClient=new SzyxPushClient();let _imUser=new SzyxPushUser();const _isWx=()=>{return _imClient['_deviceType']===0x6;};const _createFingerprint=()=>{return new Promise(_0x4d8ebf=>{_0x3bce0c['get'](_0x208e0c=>{const _0xbb449b=_0x208e0c[_0x4f81('0x6')](function(_0x3dad33,_0x256c98){if(_0x256c98===0x0&&_0x3dad33['value']){return _0x3dad33[_0x4f81('0x15')][_0x4f81('0x2c')](/\bNetType\/\w+\b/,'');}return _0x3dad33[_0x4f81('0x15')];});_0x4d8ebf(_0x3bce0c['x64hash128'](_0xbb449b[_0x4f81('0xb')](''),0x1f));});});};const _connect=(_0x5e2ded,_0x5a8236,_0x36d42a)=>{_imClient[_0x4f81('0x1d')](_0x4f81('0x24'),'15774');_imUser[_0x4f81('0x41')]='56465456';_imUser[_0x4f81('0x13')]=_imUser['_userId'];_imUser['_password']=_imUser[_0x4f81('0x3f')];_imClient['connect'](_imUser)['then'](()=>_0x5a8236())['catch'](_0x2a9a3d=>_0x36d42a(_0x2a9a3d));};const SzyxPush={'_baseUrl':_0x4f81('0x4'),'setBaseUrl':function(_0x4d3734){if(_0x4d3734&&_0x4d3734['startsWith'](_0x4f81('0x33')))this[_0x4f81('0x11')]=_0x4d3734;},'install':function(_0x22c86d,_0x20d547,_0x8c0b46,_0x3a13e9){return this['init'](_0x20d547,_0x8c0b46,_0x3a13e9);},'init':function(_0x238b27,_0x4d4c32,_0x45092a){if(_0x45092a&&_0x45092a['startsWith'](_0x4f81('0x33')))this[_0x4f81('0x11')]=_0x45092a;console['log'](_0x238b27+'::'+_0x4d4c32);_imUser['_tenantNo']=_0x238b27;_imClient['setDeviceType'](_0x4d4c32);return new Promise((_0x39e8c3,_0x3b0c76)=>{if(!_0x238b27)_0x3b0c76(_0x4f81('0x44'));_createFingerprint()['then'](_0x16b414=>{_imUser[_0x4f81('0x34')]=_0x16b414;_0x39e8c3();});});},'onMessage':function(_0xfcbfb1){return _imClient[_0x4f81('0x39')](_0xfcbfb1);},'unMessage':function(_0x15293c){_imClient[_0x4f81('0x28')](_0x15293c);},'register':function(_0xb181ee){return new Promise((_0x1ef76c,_0x455706)=>{if(!_0xb181ee)_0x455706(_0x4f81('0x32'));_imUser[_0x4f81('0x3f')]=_0xb181ee;if(_isWx()){uni[_0x4f81('0x18')]({'url':this['_baseUrl']+'/hello/123','success':_0x45d768=>{_connect(_0x45d768['data'],_0x1ef76c,_0x455706);},'fail':_0x374811=>{_0x455706(_0x4f81('0x36')+error);}});}else{_0x447914['create']({'timeout':0xea60})[_0x4f81('0x1e')](this['_baseUrl']+_0x4f81('0x3'))['then'](_0x349fc0=>{_connect(_0x349fc0['data'],_0x1ef76c,_0x455706);})[_0x4f81('0x31')](_0x24168c=>{_0x455706(_0x4f81('0x36')+_0x24168c);});}});},'sendTextMsg':function(_0x429eb1,_0x5533f6,_0x300af5){return _imClient['sendTextMsg'](_0x429eb1,_0x5533f6,_0x300af5);}};export default SzyxPush;