feat(gift): 관리자 선물함 리스트 및 운영 액션 구현

This commit is contained in:
Yu Sung
2026-10-01 12:41:26 +09:00
parent b067d3547a
commit 87d9121ca9
8 changed files with 1096 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import Vue from 'vue';
const baseUrl = '/api/v2/admin/gifts'
async function getGifts({ status, applicationNo, nickname, page = 0, size = 20 } = {}) {
const params = { page, size }
if (status) params.status = status
if (applicationNo) params.applicationNo = applicationNo
if (nickname) params.nickname = nickname
const response = await Vue.axios.get(baseUrl, { params })
return response.data
}
async function getGift(applicationNo) {
const response = await Vue.axios.get(`${baseUrl}/${encodeURIComponent(applicationNo)}`)
return response.data
}
async function arriveMailbox(applicationNo) {
const response = await Vue.axios.post(`${baseUrl}/${encodeURIComponent(applicationNo)}/arrive-mailbox`)
return response.data
}
async function completeInspection(applicationNo) {
const response = await Vue.axios.post(`${baseUrl}/${encodeURIComponent(applicationNo)}/complete-inspection`)
return response.data
}
async function completeDelivery(applicationNo) {
const response = await Vue.axios.post(`${baseUrl}/${encodeURIComponent(applicationNo)}/complete-delivery`)
return response.data
}
async function markUndeliverable(applicationNo, reason) {
const response = await Vue.axios.post(`${baseUrl}/${encodeURIComponent(applicationNo)}/mark-undeliverable`, { reason })
return response.data
}
export { getGifts, getGift, arriveMailbox, completeInspection, completeDelivery, markUndeliverable }