푸시 발송 - account -> member 로 변경
This commit is contained in:
parent
423316cab4
commit
581127b4e0
|
@ -1,8 +1,8 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
async function sendPush(accountIds, title, message) {
|
async function sendPush(memberIds, title, message) {
|
||||||
return Vue.axios.post('/push', {
|
return Vue.axios.post('/push', {
|
||||||
accountIds,
|
memberIds,
|
||||||
title,
|
title,
|
||||||
message
|
message
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="account_id"
|
v-model="member_id"
|
||||||
label="회원번호(입력하지 않으면 전체회원에게 발송)"
|
label="회원번호(입력하지 않으면 전체회원에게 발송)"
|
||||||
outlined
|
outlined
|
||||||
required
|
required
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
>
|
>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>푸시메시지 발송 확인</v-card-title>
|
<v-card-title>푸시메시지 발송 확인</v-card-title>
|
||||||
<v-card-text v-if="account_id.length > 0">
|
<v-card-text v-if="member_id.length > 0">
|
||||||
발송대상(회원번호): {{ send_account_id }}
|
발송대상(회원번호): {{ send_member_id }}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-text v-else>
|
<v-card-text v-else>
|
||||||
발송대상(회원번호): 전체
|
발송대상(회원번호): 전체
|
||||||
|
@ -101,8 +101,8 @@ export default {
|
||||||
return {
|
return {
|
||||||
show_confirm: false,
|
show_confirm: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
account_id: '',
|
member_id: '',
|
||||||
send_account_id: [],
|
send_member_id: [],
|
||||||
title: '',
|
title: '',
|
||||||
message: ''
|
message: ''
|
||||||
}
|
}
|
||||||
|
@ -127,12 +127,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isLoading) {
|
if (!this.isLoading) {
|
||||||
if (this.account_id.length > 0) {
|
if (this.member_id.length > 0) {
|
||||||
this.send_account_id = Array.from(
|
this.send_member_id = Array.from(
|
||||||
new Set(
|
new Set(
|
||||||
this.account_id.split(",")
|
this.member_id.split(",")
|
||||||
.map(accountId => accountId.trim())
|
.map(memberId => memberId.trim())
|
||||||
.filter(accountId => Number(accountId))
|
.filter(memberId => Number(memberId))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -150,15 +150,15 @@ export default {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await api.sendPush(
|
await api.sendPush(
|
||||||
this.send_account_id,
|
this.send_member_id,
|
||||||
this.title,
|
this.title,
|
||||||
this.message
|
this.message
|
||||||
)
|
)
|
||||||
} finally {
|
} finally {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.show_confirm = false
|
this.show_confirm = false
|
||||||
this.account_id = ''
|
this.member_id = ''
|
||||||
this.send_account_id = []
|
this.send_member_id = []
|
||||||
this.title = ''
|
this.title = ''
|
||||||
this.message = ''
|
this.message = ''
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue