add event option
This commit is contained in:
+8
-1
@@ -1,6 +1,6 @@
|
||||
import { axios } from "timi-web-api";
|
||||
import type { Page, PageResult } from "timi-web-api";
|
||||
import type { EventItem } from "@/types/EventItem";
|
||||
import type { EventItem, EventOptionGroup } from "@/types/EventItem";
|
||||
import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/utils/store";
|
||||
|
||||
const BASE_URI = "/gao/event";
|
||||
@@ -83,6 +83,12 @@ async function update(event: EventItem): Promise<void> {
|
||||
return await axios.post(`${BASE_URI}/update`, withCurrentStoreId(event));
|
||||
}
|
||||
|
||||
async function updateOptionGroupList(eventId: string, optionGroupList: EventOptionGroup[]): Promise<void> {
|
||||
await axios.post(`${BASE_URI}/options/update`, optionGroupList, {
|
||||
params: { id: eventId }
|
||||
});
|
||||
}
|
||||
|
||||
async function sort(idList: string[]): Promise<void> {
|
||||
return await axios.post(`${BASE_URI}/sort`, idList);
|
||||
}
|
||||
@@ -99,6 +105,7 @@ export default {
|
||||
detail,
|
||||
create,
|
||||
update,
|
||||
updateOptionGroupList,
|
||||
sort,
|
||||
remove
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user