2025-11-13 18:03:26 +08:00
|
|
|
//
|
|
|
|
|
// KBAPI.h
|
|
|
|
|
// 统一管理所有接口路径的宏,避免在代码中散落硬编码字符串。
|
|
|
|
|
// 注意:这里的路径为相对 KB_BASE_URL 的“相对路径”,可带或不带开头的斜杠。
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef KBAPI_h
|
|
|
|
|
#define KBAPI_h
|
|
|
|
|
|
2025-11-13 19:07:59 +08:00
|
|
|
|
2025-12-03 12:55:51 +08:00
|
|
|
//#ifndef SUCCESS_CODE
|
|
|
|
|
//#define SUCCESS_CODE 200
|
|
|
|
|
//#endif
|
|
|
|
|
//#ifndef ERROR_CODE
|
|
|
|
|
//#define ERROR_CODE 500
|
|
|
|
|
//#endif
|
2025-11-13 21:22:10 +08:00
|
|
|
|
|
|
|
|
|
2025-11-13 19:07:59 +08:00
|
|
|
// 兼容旧命名(如有使用 API_APPLE_LOGIN 的位置,映射到统一命名)
|
2025-11-13 18:03:26 +08:00
|
|
|
#define API_APPLE_LOGIN @"/user/appleLogin" // Apple 登录
|
2025-12-04 13:37:11 +08:00
|
|
|
#define API_EMAIL_LOGIN @"/user/login" // email 登录
|
2025-12-04 15:28:11 +08:00
|
|
|
#define API_EMAIL_REGISTER @"/user/register" // email 注册
|
|
|
|
|
|
2025-12-03 13:31:02 +08:00
|
|
|
#define API_LOGOUT @"/user/logout" // 退出登录
|
2025-12-04 13:37:11 +08:00
|
|
|
|
|
|
|
|
#define API_UPDATA_INFO @"/user/updateInfo" // 更新用户
|
|
|
|
|
|
2025-12-03 20:14:14 +08:00
|
|
|
#define KB_API_USER_DETAIL @"/user/detail" // 用户详情
|
2025-12-03 19:19:20 +08:00
|
|
|
#define KB_API_CHARACTER_LIST @"/character/list" // 排行榜角色列表(综合)
|
|
|
|
|
#define KB_API_CHARACTER_LIST_BY_TAG @"/character/listByTag" // 根据 tagId 获取角色列表
|
|
|
|
|
#define KB_API_TAG_LIST @"/tag/list" // 排行榜标签列表
|
2025-12-04 13:37:11 +08:00
|
|
|
#define KB_API_FILE_UPLOAD @"/file/upload" // 上传头像
|
|
|
|
|
#define KB_API_CHARACTER_DETAIL @"/character/detail" // 人设详情
|
2025-12-04 15:35:23 +08:00
|
|
|
#define KB_API_CHARACTER_LISTBYUSER @"/character/listByUser" // 用户人设列表
|
2025-12-04 15:44:43 +08:00
|
|
|
#define API_CHARACTER_UPDATE_USER_CHARTSORT @"/character/updateUserCharacterSort" // 更新用户人设排序
|
2025-12-04 16:41:33 +08:00
|
|
|
#define API_CHARACTER_DEL_USER_CHARACTER @"/character/delUserCharacter" // 删除用户人设
|
2025-12-04 13:37:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 18:03:26 +08:00
|
|
|
|
|
|
|
|
// 应用配置
|
|
|
|
|
#ifndef KB_API_APP_CONFIG
|
|
|
|
|
#define KB_API_APP_CONFIG @"app/config" // 获取 App 配置
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-11-13 19:20:57 +08:00
|
|
|
#ifndef KB_API_IAP_VERIFY
|
|
|
|
|
#define KB_API_IAP_VERIFY @"/payment/apple/verify" // Apple IAP 验签(示例路径,请按后端实际修改)
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-11-13 18:03:26 +08:00
|
|
|
#endif /* KBAPI_h */
|