This commit is contained in:
张成
2025-12-16 15:55:42 +08:00
parent f3e6413bfe
commit 41e03daa50
7 changed files with 1077 additions and 28 deletions

View File

@@ -0,0 +1,38 @@
/**
* 邀请注册 API 服务
* 封装邀请注册相关的API调用
*/
class InviteRegisterServer {
/**
* 发送短信验证码
* @param {string} phone 手机号
* @returns {Promise}
*/
sendSmsCode(phone) {
return window.framework.http.post('/invite/send-sms', {
phone: phone
});
}
/**
* 邀请注册
* @param {Object} params 注册参数
* @param {string} params.phone 手机号
* @param {string} params.password 密码
* @param {string} params.sms_code 短信验证码
* @param {string} params.invite_code 邀请码
* @returns {Promise}
*/
register(params) {
return window.framework.http.post('/invite/register', {
phone: params.phone,
password: params.password,
sms_code: params.sms_code,
invite_code: params.invite_code
});
}
}
export default new InviteRegisterServer();