update point rule groovy script
This commit is contained in:
+8
-1
@@ -6,7 +6,8 @@ import type {
|
||||
PointAdjustRequest,
|
||||
PointLedger,
|
||||
PointLedgerPage,
|
||||
PointRule
|
||||
PointRule,
|
||||
GroovyScript
|
||||
} from "@/types/Point";
|
||||
import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/utils/store";
|
||||
|
||||
@@ -94,6 +95,11 @@ async function ruleDetail(id: string): Promise<PointRule> {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询积分规则可选的 Groovy 脚本。 */
|
||||
async function ruleScriptList(): Promise<GroovyScript[]> {
|
||||
return await axios.post(`${BASE_URI}/rule/script/list`);
|
||||
}
|
||||
|
||||
async function ruleCreate(rule: PointRule): Promise<string> {
|
||||
return await axios.post(`${BASE_URI}/rule/create`, withCurrentStoreId(rule));
|
||||
}
|
||||
@@ -120,6 +126,7 @@ export default {
|
||||
adjust,
|
||||
ruleList,
|
||||
ruleDetail,
|
||||
ruleScriptList,
|
||||
ruleCreate,
|
||||
ruleUpdate,
|
||||
ruleSort,
|
||||
|
||||
Reference in New Issue
Block a user