From 36f9d94d2325432cb3d8c365f3d9daba1e4d7eff Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Thu, 18 Sep 2025 17:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9api-/app/memorial/listTree,?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=92=E5=BA=8F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/memorial/index.js | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/api/memorial/index.js b/api/memorial/index.js index cd8e3d9..6c120dd 100644 --- a/api/memorial/index.js +++ b/api/memorial/index.js @@ -1,5 +1,6 @@ // 往生殿相关API -import { get, post, put, del } from '@/utils/request' +import { del, get, post, put } from "@/utils/request"; +import request from "../../utils/request"; /** * 获取供奉列表 @@ -11,10 +12,10 @@ import { get, post, put, del } from '@/utils/request' * @returns {Promise} 返回供奉列表数据 */ export function getEnshrinedList(params) { - return get('/app/enshrined/indexList', params, { + return get("/app/enshrined/indexList", params, { timeout: 10000, showLoading: false, - }) + }); } /** @@ -28,10 +29,10 @@ export function getEnshrinedList(params) { * @returns {Promise} 返回创建结果 */ export function createEnshrined(data) { - return post('/app/enshrined', data, { + return post("/app/enshrined", data, { showLoading: true, - loadingText: '创建中...', - }) + loadingText: "创建中...", + }); } /** @@ -46,10 +47,10 @@ export function createEnshrined(data) { * @returns {Promise} 返回更新结果 */ export function updateEnshrined(data) { - return put('/app/enshrined', data, { + return put("/app/enshrined", data, { showLoading: true, - loadingText: '更新中...', - }) + loadingText: "更新中...", + }); } /** @@ -60,8 +61,8 @@ export function updateEnshrined(data) { export function deleteEnshrined(id) { return del(`/app/enshrined/${id}`, { showLoading: true, - loadingText: '删除中...', - }) + loadingText: "删除中...", + }); } /** @@ -75,8 +76,8 @@ export function getMemorialDetail(id) { {}, { showLoading: false, - } - ) + }, + ); } /** @@ -84,13 +85,14 @@ export function getMemorialDetail(id) { * @returns {Promise} 返回楼层树形数据 */ export function getMemorialTree() { - return get( - '/app/memorial/listTree', - {}, - { - showLoading: false, - } - ) + return request({ + url: "/app/memorial/listTree", + method: "get", + params: { + orderByColumn: "order_num", + isAsc: "ascending", + }, + }); } /** @@ -103,8 +105,8 @@ export function getMemorialTree() { * @returns {Promise} 返回往生者列表数据 */ export function getDeceasedList(params) { - return get('/app/deceased/list', params, { + return get("/app/deceased/list", params, { timeout: 10000, showLoading: false, - }) + }); }