diff --git a/src/assets/api.js b/src/assets/api.js index 0eabc170..98d51580 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -1103,4 +1103,14 @@ export const queryVoucherStatus = (id) => { return req("get", baseurl + "/order/voucher/queryVoucher/" + id) } +// 获取自定义按钮列表 +export const getDefineButtons = (id) => { + return req("get", baseurl + "/plan/getButtonConf/" + id) +} + +// 自定义按钮更新 +export const updateDefineButtons = (id, data) => { + return req("post", baseurl + "/plan/saveButtonConf/" + id, data) +} + export { req } diff --git a/src/pages/plan/defineButton/index.jsx b/src/pages/plan/defineButton/index.jsx index eb83c558..3e6926db 100644 --- a/src/pages/plan/defineButton/index.jsx +++ b/src/pages/plan/defineButton/index.jsx @@ -1,4 +1,4 @@ -import { getClientPrompt, handelResponse, postClientPrompt } from "@/assets/api.js" +import { getDefineButtons, handelResponse, postClientPrompt } from "@/assets/api.js" import Grid from "@/components/gird/main.js" import Ipt from "@/components/input/main" import TabPage from "@/components/tabPage/main.js" @@ -8,7 +8,7 @@ import { useEffect } from "react" import { useHistory } from "react-router-dom" import { Button, Notify } from "zent" import "./index.less" -export default function Message() { +export default function DefineButton() { const history = useHistory() const Column = [ { @@ -42,7 +42,7 @@ export default function Message() { }) useEffect(() => { - getClientPrompt(state.planId).then((res) => { + getDefineButtons(state.planId).then((res) => { handelResponse( res, (req, msg) => {