mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 19:30:48 +08:00
umi-request 替换为 axios
This commit is contained in:
@@ -168,9 +168,9 @@ const ViewManageModal = ({
|
||||
|
||||
const onShowChange = (checked: boolean, record: any, index: number) => {
|
||||
request
|
||||
.put(`${config.apiPrefix}crons/views/${checked ? 'enable' : 'disable'}`, {
|
||||
data: [record.id],
|
||||
})
|
||||
.put(`${config.apiPrefix}crons/views/${checked ? 'enable' : 'disable'}`, [
|
||||
record.id,
|
||||
])
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
const _list = [...list];
|
||||
@@ -195,7 +195,9 @@ const ViewManageModal = ({
|
||||
const dragRow = list[dragIndex];
|
||||
request
|
||||
.put(`${config.apiPrefix}crons/views/move`, {
|
||||
data: { fromIndex: dragIndex, toIndex: hoverIndex, id: dragRow.id },
|
||||
fromIndex: dragIndex,
|
||||
toIndex: hoverIndex,
|
||||
id: dragRow.id,
|
||||
})
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
|
||||
Reference in New Issue
Block a user