通讯服务层
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { ApiClient } from "../client/ApiClient";
|
||||
import type { Endpoint } from "../client/endpoints";
|
||||
import type { ApiResponse } from "../client/types";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
|
||||
export class ThemeService {
|
||||
private static _I: ThemeService | null = null;
|
||||
public static get I(): ThemeService {
|
||||
if (!ThemeService._I) ThemeService._I = new ThemeService();
|
||||
return ThemeService._I;
|
||||
}
|
||||
private constructor(private api = ApiClient.I) {}
|
||||
|
||||
// 获取大厅分类列表
|
||||
public async reqHallTheme(req: proto.cs.ICSHallThemeReq): Promise<ApiResponse<proto.cs.ICSHallThemeRes>> {
|
||||
let epData: Endpoint<proto.cs.ICSHallThemeReq, proto.cs.ICSHallThemeRes> = {
|
||||
path: "api/logic/hallTheme",
|
||||
method: "POST",
|
||||
codec: "json",
|
||||
needsAuth: true
|
||||
};
|
||||
return this.api.call(epData, req);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user