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"; import type { IGirlService } from "./IGirlService"; export class HttpGirlService implements IGirlService { constructor(private api = ApiClient.I) {} // 每日推荐 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); } // 获取技师列表 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); } // 获取技师详细信息 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); } // 解锁技师 async reqUnlockGirl(req: proto.cs.ICSUnlockGirlReq): Promise> { let epData: Endpoint = { path: "api/logic/unlockGirl", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 解锁资源 async reqUnlockGirlRes(req: proto.cs.ICSUnlockResourceReq): Promise> { let epData: Endpoint = { path: "api/logic/unlockResource", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } // 获取可聊天的技师数据 async reqCanChatGirlData(req: proto.cs.ICSGetLastChatListReq): Promise> { let epData: Endpoint = { path: "api/logic/getLastChat", method: "POST", codec: "json", needsAuth: true }; return this.api.call(epData, req); } }