buddhism/api/memorial/memorial.js

73 lines
1.3 KiB
JavaScript
Raw Normal View History

2025-08-15 12:03:09 +08:00
import request from "@/utils/request";
// 获取牌位详情
export function getMemorialDetail(id) {
return request({
url: `/app/memorial/${id}`,
2025-08-15 12:03:09 +08:00
method: "get",
});
}
// 获取供奉记录列表
export function getEnshrinedList(params) {
return request({
2025-08-15 12:03:09 +08:00
url: "/app/enshrined/list",
method: "get",
2025-09-23 13:32:04 +08:00
params: {
pageNum: "1",
pageSize: "12",
orderByColumn: "create_time",
isAsc: "descending",
...params,
},
2025-08-15 12:03:09 +08:00
});
2025-08-11 17:00:43 +08:00
}
// 搜索往生者
export function searchDeceased(params) {
return request({
2025-08-15 12:03:09 +08:00
url: "/app/deceased/search",
method: "get",
2025-08-14 11:22:53 +08:00
params,
2025-08-15 12:03:09 +08:00
});
2025-08-12 11:10:38 +08:00
}
// 收藏牌位 (使用 x-www-form-urlencoded 格式)
export function collectMemorial(data) {
// 将数据转换为 x-www-form-urlencoded 格式
2025-08-14 11:22:53 +08:00
2025-08-12 11:10:38 +08:00
return request({
2025-08-15 12:03:09 +08:00
url: "/app/collect",
method: "post",
2025-08-12 11:10:38 +08:00
data,
header: {
2025-08-15 12:03:09 +08:00
"Content-Type": "application/x-www-form-urlencoded",
2025-08-14 11:22:53 +08:00
},
2025-08-15 12:03:09 +08:00
});
2025-08-12 11:10:38 +08:00
}
2025-08-14 15:17:29 +08:00
// 检查是否已收藏
export function checkIsCollected(memorialId) {
return request({
2025-08-15 12:03:09 +08:00
url: "/app/collect/isCollect",
method: "get",
2025-08-14 15:17:29 +08:00
params: {
memorialId: memorialId,
},
2025-08-15 12:03:09 +08:00
});
2025-08-14 15:17:29 +08:00
}
2025-09-22 17:42:58 +08:00
export function getUserCollection() {
return request({
url: "/app/collect",
});
}
// 获取套餐列表
export function getPackageList() {
return request({
url: "/app/thali/list",
method: "get",
});
}