Files
18xchat/assets/Scripts/chat18x/network/services/HttpGirlService.ts
T

131 lines
4.5 KiB
TypeScript
Raw Normal View History

2025-08-29 16:39:41 +08:00
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<ApiResponse<proto.cs.ICSDailyRecommendRes>> {
let epData: Endpoint<proto.cs.ICSDailyRecommendReq, proto.cs.ICSDailyRecommendRes> = {
path: "api/logic/dailyRecommend",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-10-10 18:14:03 +08:00
// 推荐列表
async reqRecommendList(req: proto.cs.ICSRecommendReq): Promise<ApiResponse<proto.cs.ICSRecommendRes>> {
let epData: Endpoint<proto.cs.ICSRecommendReq, proto.cs.ICSRecommendRes> = {
path: "api/logic/recommend",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-08-29 16:39:41 +08:00
// 获取技师列表
async reqGetGirlList(req: proto.cs.ICSGetGirlListReq): Promise<ApiResponse<proto.cs.ICSGetGirlListRes>> {
let epData: Endpoint<proto.cs.ICSGetGirlListReq, proto.cs.ICSGetGirlListRes> = {
path: "api/logic/getGirls",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
// 获取技师详细信息
async reqGetGirlDetail(req: proto.cs.ICSGetGirlDetailReq): Promise<ApiResponse<proto.cs.ICSGetGirlDetailRes>> {
let epData: Endpoint<proto.cs.ICSGetGirlDetailReq, proto.cs.ICSGetGirlDetailRes> = {
path: "api/logic/girlDetail",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-09-08 19:44:45 +08:00
// 解锁技师
async reqUnlockGirl(req: proto.cs.ICSUnlockGirlReq): Promise<ApiResponse<proto.cs.ICSUnlockGirlRes>> {
let epData: Endpoint<proto.cs.ICSUnlockGirlReq, proto.cs.ICSUnlockGirlRes> = {
path: "api/logic/unlockGirl",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
// 解锁资源
async reqUnlockGirlRes(req: proto.cs.ICSUnlockResourceReq): Promise<ApiResponse<proto.cs.ICSUnlockResourceRes>> {
let epData: Endpoint<proto.cs.ICSUnlockResourceReq, proto.cs.ICSUnlockResourceRes> = {
path: "api/logic/unlockResource",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-09-22 17:54:33 +08:00
// 获取可聊天的技师数据
async reqCanChatGirlData(req: proto.cs.ICSGetLastChatListReq): Promise<ApiResponse<proto.cs.ICSGetLastChatListRes>> {
let epData: Endpoint<proto.cs.ICSGetLastChatListReq, proto.cs.ICSGetLastChatListRes> = {
path: "api/logic/getLastChat",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-10-08 15:47:32 +08:00
// 获取排行榜列表
async reqGirlRankData(req: proto.cs.ICSGetRankReq): Promise<ApiResponse<proto.cs.ICSGetRankRes>> {
let epData: Endpoint<proto.cs.ICSGetRankReq, proto.cs.ICSGetRankRes> = {
path: "api/logic/getRank",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-10-08 16:03:11 +08:00
// 查看图片或者视频上报,用于排行榜
async reqViewGirl(req: proto.cs.ICSViewGirlReq): Promise<ApiResponse<proto.cs.ICSViewGirlRes>> {
let epData: Endpoint<proto.cs.ICSViewGirlReq, proto.cs.ICSViewGirlRes> = {
path: "api/logic/viewGirl",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-10-08 16:03:11 +08:00
// 收藏技师
async reqBookmarkGirl(req: proto.cs.ICSBookmarkReq): Promise<ApiResponse<proto.cs.ICSBookmarkRes>> {
let epData: Endpoint<proto.cs.ICSBookmarkReq, proto.cs.ICSBookmarkRes> = {
path: "api/logic/bookmark",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
// 获取收藏列表
async reqBookmarkGirlList(req: proto.cs.ICSGetBookmarkReq): Promise<ApiResponse<proto.cs.ICSGetBookmarkRes>> {
let epData: Endpoint<proto.cs.ICSGetBookmarkReq, proto.cs.ICSGetBookmarkRes> = {
path: "api/logic/getBookmark",
method: "POST",
codec: "json",
needsAuth: true
};
return this.api.call(epData, req);
}
2025-08-29 16:39:41 +08:00
}