fix(user): remove obsolete withdrawal modal and recompile mp-weixin to dedicated withdraw page
这个提交包含在:
@@ -497,13 +497,30 @@ export async function rechargeBalance(userId = 1001, amount) {
|
||||
|
||||
/**
|
||||
* 佣金提现申请 (支持微信零钱、支付宝、银行卡多渠道及账号信息)
|
||||
/**
|
||||
* 佣金提现申请 (支持多渠道: 微信 WECHAT / 支付宝 ALIPAY / 银行卡 BANK)
|
||||
* 支持 (userId, amount, options) 与 (amount, channel, userId) 两种调用签名
|
||||
*/
|
||||
export async function withdrawCommission(userId = 1001, amount, options = {}) {
|
||||
export async function withdrawCommission(arg1, arg2, arg3 = {}) {
|
||||
try {
|
||||
const payload = typeof options === 'string'
|
||||
? { amount, channel: options }
|
||||
: { amount, ...options };
|
||||
const res = await http.post(`/users/${userId}/withdraw`, payload);
|
||||
let uid = 1001;
|
||||
let amt = 0;
|
||||
let opt = {};
|
||||
|
||||
if (typeof arg1 === 'number' && (typeof arg2 === 'number' || !isNaN(Number(arg2)))) {
|
||||
uid = arg1;
|
||||
amt = Number(arg2);
|
||||
opt = typeof arg3 === 'object' ? arg3 : { channel: arg3 || 'WECHAT' };
|
||||
} else {
|
||||
amt = Number(arg1) || 0;
|
||||
opt = typeof arg2 === 'object' ? (arg2 || {}) : { channel: arg2 || 'WECHAT' };
|
||||
uid = Number(arg3) || 1001;
|
||||
}
|
||||
|
||||
const payload = typeof opt === 'string'
|
||||
? { amount: amt, channel: opt }
|
||||
: { amount: amt, ...opt };
|
||||
const res = await http.post(`/users/${uid}/withdraw`, payload);
|
||||
return res;
|
||||
} catch (err) {
|
||||
console.warn('[API] 提现申请接口异常:', err.message);
|
||||
@@ -977,19 +994,3 @@ export async function getDistributionRecords(userId = 1001) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 佣金提现申请
|
||||
*/
|
||||
export async function withdrawCommission(amount, channel = 'WECHAT', userId = 1001) {
|
||||
try {
|
||||
const res = await http.post(`/users/${userId}/withdraw`, { amount, channel });
|
||||
return res;
|
||||
} catch (err) {
|
||||
console.warn('[API] 佣金提现申请异常:', err.message);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户