本次修改: 1. 新增分销绑定 API 接口与路由 2. 老用户不再自动绑定推荐人,需手动输入邀请码绑定 3. 新增绑定推荐人 UI 弹层与展示组件 4. 新增防环校验与关系补全逻辑 5. 调整邀请码存储逻辑,仅未登录用户自动存储
25 行
1.2 KiB
JavaScript
25 行
1.2 KiB
JavaScript
/**
|
|
* 接口模块 · 分销中心(用户端)
|
|
* 对应模块:分销首页 / 团队管理 / 收益明细 / 推广海报 / 佣金提现
|
|
*/
|
|
import { get, post } from '../utils/request.js'
|
|
|
|
export const distributionApi = {
|
|
/** 佣金概览(含邀请码/分销规则) */
|
|
overview: () => get('/distribution/overview', {}, { silent: true }),
|
|
/** 一/二级下线列表与业绩 */
|
|
team: (params = {}) => get('/distribution/team', params, { silent: true }),
|
|
/** 分销收益明细账单(佣金流水) */
|
|
commissions: (params = {}) => get('/distribution/commissions', params, { silent: true }),
|
|
/** 专属推广海报要素(支持传入 postId 获取详情页小程序码) */
|
|
poster: (params = {}) => get('/distribution/poster', params, { silent: true }),
|
|
/** 申请提现(提现至微信零钱) */
|
|
withdraw: (payload) => post('/distribution/withdraw', payload, { silent: true }),
|
|
/** 提现记录 */
|
|
withdrawRecords: () => get('/distribution/withdraw-records', {}, { silent: true }),
|
|
/** 绑定分销推荐人(扫码自动补绑 / 手动填写邀请码绑定) */
|
|
bind: (payload = {}) => post('/distribution/bind', payload, { silent: true }),
|
|
}
|
|
|
|
export default distributionApi
|