From 58e21056b65fe13e0896ca3276ba601a29902ace Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 19 Apr 2024 14:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 10 ++++++++++ src/pages/plan/defineButton/index.jsx | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) 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) => {