37 lines
844 B
JavaScript
37 lines
844 B
JavaScript
/**
|
|
* 邀请模块 - 邀请信息、邀请记录相关接口
|
|
*/
|
|
import RequestManager from '../request';
|
|
|
|
/**
|
|
* 获取邀请信息
|
|
* @returns {Promise} 邀请信息
|
|
*/
|
|
export const getInvitationInfo = async () => {
|
|
return await RequestManager.get('/invitation', {});
|
|
};
|
|
|
|
/**
|
|
* 获取邀请记录
|
|
* @param {Number} page 页码
|
|
* @param {Number} pageSize 每页数量
|
|
* @returns {Promise} 邀请记录
|
|
*/
|
|
export const getInvitationRecord = async (page = 1, pageSize = 10) => {
|
|
return await RequestManager.get('/invitation', {
|
|
page,
|
|
pageSize
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 绑定邀请码
|
|
* @param {String} inviteCode 邀请码
|
|
* @returns {Promise} 绑定结果
|
|
*/
|
|
export const bindInviteCode = async (inviteCode) => {
|
|
return await RequestManager.post('/bind_invite_code', {
|
|
invite_code: inviteCode
|
|
});
|
|
};
|