mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
4.6.4-alpha (#569)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { GET } from '@/web/common/api/request';
|
||||
import type { PaySchema } from '@fastgpt/global/support/wallet/pay/type.d';
|
||||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
|
||||
export const getPayOrders = () => GET<PaySchema[]>(`/plusApi/support/wallet/pay/getPayOrders`);
|
||||
|
||||
export const getPayCode = (amount: number) =>
|
||||
@@ -11,15 +9,9 @@ export const getPayCode = (amount: number) =>
|
||||
}>(`/plusApi/support/wallet/pay/getPayCode`, { amount });
|
||||
|
||||
export const checkPayResult = (payId: string) =>
|
||||
GET<number>(`/plusApi/support/wallet/pay/checkPayResult`, { payId }).then(() => {
|
||||
async function startQueue() {
|
||||
try {
|
||||
await GET('/common/system/unlockTask');
|
||||
} catch (error) {
|
||||
await delay(1000);
|
||||
startQueue();
|
||||
}
|
||||
}
|
||||
startQueue();
|
||||
return 'success';
|
||||
GET<string>(`/plusApi/support/wallet/pay/checkPayResult`, { payId }).then((data) => {
|
||||
try {
|
||||
GET('/common/system/unlockTask');
|
||||
} catch (error) {}
|
||||
return data;
|
||||
});
|
||||
|
Reference in New Issue
Block a user