diff --git a/src/api/push.js b/src/api/push.js index 60dad23..509763c 100644 --- a/src/api/push.js +++ b/src/api/push.js @@ -1,8 +1,8 @@ import Vue from 'vue'; -async function sendPush(accountIds, title, message) { +async function sendPush(memberIds, title, message) { return Vue.axios.post('/push', { - accountIds, + memberIds, title, message }) diff --git a/src/views/Promotion/Push.vue b/src/views/Promotion/Push.vue index 17de6b1..a15a01d 100644 --- a/src/views/Promotion/Push.vue +++ b/src/views/Promotion/Push.vue @@ -10,7 +10,7 @@ 푸시메시지 발송 확인 - - 발송대상(회원번호): {{ send_account_id }} + + 발송대상(회원번호): {{ send_member_id }} 발송대상(회원번호): 전체 @@ -101,8 +101,8 @@ export default { return { show_confirm: false, isLoading: false, - account_id: '', - send_account_id: [], + member_id: '', + send_member_id: [], title: '', message: '' } @@ -127,12 +127,12 @@ export default { } if (!this.isLoading) { - if (this.account_id.length > 0) { - this.send_account_id = Array.from( + if (this.member_id.length > 0) { + this.send_member_id = Array.from( new Set( - this.account_id.split(",") - .map(accountId => accountId.trim()) - .filter(accountId => Number(accountId)) + this.member_id.split(",") + .map(memberId => memberId.trim()) + .filter(memberId => Number(memberId)) ) ) } @@ -150,15 +150,15 @@ export default { try { await api.sendPush( - this.send_account_id, + this.send_member_id, this.title, this.message ) } finally { this.isLoading = false this.show_confirm = false - this.account_id = '' - this.send_account_id = [] + this.member_id = '' + this.send_member_id = [] this.title = '' this.message = '' }