feat: 新增接口

This commit is contained in:
wangsongsole 2024-04-19 14:56:06 +08:00
parent abd66fc2d2
commit 58e21056b6
2 changed files with 13 additions and 3 deletions

View File

@ -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 }

View File

@ -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) => {