Compare commits

..

6 Commits

Author SHA1 Message Date
Yu Sung c788a9e7dd 관리자 - 추천 라이브 크리에이터 배너 API 적용 2023-08-07 03:11:47 +09:00
Yu Sung b6fcbaa11a 콘텐츠 메인 상단 배너 - 크리에이터 불러오는 API 수정 2023-08-07 01:19:53 +09:00
Yu Sung 80f819744e 라이브 관심사 - API URL 수정 2023-08-06 22:42:31 +09:00
Yu Sung fb08221aa3 캔, 충전현황 페이지 API 연동 2023-08-06 14:27:31 +09:00
Yu Sung f66bfd8524 회원 태그 - CRUD API 추가 2023-08-06 13:52:03 +09:00
Yu Sung 1d4bcd601d 회원리스트 페이지 2023-08-06 11:12:35 +09:00
24 changed files with 206 additions and 258 deletions

View File

@ -1,4 +1,4 @@
# yozm-admin # soda-live-admin
## Project setup ## Project setup
``` ```

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "yozm-admin", "name": "soda-live-admin",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "yozm-admin", "name": "soda-live-admin",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"core-js": "^3.6.5", "core-js": "^3.6.5",

View File

@ -1,5 +1,5 @@
{ {
"name": "yozm-admin", "name": "soda-live-admin",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -7,7 +7,7 @@
dark dark
> >
<v-spacer /> <v-spacer />
<v-toolbar-title>요즘 관리자</v-toolbar-title> <v-toolbar-title>소다라이브 관리자</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-app-bar> </v-app-bar>

21
src/api/can.js Normal file
View File

@ -0,0 +1,21 @@
import Vue from 'vue';
async function deleteCan(id) {
return Vue.axios.delete('/admin/can/' + id);
}
async function getCans() {
return Vue.axios.get('/can');
}
async function insertCan(can, rewardCan, price) {
const request = {can: can, rewardCan: rewardCan, price: price}
return Vue.axios.post('/admin/can', request);
}
async function paymentCan(can, method, member_id) {
const request = {memberId: member_id, method: method, can: can}
return Vue.axios.post('/admin/can/charge', request)
}
export {getCans, insertCan, deleteCan, paymentCan}

View File

@ -1,27 +0,0 @@
import Vue from 'vue';
async function deleteCoin(id) {
return Vue.axios.delete('/coin/' + id);
}
async function modifyCoin(id, coin, rewardCoin, price) {
const request = {id: id, coin: coin, rewardCoin: rewardCoin, price: price}
return Vue.axios.put('/coin', request);
}
async function getCoins() {
return Vue.axios.get('/coin');
}
async function insertCoin(coin, rewardCoin, price) {
const request = {coin: coin, rewardCoin: rewardCoin, price: price}
return Vue.axios.post('/coin', request);
}
async function paymentCoin(coin, method, account_id) {
const request = {accountId: account_id, method: method, coin: coin}
return Vue.axios.post('/admin/coin/charge', request)
}
export {getCoins, insertCoin, modifyCoin, deleteCoin, paymentCoin}

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
async function enrollment(formData) { async function enrollment(formData) {
return Vue.axios.post('/account/counselor/tag', formData, { return Vue.axios.post('/admin/member/tag', formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
@ -9,15 +9,15 @@ async function enrollment(formData) {
} }
async function getTags() { async function getTags() {
return Vue.axios.get('/account/counselor/tag'); return Vue.axios.get('/member/tag');
} }
async function deleteTag(tagId) { async function deleteTag(tagId) {
return Vue.axios.delete('/account/counselor/tag/' + tagId) return Vue.axios.delete('/admin/member/tag/' + tagId)
} }
async function modifyTag(tagId, formData) { async function modifyTag(tagId, formData) {
return Vue.axios.put('/account/counselor/tag/' + tagId, formData, { return Vue.axios.put('/admin/member/tag/' + tagId, formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
@ -25,7 +25,7 @@ async function modifyTag(tagId, formData) {
} }
async function updateTagOrders(ids) { async function updateTagOrders(ids) {
return Vue.axios.put('/account/counselor/tag/orders', { ids: ids }) return Vue.axios.put('/admin/member/tag/orders', { ids: ids })
} }
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders } export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }

View File

@ -1,7 +1,7 @@
import Vue from 'vue'; import Vue from 'vue';
async function enrollment(formData) { async function enrollment(formData) {
return Vue.axios.post('/suda/tag', formData, { return Vue.axios.post('/live/tag', formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
@ -9,15 +9,15 @@ async function enrollment(formData) {
} }
async function getTags() { async function getTags() {
return Vue.axios.get('/suda/tag'); return Vue.axios.get('/live/tag');
} }
async function deleteTag(tagId) { async function deleteTag(tagId) {
return Vue.axios.delete('/suda/tag/' + tagId) return Vue.axios.delete('/live/tag/' + tagId)
} }
async function modifyTag(tagId, formData) { async function modifyTag(tagId, formData) {
return Vue.axios.put('/suda/tag/' + tagId, formData, { return Vue.axios.put('/live/tag/' + tagId, formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
@ -25,7 +25,7 @@ async function modifyTag(tagId, formData) {
} }
async function updateTagOrders(ids) { async function updateTagOrders(ids) {
return Vue.axios.put('/suda/tag/orders', { ids: ids }) return Vue.axios.put('/live/tag/orders', { ids: ids })
} }
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders } export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }

View File

@ -8,46 +8,51 @@ async function login(email, password) {
}); });
} }
async function getAccountList(page) { async function getMemberList(page) {
return Vue.axios.get( return Vue.axios.get(
"/admin/account/list?page=" + (page - 1) + "/admin/member/list?page=" + (page - 1) +
"&size=20" "&size=20"
) )
} }
async function searchAccount(searchWord, page) { async function searchMember(searchWord, page) {
return Vue.axios.get( return Vue.axios.get(
"/admin/account/search?search_word=" + searchWord + "/admin/member/search?search_word=" + searchWord +
"&page=" + (page - 1) + "&page=" + (page - 1) +
"&size=20" "&size=20"
) )
} }
async function getCreatorAccountList(page) { async function getCreatorList(page) {
return Vue.axios.get( return Vue.axios.get(
"/admin/account/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/account/creator/search?search_word=" + searchWord + "/admin/member/creator/search?search_word=" + searchWord +
"&page=" + (page - 1) + "&page=" + (page - 1) +
"&size=20" "&size=20"
) )
} }
async function updateAccount(id, user_type) { async function updateMember(id, user_type) {
const request = {id, userType: user_type} const request = {id, userType: user_type}
return Vue.axios.put("/admin/account", request) return Vue.axios.put("/admin/member", request)
}
async function getCreatorAllList() {
return Vue.axios.get("/admin/member/creator/all/list")
} }
export { export {
login, login,
getAccountList, getMemberList,
searchAccount, searchMember,
getCreatorAccountList, getCreatorList,
searchCreatorAccount, searchCreator,
updateAccount updateMember,
getCreatorAllList
} }

View File

@ -1,27 +1,32 @@
import Vue from 'vue'; import Vue from 'vue';
async function createRecommendSudaCreator(formData) { async function createRecommendCreatorBanner(formData) {
return Vue.axios.post('/admin/suda/recommend-suda-creator', formData, { return Vue.axios.post('/admin/live/recommend-creator', formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
}); });
} }
async function updateRecommendSudaCreator(formData) { async function updateRecommendCreatorBanner(formData) {
return Vue.axios.put('/admin/suda/recommend-suda-creator', formData, { return Vue.axios.put('/admin/live/recommend-creator', formData, {
headers: { headers: {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
}); });
} }
async function updateRecommendSudaCreatorOrders(firstOrders, ids) { async function updateRecommendCreatorBannerOrders(firstOrders, ids) {
return Vue.axios.put('/admin/suda/recommend-suda-creator/orders', { firstOrders: firstOrders, ids: ids }) return Vue.axios.put('/admin/live/recommend-creator/orders', {firstOrders: firstOrders, ids: ids})
} }
async function getRecommendSudaCreator(page) { async function getRecommendCreatorBanner(page) {
return Vue.axios.get("/admin/suda/recommend-suda-creator?page=" + (page - 1) + "&size=20"); return Vue.axios.get("/admin/live/recommend-creator?page=" + (page - 1) + "&size=20");
} }
export { createRecommendSudaCreator, updateRecommendSudaCreator, updateRecommendSudaCreatorOrders, getRecommendSudaCreator }; export {
createRecommendCreatorBanner,
updateRecommendCreatorBanner,
updateRecommendCreatorBannerOrders,
getRecommendCreatorBanner
};

View File

@ -28,12 +28,12 @@ const routes = [
{ {
path: '/member/list', path: '/member/list',
name: 'MemberList', name: 'MemberList',
component: () => import(/* webpackChunkName: "member" */ '../views/Account/MemberList.vue') component: () => import(/* webpackChunkName: "member" */ '../views/Member/MemberList')
}, },
{ {
path: '/creator/tags', path: '/creator/tags',
name: 'CreatorTags', name: 'CreatorTags',
component: () => import(/* webpackChunkName: "counselor" */ '../views/Creator/CreatorTags.vue') component: () => import(/* webpackChunkName: "counselor" */ '../views/Creator/CreatorTags')
}, },
{ {
path: '/creator/list', path: '/creator/list',
@ -108,7 +108,7 @@ const routes = [
{ {
path: '/can/status', path: '/can/status',
name: 'CoinStatus', name: 'CoinStatus',
component: () => import(/* webpackChunkName: "coin" */ '../views/Can/CoinStatus.vue') component: () => import(/* webpackChunkName: "coin" */ '../views/Can/CanStatus.vue')
}, },
{ {
path: '/calculate/creator', path: '/calculate/creator',

View File

@ -2,7 +2,7 @@
<div> <div>
<v-toolbar dark> <v-toolbar dark>
<v-spacer /> <v-spacer />
<v-toolbar-title>코인 충전</v-toolbar-title> <v-toolbar-title> 충전</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-toolbar> </v-toolbar>
@ -23,8 +23,8 @@
/> />
<v-text-field <v-text-field
v-model="coin" v-model="can"
label="지급할 코인 수" label="지급할 수"
outlined outlined
required required
/> />
@ -39,7 +39,7 @@
depressed depressed
@click="confirm" @click="confirm"
> >
코인 지급 지급
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
@ -50,7 +50,7 @@
persistent persistent
> >
<v-card> <v-card>
<v-card-title>코인 지급 확인</v-card-title> <v-card-title> 지급 확인</v-card-title>
<v-card-text> <v-card-text>
회원번호: {{ account_id }} 회원번호: {{ account_id }}
</v-card-text> </v-card-text>
@ -58,7 +58,7 @@
기록내용: {{ method }} 기록내용: {{ method }}
</v-card-text> </v-card-text>
<v-card-text> <v-card-text>
지급할 코인 : {{ coin }}코인 지급할 : {{ can }}
</v-card-text> </v-card-text>
<v-card-actions v-show="!isLoading"> <v-card-actions v-show="!isLoading">
<v-spacer /> <v-spacer />
@ -67,7 +67,7 @@
text text
@click="submit" @click="submit"
> >
코인 지급 지급
</v-btn> </v-btn>
<v-spacer /> <v-spacer />
<v-btn <v-btn
@ -87,10 +87,10 @@
</template> </template>
<script> <script>
import * as api from '@/api/coin' import * as api from '@/api/can'
export default { export default {
name: "CoinCharge", name: "CanCharge",
data() { data() {
return { return {
@ -98,7 +98,7 @@ export default {
isLoading: false, isLoading: false,
account_id: '', account_id: '',
method: '', method: '',
coin: '' can: ''
} }
}, },
@ -113,15 +113,15 @@ export default {
confirm() { confirm() {
if (this.account_id.trim() === '' || isNaN(this.account_id)) { if (this.account_id.trim() === '' || isNaN(this.account_id)) {
return this.notifyError('코인을 지급할 회원의 회원번호를 입력하세요.') return this.notifyError('을 지급할 회원의 회원번호를 입력하세요.')
} }
if (this.method.trim() === '') { if (this.method.trim() === '') {
return this.notifyError('기록할 내용을 입력하세요') return this.notifyError('기록할 내용을 입력하세요')
} }
if (isNaN(this.coin)) { if (isNaN(this.can)) {
return this.notifyError('코인은 숫자만 넣을 수 있습니다.') return this.notifyError('은 숫자만 넣을 수 있습니다.')
} }
if (!this.isLoading) { if (!this.isLoading) {
@ -140,12 +140,12 @@ export default {
try { try {
this.show_confirm = false this.show_confirm = false
const res = await api.paymentCoin(Number(this.coin), this.method, this.account_id) const res = await api.paymentCan(Number(this.can), this.method, this.account_id)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.notifySuccess('코인이 지급되었습니다.') this.notifySuccess('이 지급되었습니다.')
this.account_id = '' this.account_id = ''
this.method = '' this.method = ''
this.coin = '' this.can = ''
this.is_loading = false this.is_loading = false
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')

View File

@ -2,7 +2,7 @@
<div> <div>
<v-toolbar dark> <v-toolbar dark>
<v-spacer /> <v-spacer />
<v-toolbar-title>코인 환율관리</v-toolbar-title> <v-toolbar-title> 환율관리</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-toolbar> </v-toolbar>
@ -27,7 +27,7 @@
v-bind="attrs" v-bind="attrs"
v-on="on" v-on="on"
> >
코인등록 등록
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
@ -35,7 +35,7 @@
<v-col> <v-col>
<v-data-table <v-data-table
:headers="headers" :headers="headers"
:items="coins" :items="cans"
class="elevation-1" class="elevation-1"
hide-default-footer hide-default-footer
> >
@ -43,25 +43,18 @@
{{ item.price.toLocaleString('en-US') }} {{ item.price.toLocaleString('en-US') }}
</template> </template>
<template v-slot:item.coin="{ item }"> <template v-slot:item.can="{ item }">
{{ item.coin.toLocaleString('en-US') }}코인 {{ item.can.toLocaleString('en-US') }}
</template> </template>
<template v-slot:item.rewardCoin="{ item }"> <template v-slot:item.rewardCan="{ item }">
{{ item.rewardCoin.toLocaleString('en-US') }}코인 {{ item.rewardCan.toLocaleString('en-US') }}
</template> </template>
<template v-slot:item.management="{ item }"> <template v-slot:item.management="{ item }">
<v-btn <v-btn
:disabled="isLoading" :disabled="isLoading"
@click="showModifyCoinDialog(item)" @click="deleteCan(item)"
>
수정
</v-btn>
&nbsp;&nbsp;
<v-btn
:disabled="isLoading"
@click="deleteCoin(item)"
> >
삭제 삭제
</v-btn> </v-btn>
@ -73,7 +66,7 @@
</template> </template>
<v-card> <v-card>
<v-card-title>코인 등록</v-card-title> <v-card-title> 등록</v-card-title>
<v-card-text> <v-card-text>
<v-text-field <v-text-field
v-model="price" v-model="price"
@ -83,15 +76,15 @@
</v-card-text> </v-card-text>
<v-card-text> <v-card-text>
<v-text-field <v-text-field
v-model="coin" v-model="can"
label="코인" label=""
required required
/> />
</v-card-text> </v-card-text>
<v-card-text> <v-card-text>
<v-text-field <v-text-field
v-model="reward_coin" v-model="reward_can"
label="리워드 코인" label="리워드 "
required required
/> />
</v-card-text> </v-card-text>
@ -105,15 +98,6 @@
취소 취소
</v-btn> </v-btn>
<v-btn <v-btn
v-if="selected_coin !== null"
color="blue darken-1"
text
@click="modify"
>
수정
</v-btn>
<v-btn
v-else
color="blue darken-1" color="blue darken-1"
text text
@click="submit" @click="submit"
@ -128,19 +112,19 @@
</template> </template>
<script> <script>
import * as api from '@/api/coin' import * as api from '@/api/can'
export default { export default {
name: "CoinView", name: "CanView",
data() { data() {
return { return {
isLoading: false, isLoading: false,
show_dialog: false, show_dialog: false,
selected_coin: null, selected_can: null,
price: null, price: null,
coin: null, can: null,
reward_coin: null, reward_can: null,
headers: [ headers: [
{ {
text: '원화(VAT포함)', text: '원화(VAT포함)',
@ -149,16 +133,16 @@ export default {
value: 'price', value: 'price',
}, },
{ {
text: '충전코인', text: '충전',
align: 'center', align: 'center',
sortable: false, sortable: false,
value: 'coin', value: 'can',
}, },
{ {
text: '리워드코인', text: '리워드',
align: 'center', align: 'center',
sortable: false, sortable: false,
value: 'rewardCoin', value: 'rewardCan',
}, },
{ {
text: '관리', text: '관리',
@ -167,12 +151,12 @@ export default {
value: 'management' value: 'management'
}, },
], ],
coins: [], cans: [],
} }
}, },
async created() { async created() {
await this.getCoins() await this.getCans()
}, },
methods: { methods: {
@ -186,26 +170,17 @@ export default {
cancel() { cancel() {
this.show_dialog = false this.show_dialog = false
this.coin = null this.can = null
this.price = null this.price = null
this.reward_coin = null this.reward_can = null
this.selected_coin = null this.selected_can = null
}, },
showModifyCoinDialog(item) { async getCans() {
this.selected_coin = item
this.price = item.price
this.coin = item.coin
this.reward_coin = item.rewardCoin
this.show_dialog = true
},
async getCoins() {
this.isLoading = true this.isLoading = true
try { try {
let res = await api.getCoins(); let res = await api.getCans();
this.coins = res.data.data this.cans = res.data.data
} catch (e) { } catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} finally { } finally {
@ -213,60 +188,34 @@ export default {
} }
}, },
async deleteCoin(item) { async deleteCan(item) {
this.isLoading = true this.isLoading = true
let res = await api.deleteCoin(item.id) let res = await api.deleteCan(item.id)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.notifySuccess(res.data.message || '삭제되었습니다.') this.notifySuccess(res.data.message || '삭제되었습니다.')
this.coins = [] this.cans = []
await this.getCoins() await this.getCans()
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
}, },
async modify() {
this.isLoading = true
try {
const res = await api.modifyCoin(this.selected_coin.id, this.coin, this.reward_coin, this.price)
if (res.status === 200 && res.data.success === true) {
this.show_dialog = false
this.coin = null
this.price = null
this.reward_coin = null
this.selected_coin = null
this.notifySuccess(res.data.message || '수정되었습니다.')
this.coins = []
await this.getCoins()
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
} catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} finally {
this.isLoading = false
}
},
async submit() { async submit() {
this.isLoading = true this.isLoading = true
const res = await api.insertCoin(this.coin, this.reward_coin, this.price) const res = await api.insertCan(this.can, this.reward_can, this.price)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.show_dialog = false this.show_dialog = false
this.coin = null this.can = null
this.price = null this.price = null
this.reward_coin = null this.reward_can = null
this.selected_coin = null this.selected_can = null
this.notifySuccess(res.data.message || '등록되었습니다.') this.notifySuccess(res.data.message || '등록되었습니다.')
this.coins = [] this.cans = []
await this.getCoins() await this.getCans()
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }

View File

@ -2,7 +2,7 @@
<div> <div>
<v-toolbar dark> <v-toolbar dark>
<v-spacer /> <v-spacer />
<v-toolbar-title>코인 충전 현황</v-toolbar-title> <v-toolbar-title> 충전 현황</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-toolbar> </v-toolbar>
@ -132,7 +132,7 @@ import * as api from "@/api/charge_status";
import datetime from 'vuejs-datetimepicker'; import datetime from 'vuejs-datetimepicker';
export default { export default {
name: "CoinStatus", name: "CanStatus",
components: {datetime}, components: {datetime},
data() { data() {

View File

@ -1,13 +0,0 @@
<template>
<div>회원별 코인관리</div>
</template>
<script>
export default {
name: "CoinByUser"
}
</script>
<style scoped>
</style>

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

View File

@ -135,11 +135,11 @@
</template> </template>
<script> <script>
import * as api from "@/api/counselor_tag"; import * as api from "@/api/creator_tag";
import Draggable from "vuedraggable"; import Draggable from "vuedraggable";
export default { export default {
name: "CounselorTags", name: "CreatorTags",
components: {Draggable}, components: {Draggable},

View File

@ -194,7 +194,7 @@
<script> <script>
import * as api from "@/api/explorer" import * as api from "@/api/explorer"
import * as creatorTagApi from "@/api/counselor_tag"; import * as creatorTagApi from "@/api/creator_tag";
import Draggable from "vuedraggable"; import Draggable from "vuedraggable";
export default { export default {

View File

@ -2,7 +2,7 @@
<div> <div>
<v-toolbar dark> <v-toolbar dark>
<v-spacer /> <v-spacer />
<v-toolbar-title>추천 요즘라이브</v-toolbar-title> <v-toolbar-title>추천 라이브 크리에이터</v-toolbar-title>
<v-spacer /> <v-spacer />
</v-toolbar> </v-toolbar>
@ -19,7 +19,7 @@
depressed depressed
@click="showWriteDialog" @click="showWriteDialog"
> >
추천 요즘라이브 등록 추천 라이브 크리에이터 등록
</v-btn> </v-btn>
</v-col> </v-col>
</v-row> </v-row>
@ -29,7 +29,7 @@
<v-data-table <v-data-table
:headers="headers" :headers="headers"
:items="recommendLiveList" :items="recommendLiveList"
:loading="isLoading" :loading="is_loading"
:items-per-page="20" :items-per-page="20"
item-key="id" item-key="id"
class="elevation-1" class="elevation-1"
@ -69,7 +69,7 @@
</td> </td>
<td> <td>
<v-btn <v-btn
:disabled="isLoading" :disabled="is_loading"
@click="showModifyDialog(item)" @click="showModifyDialog(item)"
> >
수정 수정
@ -100,11 +100,11 @@
persistent persistent
> >
<v-card> <v-card>
<v-card-title>추천 요즘라이브 등록</v-card-title> <v-card-title>추천 라이브 크리에이터 등록</v-card-title>
<v-card-text> <v-card-text>
<v-row align="center"> <v-row align="center">
<v-col cols="4"> <v-col cols="4">
요즘친구 크리에이터
</v-col> </v-col>
<v-col cols="8"> <v-col cols="8">
<v-select <v-select
@ -178,7 +178,7 @@
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
<v-card-actions v-show="!isLoading"> <v-card-actions v-show="!is_loading">
<v-spacer /> <v-spacer />
<v-btn <v-btn
color="blue darken-1" color="blue darken-1"
@ -213,7 +213,7 @@
<script> <script>
import Draggable from 'vuedraggable'; import Draggable from 'vuedraggable';
import datetime from 'vuejs-datetimepicker'; import datetime from 'vuejs-datetimepicker';
import * as accountApi from "@/api/member"; import * as memberApi from "@/api/member";
import * as api from "@/api/recommend_suda_creator" import * as api from "@/api/recommend_suda_creator"
export default { export default {
@ -221,7 +221,7 @@ export default {
components: {datetime, Draggable}, components: {datetime, Draggable},
data() { data() {
return { return {
isLoading: false, is_loading: false,
page: 1, page: 1,
total_page: 0, total_page: 0,
show_write_dialog: false, show_write_dialog: false,
@ -242,7 +242,7 @@ export default {
value: 'image', value: 'image',
}, },
{ {
text: '요즘친구', text: '크리에이터',
align: 'center', align: 'center',
sortable: false, sortable: false,
value: 'creatorNickname', value: 'creatorNickname',
@ -271,7 +271,7 @@ export default {
async created() { async created() {
await this.getCreatorList() await this.getCreatorList()
await this.getRecommendSudaCreator() await this.getRecommendCreator()
}, },
methods: { methods: {
@ -284,7 +284,7 @@ export default {
const firstOrders = (this.page - 1) * 20 + 1 const firstOrders = (this.page - 1) * 20 + 1
const res = await api.updateRecommendSudaCreatorOrders(firstOrders, ids) const res = await api.updateRecommendCreatorBannerOrders(firstOrders, ids)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.notifySuccess(res.data.message) this.notifySuccess(res.data.message)
} }
@ -306,7 +306,7 @@ export default {
try { try {
const formData = new FormData() const formData = new FormData()
formData.append("recommend_suda_creator_id", this.selected_recommend_live.id) formData.append("recommend_creator_banner_id", this.selected_recommend_live.id)
if (this.image !== null) { if (this.image !== null) {
formData.append("image", this.image) formData.append("image", this.image)
@ -328,12 +328,12 @@ export default {
formData.append("is_adult", this.is_adult) formData.append("is_adult", this.is_adult)
} }
const res = await api.updateRecommendSudaCreator(formData) const res = await api.updateRecommendCreatorBanner(formData)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.cancel() this.cancel()
this.notifySuccess('수정되었습니다.') this.notifySuccess('수정되었습니다.')
this.page = 1 this.page = 1
await this.getRecommendSudaCreator() await this.getRecommendCreator()
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
@ -349,7 +349,7 @@ export default {
async submit() { async submit() {
if (this.is_loading) return; if (this.is_loading) return;
this.isLoading = true this.is_loading = true
try { try {
const formData = new FormData() const formData = new FormData()
@ -359,13 +359,14 @@ export default {
formData.append("end_date", this.end_date) formData.append("end_date", this.end_date)
formData.append("is_adult", this.is_adult) formData.append("is_adult", this.is_adult)
const res = await api.createRecommendSudaCreator(formData); const res = await api.createRecommendCreatorBanner(formData);
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.cancel() this.cancel()
this.notifySuccess('등록되었습니다.') this.notifySuccess('등록되었습니다.')
this.page = 1 this.page = 1
await this.getRecommendSudaCreator() await this.getRecommendCreator()
} else { } else {
this.is_loading = false
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} }
@ -408,14 +409,14 @@ export default {
}, },
async next() { async next() {
await this.getRecommendSudaCreator() await this.getRecommendCreator()
}, },
async getRecommendSudaCreator() { async getRecommendCreator() {
this.isLoading = true this.is_loading = true
try { try {
const res = await api.getRecommendSudaCreator(this.page) const res = await api.getRecommendCreatorBanner(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
@ -435,15 +436,15 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} finally { } finally {
this.isLoading = false this.is_loading = false
} }
}, },
async getCreatorList() { async getCreatorList() {
this.isLoading = 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.creatorList = res.data.data.map((item) => { this.creatorList = res.data.data.map((item) => {
@ -457,7 +458,7 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} finally { } finally {
this.isLoading = false this.is_loading = false
} }
}, },
imageAdd(payload) { imageAdd(payload) {

View File

@ -78,7 +78,12 @@
</template> </template>
<v-card> <v-card>
<v-card-title>관심사 등록</v-card-title> <v-card-title v-if="selected_tag !== null">
관심사 수정
</v-card-title>
<v-card-title v-else>
관심사 등록
</v-card-title>
<v-card-text> <v-card-text>
<v-text-field <v-text-field
v-model="tag_text" v-model="tag_text"
@ -194,6 +199,7 @@ export default {
this.image = null this.image = null
this.image_url = null this.image_url = null
this.tag_text = null this.tag_text = null
this.selected_tag = null
}, },
showModifyTagDialog(tag) { showModifyTagDialog(tag) {
@ -269,6 +275,7 @@ export default {
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.show_dialog = false this.show_dialog = false
this.selected_tag = null
this.image = null this.image = null
this.image_url = null this.image_url = null
this.tag_text = null this.tag_text = null

View File

@ -68,7 +68,7 @@
</thead> </thead>
<tbody> <tbody>
<tr <tr
v-for="item in accounts" v-for="item in memberList"
:key="item.id" :key="item.id"
> >
<td>{{ item.id }}</td> <td>{{ item.id }}</td>
@ -206,7 +206,7 @@
import * as api from '@/api/member' import * as api from '@/api/member'
export default { export default {
name: "AccountList", name: "MemberList",
data() { data() {
return { return {
@ -214,8 +214,8 @@ export default {
page: 1, page: 1,
total_page: 0, total_page: 0,
search_word: '', search_word: '',
accounts: [], memberList: [],
account: null, member: null,
email: null, email: null,
nickname: null, nickname: null,
user_type: null, user_type: null,
@ -224,7 +224,7 @@ export default {
}, },
async created() { async created() {
await this.getAccounts() await this.getMemberList()
}, },
methods: { methods: {
@ -238,23 +238,23 @@ export default {
async search() { async search() {
this.page = 1 this.page = 1
await this.searchAccount() await this.searchMember()
}, },
async searchAccount() { async searchMember() {
if (this.search_word.length === 0) { if (this.search_word.length === 0) {
await this.getAccounts() await this.getMemberList()
} else if (this.search_word.length < 2) { } else if (this.search_word.length < 2) {
this.notifyError('검색어를 2글자 이상 입력하세요.') this.notifyError('검색어를 2글자 이상 입력하세요.')
} else { } else {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.searchAccount(this.search_word, this.page) const res = await api.searchMember(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
const total_page = Math.ceil(data.totalCount / 20) const total_page = Math.ceil(data.totalCount / 20)
this.accounts = data.items this.memberList = data.items
if (total_page <= 0) if (total_page <= 0)
this.total_page = 1 this.total_page = 1
@ -275,21 +275,21 @@ export default {
async next() { async next() {
if (this.search_word.length < 2) { if (this.search_word.length < 2) {
this.search_word = '' this.search_word = ''
await this.getAccounts() await this.getMemberList()
} else { } else {
await this.searchAccount() await this.searchMember()
} }
}, },
async getAccounts() { async getMemberList() {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getAccountList(this.page) const res = await api.getMemberList(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
const total_page = Math.ceil(data.totalCount / 20) const total_page = Math.ceil(data.totalCount / 20)
this.accounts = data.items this.memberList = data.items
if (total_page <= 0) if (total_page <= 0)
this.total_page = 1 this.total_page = 1
@ -306,23 +306,23 @@ export default {
} }
}, },
showPopupDialog(account) { showPopupDialog(member) {
this.account = account this.member = member
if (account.userType === '일반회원') { if (member.userType === '일반회원') {
this.user_type = 'USER' this.user_type = 'USER'
} else if (account.userType === '요즘친구') { } else if (member.userType === '요즘친구') {
this.user_type = 'CREATOR' this.user_type = 'CREATOR'
} }
this.email = account.email this.email = member.email
this.nickname = account.nickname this.nickname = member.nickname
this.show_popup_dialog = true this.show_popup_dialog = true
}, },
cancel() { cancel() {
this.account = null this.member = null
this.email = null this.email = null
this.nickname = null this.nickname = null
this.user_type = null this.user_type = null
@ -333,20 +333,20 @@ export default {
this.is_loading = true this.is_loading = true
if ( if (
(this.user_type === 'CREATOR' && this.account.userType === '요즘친구') || (this.user_type === 'CREATOR' && this.member.userType === '요즘친구') ||
(this.user_type === 'USER' && this.account.userType === '일반회원') (this.user_type === 'USER' && this.member.userType === '일반회원')
) { ) {
this.notifyError("변경사항이 없습니다.") this.notifyError("변경사항이 없습니다.")
} else { } else {
try { try {
const res = await api.updateAccount(this.account.id, this.user_type) const res = await api.updateMember(this.member.id, this.user_type)
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.page = 1 this.page = 1
this.total_page = 0 this.total_page = 0
this.search_word = '' this.search_word = ''
this.accounts = [] this.memberList = []
await this.getAccounts() await this.getMemberList()
} else { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }