You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.4 KiB

import request from '@/components/hzjc/utils/request.js'
let distribution = {}
/**
* 获取充值设置
* @date 2022-11-01
*/
distribution.getWithdrawInfo = function() {
return new Promise((resolve, reject) => {
request.getData('distribution/api/Config/getWithdrawInfo').then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
/**
* 获取我的佣金
* @date 2022-11-04
*/
distribution.getMyCommission = function() {
return new Promise((resolve, reject) => {
request.getData('distribution/api/Commission/getMyCommission').then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
/**
* 提交提现订单
* @param {float} withdrawMoney 提现金额
* @param {int} withdrawType 提现方式 1--提现到微信 2--提现到支付宝
* @date 2022-11-04
*/
distribution.insertWithdrawOrder = function(withdrawMoney, withdrawType) {
return new Promise((resolve, reject) => {
// 获取下单数据
request.getData('distribution/api/Commission/insertWithdrawOrder', {
withdraw_money: withdrawMoney,
withdraw_type: withdrawType
}, {
loading: true
}).then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
/**
* 获取我的海报
* @date 2022-11-04
*/
distribution.getPoster = function() {
return new Promise((resolve, reject) => {
request.getData('distribution/api/Poster/getPoster').then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
/**
* 获取提现明细列表
* @param {object} that
* @param {int} isFirstPage 是否第一页 0--不是 1--是
* @date 2022-11-08
*/
distribution.listWithdraw = function(that, isFirstPage) {
return new Promise((resolve, reject) => {
request.getList('distribution/api/Commission/listWithdraw', {}, {
that: that,
first_page: isFirstPage
}).then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
/**
* 获取我的佣金明细列表
* @param {object} that
* @param {int} isFirstPage 是否第一页 0--不是 1--是
* @param {int} index 类型 0--全部 1--收入 2--支出
* @date 2022-11-08
*/
distribution.listCommissionLog = function(that, isFirstPage, index) {
return new Promise((resolve, reject) => {
request.getList('distribution/api/Commission/listCommissionLog', {
index: index
}, {
that: that,
first_page: isFirstPage
}).then(res => {
resolve(res)
}).catch(res => {
reject(res)
})
})
}
export default distribution