diff --git a/assets/Scripts/chat18x/network/services/ChatService.ts b/assets/Scripts/chat18x/network/services/ChatService.ts new file mode 100644 index 00000000..5fa0c35a --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ChatService.ts @@ -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 ChatService { + private static _I: ChatService | null = null; + public static get I(): ChatService { + if (!ChatService._I) ChatService._I = new ChatService(); + return ChatService._I; + } + private constructor(private api = ApiClient.I) {} + + // 购买聊天次数 + public async reqBuyChat(req: proto.cs.ICSBuyChatReq): Promise> { + let epData: Endpoint = { + path: "api/logic/buyChat", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } +} diff --git a/assets/Scripts/chat18x/network/services/ChatService.ts.meta b/assets/Scripts/chat18x/network/services/ChatService.ts.meta new file mode 100644 index 00000000..211964fd --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ChatService.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "16cb7bbc-91fd-4987-ac99-79f4cf1e732b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/network/services/GirlService.ts b/assets/Scripts/chat18x/network/services/GirlService.ts new file mode 100644 index 00000000..39bad043 --- /dev/null +++ b/assets/Scripts/chat18x/network/services/GirlService.ts @@ -0,0 +1,46 @@ +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 GirlService { + private static _I: GirlService | null = null; + public static get I(): GirlService { + if (!GirlService._I) GirlService._I = new GirlService(); + return GirlService._I; + } + private constructor(private api = ApiClient.I) {} + + // 每日推荐 + public async reqDailyRecommend(req: proto.cs.ICSDailyRecommendReq): Promise> { + let epData: Endpoint = { + path: "api/logic/dailyRecommend", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } + + // 获取技师列表 + public async reqGetGirlList(req: proto.cs.ICSGetGirlListReq): Promise> { + let epData: Endpoint = { + path: "api/logic/getGirls", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } + + // 获取技师详细信息 + public async reqGetGirlDetail(req: proto.cs.ICSGetGirlDetailReq): Promise> { + let epData: Endpoint = { + path: "api/logic/girlDetail", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } +} diff --git a/assets/Scripts/chat18x/network/services/GirlService.ts.meta b/assets/Scripts/chat18x/network/services/GirlService.ts.meta new file mode 100644 index 00000000..1fdf392c --- /dev/null +++ b/assets/Scripts/chat18x/network/services/GirlService.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "c115537a-22f6-43a3-be0a-dc5c3a8ca1b7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/network/services/ShopService.ts b/assets/Scripts/chat18x/network/services/ShopService.ts new file mode 100644 index 00000000..ad294864 --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ShopService.ts @@ -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 ShopService { + private static _I: ShopService | null = null; + public static get I(): ShopService { + if (!ShopService._I) ShopService._I = new ShopService(); + return ShopService._I; + } + private constructor(private api = ApiClient.I) {} + + // 获取商品列表 + public async reqShopList(req: proto.cs.ICSGetShopReq): Promise> { + let epData: Endpoint = { + path: "api/logic/shop", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } +} diff --git a/assets/Scripts/chat18x/network/services/ShopService.ts.meta b/assets/Scripts/chat18x/network/services/ShopService.ts.meta new file mode 100644 index 00000000..9c5a59b8 --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ShopService.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "ba67b42d-8326-4aa9-8ef3-fb99821ac345", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/chat18x/network/services/ThemeService.ts b/assets/Scripts/chat18x/network/services/ThemeService.ts new file mode 100644 index 00000000..7cddacdf --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ThemeService.ts @@ -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> { + let epData: Endpoint = { + path: "api/logic/hallTheme", + method: "POST", + codec: "json", + needsAuth: true + }; + return this.api.call(epData, req); + } +} diff --git a/assets/Scripts/chat18x/network/services/ThemeService.ts.meta b/assets/Scripts/chat18x/network/services/ThemeService.ts.meta new file mode 100644 index 00000000..818e4355 --- /dev/null +++ b/assets/Scripts/chat18x/network/services/ThemeService.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "dc24010f-aa24-4e1a-8ef3-bc543a72cdf8", + "files": [], + "subMetas": {}, + "userData": {} +}