123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import request from '@/sheep/request';
- const BrokerageApi = {
- // 获得个人分销信息
- getBrokerageUser: () => {
- return request({
- url: '/trade/brokerage-user/get',
- method: 'GET'
- });
- },
- // 获得个人分销统计
- getBrokerageUserSummary: () => {
- return request({
- url: '/trade/brokerage-user/get-summary',
- method: 'GET',
- });
- },
- // 获得分销记录分页
- getBrokerageRecordPage: (params) => {
- if (params.status === undefined) {
- delete params.status
- }
- const queryString = Object.keys(params)
- .map((key) => encodeURIComponent(key) + '=' + params[key])
- .join('&');
- return request({
- url: `/trade/brokerage-record/page?${queryString}`,
- method: 'GET',
- });
- },
- // 创建分销提现
- createBrokerageWithdraw: (data) => {
- return request({
- url: '/trade/brokerage-withdraw/create',
- method: 'POST',
- data,
- });
- },
- // 获得商品的分销金额
- getProductBrokeragePrice: (spuId) => {
- return request({
- url: '/trade/brokerage-record/get-product-brokerage-price',
- method: 'GET',
- params: {
- spuId
- }
- });
- },
- // 获得分销用户排行(基于佣金)
- getRankByPrice: (params) => {
- const queryString = `times=${params.times[0]}×=${params.times[1]}`;
- return request({
- url: `/trade/brokerage-user/get-rank-by-price?${queryString}`,
- method: 'GET',
- });
- },
- // 获得分销用户排行分页(基于佣金)
- getBrokerageUserChildSummaryPageByPrice: (params) => {
- const queryString = Object.keys(params)
- .map((key) => encodeURIComponent(key) + '=' + params[key])
- .join('&');
- return request({
- url: `/trade/brokerage-user/rank-page-by-price?${queryString}`,
- method: 'GET',
- });
- },
- // 获得分销用户排行分页(基于用户量)
- getBrokerageUserRankPageByUserCount: (params) => {
- const queryString = Object.keys(params)
- .map((key) => encodeURIComponent(key) + '=' + params[key])
- .join('&');
- return request({
- url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`,
- method: 'GET',
- });
- },
- // 获得下级分销统计分页
- getBrokerageUserChildSummaryPage: (params) => {
- return request({
- url: '/trade/brokerage-user/child-summary-page',
- method: 'GET',
- params,
- })
- }
- }
- export default BrokerageApi
|