66 lines
1.3 KiB
JavaScript
66 lines
1.3 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 获取牌位详情
|
|
export function getMemorialDetail(id) {
|
|
return request({
|
|
url: `/app/memorial/${id}`,
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
// 获取供奉记录列表
|
|
export function getEnshrinedList(params) {
|
|
return request({
|
|
url: '/app/enshrined/list',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 搜索往生者
|
|
export function searchDeceased(params) {
|
|
return request({
|
|
url: '/app/deceased/search',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 收藏牌位 (使用 x-www-form-urlencoded 格式)
|
|
export function collectMemorial(data) {
|
|
// 将数据转换为 x-www-form-urlencoded 格式
|
|
|
|
return request({
|
|
url: '/app/collect',
|
|
method: 'post',
|
|
data,
|
|
header: {
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
},
|
|
})
|
|
}
|
|
|
|
// 检查是否已收藏
|
|
export function checkIsCollected(memorialId) {
|
|
return request({
|
|
url: '/app/collect/isCollect',
|
|
method: 'get',
|
|
params: {
|
|
memorialId: memorialId,
|
|
},
|
|
})
|
|
}
|
|
|
|
// // 收藏牌位 (使用 form-data 格式,可选)
|
|
// export function collectMemorialFormData(data) {
|
|
// return request({
|
|
// url: '/app/collect',
|
|
// method: 'post',
|
|
// data,
|
|
// header: {
|
|
|
|
// 'Content-Type': 'multipart/form-data'
|
|
// }
|
|
// })
|
|
// }
|