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