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-08 16:39:47 +08:00
|
|
|
#define API_SEND_EMAIL_VERIFYMAIL @"/user/sendVerifyMail" // 发送验证码
|
|
|
|
|
#define API_VERIFY_EMAIL_CODE @"/user/verifyMailCode" // 验证验证码
|
|
|
|
|
#define API_RESET_PWD @"/user/resetPassWord" // 重置密码
|
|
|
|
|
|
|
|
|
|
|
2025-12-04 15:28:11 +08:00
|
|
|
|
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-04 20:04:02 +08:00
|
|
|
#define API_CHARACTER_LIST @"/character/list" // 排行榜角色列表(综合)
|
|
|
|
|
#define API_NOT_LOGIN_CHARACTER_LIST @"/character/listWithNotLogin" //未登录用户人设列表
|
|
|
|
|
|
|
|
|
|
#define API_CHARACTER_LIST_BY_TAG @"/character/listByTag" // 根据 tagId 获取角色列表
|
|
|
|
|
#define API_NOT_LOGIN_CHARACTER_LIST_BY_TAG @"/character/listByTagWithNotLogin" // 未登录用户按标签查询人设列表
|
|
|
|
|
|
2025-12-03 19:19:20 +08:00
|
|
|
#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 19:12:34 +08:00
|
|
|
#define API_CHARACTER_ADD_USER_CHARACTER @"/character/addUserCharacter" // 添加用户人设(假定路径,如有不同请按后端实际修改)
|
2025-12-04 13:37:11 +08:00
|
|
|
|
2025-12-11 13:16:06 +08:00
|
|
|
/// Theme shop
|
|
|
|
|
#define API_THEME_LIST_ALL_STYLES @"/themes/listAllStyles" // 查询所有主题风格
|
|
|
|
|
#define API_THEME_LIST_BY_STYLE @"/themes/listByStyle" // 按风格查询主题列表
|
2025-12-11 13:40:32 +08:00
|
|
|
#define API_THEME_PURCHASED @"/themes/purchased" // 查询已购买主题
|
2025-12-11 14:03:13 +08:00
|
|
|
#define API_WALLET_BALANCE @"/wallet/balance" // 查询钱包余额
|
2025-12-11 15:00:58 +08:00
|
|
|
#define API_THEME_DETAIL @"/themes/detail" // 查询主题详情
|
2025-12-11 16:39:22 +08:00
|
|
|
#define API_THEME_PURCHASE @"/themes/purchase" // 购买主题
|
|
|
|
|
#define API_THEME_DOWNLOAD @"/themes/download" // 主题下载信息
|
2025-12-11 17:51:00 +08:00
|
|
|
#define API_THEME_RECOMMENDED @"/themes/recommended" // 推荐主题列表
|
2025-12-11 13:16:06 +08:00
|
|
|
|
2025-12-05 20:18:18 +08:00
|
|
|
/// pay
|
|
|
|
|
#define API_VALIDATE_RECEIPT @"/api/apple/validate-receipt" // 排行榜标签列表
|
2025-12-12 14:46:38 +08:00
|
|
|
#define API_INAPP_PRODUCT_LIST @"/products/inApp/list" // 查询 type=in-app-purchase 的商品列表
|
2025-12-05 20:18:18 +08:00
|
|
|
|
2025-12-05 21:15:48 +08:00
|
|
|
/// AI
|
2025-12-08 19:48:13 +08:00
|
|
|
#define API_AI_TALK @"/chat/talk" // 排行榜标签列表
|
2025-12-05 20:18:18 +08:00
|
|
|
|
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
|
|
|
|
2025-11-13 18:03:26 +08:00
|
|
|
#endif /* KBAPI_h */
|