mi-assessment/uniapp/api/invite.js
zpc 4387b15de0 feat(mine): 完成我的页面改造
- 实现未登录/已登录两种状态样式
- 添加常用功能入口:我的订单、往期测评、联系我们、邀请新用户
- 添加其他功能入口:关于、用户协议、隐私政策、退出登录
- 实现退出登录二次确认弹窗
- 修复 uni.scss 中 SCSS 导入路径问题
- 整理 .gitignore 文件,移除 unpackage 构建目录
2026-02-10 00:12:01 +08:00

70 lines
1.3 KiB
JavaScript

/**
* 分销邀请接口模块
*/
import { get, post } from './request'
/**
* 获取邀请信息
* @returns {Promise<Object>}
*/
export function getInviteInfo() {
return get('/invite/getInfo')
}
/**
* 获取邀请二维码
* @returns {Promise<Object>}
*/
export function getQrcode() {
return get('/invite/getQrcode')
}
/**
* 获取邀请记录列表
* @param {Object} params - 查询参数
* @param {number} [params.page] - 页码
* @param {number} [params.pageSize] - 每页数量
* @returns {Promise<Object>}
*/
export function getRecordList(params = {}) {
return get('/invite/getRecordList', params)
}
/**
* 获取佣金信息
* @returns {Promise<Object>}
*/
export function getCommission() {
return get('/invite/getCommission')
}
/**
* 申请提现
* @param {number} amount - 提现金额
* @returns {Promise<Object>}
*/
export function applyWithdraw(amount) {
return post('/invite/applyWithdraw', { amount })
}
/**
* 获取提现记录列表
* @param {Object} params - 查询参数
* @param {number} [params.page] - 页码
* @param {number} [params.pageSize] - 每页数量
* @returns {Promise<Object>}
*/
export function getWithdrawList(params = {}) {
return get('/invite/getWithdrawList', params)
}
export default {
getInviteInfo,
getQrcode,
getRecordList,
getCommission,
applyWithdraw,
getWithdrawList
}