Files
YGChatCS/src/request/api/AigcApi.js
duanshuwen ada88d7b20 feat(aigc): replace mock credit data with backend api fetch
add getCreditLedgerPage API function to fetch credit ledger records
remove local mock ledger data file
update LedgerCard component to adapt to new API response structure
rewrite points details page to use z-paging with empty and error handling
2026-07-16 09:04:04 +08:00

50 lines
1.2 KiB
JavaScript

import request from "../base/request";
function getAigcTemplateList() {
return request.get("/hotelBiz/aigc/aigcTemplateList", {});
}
function getAigcTemplateItemList(args) {
return request.post("/hotelBiz/aigc/aigcTemplateItemList", args);
}
function getAigcGeneratorTaskList(args) {
return request.post("/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskList", args);
}
function getAigcGeneratorTaskDetail(args) {
return request.post("/hotelBiz/aigcGeneratorTask/aigcGeneratorTaskDetail", args);
}
function createAigcGeneratorTask(args) {
return request.post("/hotelBiz/aigcGeneratorTask/createAigcGeneratorTask", args);
}
function getCurrentCredit() {
return request.get("/hotelBiz/credit/current", {});
}
function getRechargeOptions() {
return request.get("/hotelBiz/credit/recharge/options", {});
}
function rechargeCredit(args) {
return request.post("/hotelBiz/credit/recharge", args);
}
function getCreditLedgerPage(args) {
return request.post("/hotelBiz/credit/ledger/page", args);
}
export {
getAigcTemplateList,
getAigcTemplateItemList,
getAigcGeneratorTaskList,
getAigcGeneratorTaskDetail,
createAigcGeneratorTask,
getCurrentCredit,
getRechargeOptions,
rechargeCredit,
getCreditLedgerPage,
};