푸시 발송 대상 지정 UI 추가 #17
|
@ -1,11 +1,17 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
async function sendPush(memberIds, title, message) {
|
||||
return Vue.axios.post('/push', {
|
||||
async function sendPush(memberIds, title, message, isAuth) {
|
||||
const request = {
|
||||
memberIds,
|
||||
title,
|
||||
message
|
||||
})
|
||||
}
|
||||
|
||||
if (isAuth !== undefined && isAuth !== null && isAuth !== '') {
|
||||
request.isAuth = isAuth
|
||||
}
|
||||
|
||||
return Vue.axios.post('/push', request)
|
||||
}
|
||||
|
||||
export { sendPush }
|
||||
|
|
|
@ -9,6 +9,47 @@
|
|||
<br>
|
||||
|
||||
<v-container>
|
||||
<v-row class="is-auth">
|
||||
<v-col cols="6" />
|
||||
<v-col cols="6">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<input
|
||||
id="no-auth"
|
||||
v-model="isAuth"
|
||||
type="radio"
|
||||
value="false"
|
||||
>
|
||||
<label for="no-auth">
|
||||
본인인증을 하지 않은 유저만
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<input
|
||||
id="auth"
|
||||
v-model="isAuth"
|
||||
type="radio"
|
||||
value="true"
|
||||
>
|
||||
<label for="auth">
|
||||
본인인증을 한 유저만
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<input
|
||||
id="both"
|
||||
v-model="isAuth"
|
||||
type="radio"
|
||||
value=""
|
||||
>
|
||||
<label for="both">
|
||||
모두
|
||||
</label>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-text-field
|
||||
v-model="member_id"
|
||||
label="회원번호(입력하지 않으면 전체회원에게 발송)"
|
||||
|
@ -65,6 +106,9 @@
|
|||
<v-card-text>
|
||||
내용: {{ message }}
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
본인인증 여부: {{ isAuth === 'true' ? 'O' : isAuth === 'false' ? 'X' : '모두' }}
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!isLoading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
|
@ -104,7 +148,8 @@ export default {
|
|||
member_id: '',
|
||||
send_member_id: [],
|
||||
title: '',
|
||||
message: ''
|
||||
message: '',
|
||||
isAuth: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -152,7 +197,8 @@ export default {
|
|||
await api.sendPush(
|
||||
this.send_member_id,
|
||||
this.title,
|
||||
this.message
|
||||
this.message,
|
||||
this.isAuth
|
||||
)
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
|
@ -161,6 +207,7 @@ export default {
|
|||
this.send_member_id = []
|
||||
this.title = ''
|
||||
this.message = ''
|
||||
this.isAuth = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,5 +216,9 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.is-auth {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue