fix: pay
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m0s

This commit is contained in:
sexygoat
2026-05-22 15:16:22 +08:00
parent 874ff41ce3
commit 427b211295
11 changed files with 1458 additions and 738 deletions

View File

@@ -21,19 +21,26 @@ export const orderApi = {
});
},
create(identifier, package_ids) {
create(identifier, package_ids, payment_method) {
const data = { identifier, package_ids };
if (payment_method === 'alipay') {
data.payment_method = payment_method;
} else {
data.app_type = APP_TYPE;
}
return request({
url: '/api/c/v1/orders/create',
method: 'POST',
data: { identifier, package_ids, app_type: APP_TYPE }
data
});
},
pay(order_id, payment_method, password) {
const data = {
payment_method,
app_type: APP_TYPE
};
const data = { payment_method };
if (payment_method === 'wechat') {
data.app_type = APP_TYPE;
}
if (password) {
data.password = password;
}
@@ -43,4 +50,4 @@ export const orderApi = {
data
});
}
};
};

View File

@@ -11,10 +11,15 @@ export const walletApi = {
},
recharge(identifier, amount, payment_method) {
const data = { identifier, amount, payment_method };
if (payment_method === 'wechat') {
data.app_type = APP_TYPE;
}
return request({
url: '/api/c/v1/wallet/recharge',
method: 'POST',
data: { identifier, amount, payment_method, app_type: APP_TYPE }
data
});
},
@@ -59,4 +64,4 @@ export const walletApi = {
data: { identifier, page, page_size, ...params }
});
}
};
};