1
This commit is contained in:
38
admin/src/api/invite/invite_register_server.js
Normal file
38
admin/src/api/invite/invite_register_server.js
Normal 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();
|
||||
|
||||
Reference in New Issue
Block a user