콘텐츠 메인 상단 배너 - 크리에이터 불러오는 API 수정

This commit is contained in:
Yu Sung 2023-08-07 01:19:53 +09:00
parent 80f819744e
commit b6fcbaa11a
3 changed files with 16 additions and 11 deletions

View File

@ -23,14 +23,14 @@ async function searchMember(searchWord, page) {
) )
} }
async function getCreatorAccountList(page) { async function getCreatorList(page) {
return Vue.axios.get( return Vue.axios.get(
"/admin/member/creator/list?page=" + (page - 1) + "/admin/member/creator/list?page=" + (page - 1) +
"&size=20" "&size=20"
) )
} }
async function searchCreatorAccount(searchWord, page) { async function searchCreator(searchWord, page) {
return Vue.axios.get( return Vue.axios.get(
"/admin/member/creator/search?search_word=" + searchWord + "/admin/member/creator/search?search_word=" + searchWord +
"&page=" + (page - 1) + "&page=" + (page - 1) +
@ -43,11 +43,16 @@ async function updateMember(id, user_type) {
return Vue.axios.put("/admin/member", request) return Vue.axios.put("/admin/member", request)
} }
async function getCreatorAllList() {
return Vue.axios.get("/admin/member/creator/all/list")
}
export { export {
login, login,
getMemberList, getMemberList,
searchMember, searchMember,
getCreatorAccountList, getCreatorList,
searchCreatorAccount, searchCreator,
updateMember updateMember,
getCreatorAllList
} }

View File

@ -235,7 +235,7 @@
<script> <script>
import Draggable from "vuedraggable"; import Draggable from "vuedraggable";
import * as accountApi from "@/api/member"; import * as memberApi from "@/api/member";
import * as eventApi from "@/api/event"; import * as eventApi from "@/api/event";
import * as api from "@/api/audio_content" import * as api from "@/api/audio_content"
@ -259,7 +259,7 @@ export default {
}, },
async created() { async created() {
await this.getCreatorList() await this.getCreatorAllList()
await this.getEvents() await this.getEvents()
await this.getBanners() await this.getBanners()
}, },
@ -485,11 +485,11 @@ export default {
} }
}, },
async getCreatorList() { async getCreatorAllList() {
this.is_loading = true this.is_loading = true
try { try {
const res = await accountApi.getCounselorList() const res = await memberApi.getCreatorAllList()
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.creators = res.data.data.map((item) => { this.creators = res.data.data.map((item) => {

View File

@ -194,7 +194,7 @@ export default {
} else { } else {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.searchCreatorAccount(this.search_word, this.page) const res = await api.searchCreator(this.search_word, this.page)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data const data = res.data.data
@ -229,7 +229,7 @@ export default {
async getAccounts() { async getAccounts() {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getCreatorAccountList(this.page) const res = await api.getCreatorList(this.page)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
const data = res.data.data const data = res.data.data