first commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 690 B |
@@ -0,0 +1,46 @@
|
||||
import { Service } from '@/Service/Service';
|
||||
/*****连接*****/
|
||||
class ImConnectService {
|
||||
private static GetConnectPath: string = '/Im/GetConnect';
|
||||
/*****获取连接*****/
|
||||
static GetConnect() {
|
||||
var result = Service.Request(this.GetConnectPath, 'POST', {type:3});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static IsOnlinePath: string = '/Im/IsOnline';
|
||||
/*****判断是否在线*****/
|
||||
static IsOnline(id:number) {
|
||||
var result = Service.Request(this.IsOnlinePath, 'POST', id);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static JoinChatPath: string = '/Im/JoinChat';
|
||||
/*****加入聊天室*****/
|
||||
static JoinChat(id: number,chan:number) {
|
||||
var result = Service.Request(this.JoinChatPath, 'POST', { id,chan });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static SendChanMsgPath: string = '/Im/SendChanMsg';
|
||||
/*****发送聊天室消息*****/
|
||||
static SendChanMsg(id: number, user: string, chan: string, type: string,msg:string,media:string) {
|
||||
var result = Service.Request(this.SendChanMsgPath, 'POST', { id, user, chan, type , msg , media });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static ExitChatPath: string = '/Im/ExitChat';
|
||||
/*****离开聊天室*****/
|
||||
static ExitChat(id:number, chan: string) {
|
||||
var result = Service.Request(this.ExitChatPath, 'POST', {id, chan });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static GetOrderMessagePath: string = '/Order/GetOrderMessage';
|
||||
/*****聊天记录*****/
|
||||
static GetOrderMessage(orderId:string) {
|
||||
var result = Service.Request(this.GetOrderMessagePath, 'GET', {orderId });
|
||||
return result;
|
||||
}
|
||||
}
|
||||
export { Service, ImConnectService };
|
||||
Reference in New Issue
Block a user