Compare commits
No commits in common. "c788a9e7dd1e172eee55ab06ef4239cbf7f4c7f7" and "c60930a5660b031ed8ac87b176c730528b4b0c44" have entirely different histories.
c788a9e7dd
...
c60930a566
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "soda-live-admin",
|
||||
"name": "yozm-admin",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "soda-live-admin",
|
||||
"name": "yozm-admin",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "soda-live-admin",
|
||||
"name": "yozm-admin",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
dark
|
||||
>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>소다라이브 관리자</v-toolbar-title>
|
||||
<v-toolbar-title>요즘 관리자</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-app-bar>
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
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}
|
|
@ -0,0 +1,27 @@
|
|||
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}
|
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
async function enrollment(formData) {
|
||||
return Vue.axios.post('/admin/member/tag', formData, {
|
||||
return Vue.axios.post('/account/counselor/tag', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -9,15 +9,15 @@ async function enrollment(formData) {
|
|||
}
|
||||
|
||||
async function getTags() {
|
||||
return Vue.axios.get('/member/tag');
|
||||
return Vue.axios.get('/account/counselor/tag');
|
||||
}
|
||||
|
||||
async function deleteTag(tagId) {
|
||||
return Vue.axios.delete('/admin/member/tag/' + tagId)
|
||||
return Vue.axios.delete('/account/counselor/tag/' + tagId)
|
||||
}
|
||||
|
||||
async function modifyTag(tagId, formData) {
|
||||
return Vue.axios.put('/admin/member/tag/' + tagId, formData, {
|
||||
return Vue.axios.put('/account/counselor/tag/' + tagId, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -25,7 +25,7 @@ async function modifyTag(tagId, formData) {
|
|||
}
|
||||
|
||||
async function updateTagOrders(ids) {
|
||||
return Vue.axios.put('/admin/member/tag/orders', { ids: ids })
|
||||
return Vue.axios.put('/account/counselor/tag/orders', { ids: ids })
|
||||
}
|
||||
|
||||
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }
|
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
async function enrollment(formData) {
|
||||
return Vue.axios.post('/live/tag', formData, {
|
||||
return Vue.axios.post('/suda/tag', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -9,15 +9,15 @@ async function enrollment(formData) {
|
|||
}
|
||||
|
||||
async function getTags() {
|
||||
return Vue.axios.get('/live/tag');
|
||||
return Vue.axios.get('/suda/tag');
|
||||
}
|
||||
|
||||
async function deleteTag(tagId) {
|
||||
return Vue.axios.delete('/live/tag/' + tagId)
|
||||
return Vue.axios.delete('/suda/tag/' + tagId)
|
||||
}
|
||||
|
||||
async function modifyTag(tagId, formData) {
|
||||
return Vue.axios.put('/live/tag/' + tagId, formData, {
|
||||
return Vue.axios.put('/suda/tag/' + tagId, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -25,7 +25,7 @@ async function modifyTag(tagId, formData) {
|
|||
}
|
||||
|
||||
async function updateTagOrders(ids) {
|
||||
return Vue.axios.put('/live/tag/orders', { ids: ids })
|
||||
return Vue.axios.put('/suda/tag/orders', { ids: ids })
|
||||
}
|
||||
|
||||
export { enrollment, getTags, deleteTag, modifyTag, updateTagOrders }
|
||||
|
|
|
@ -8,51 +8,46 @@ async function login(email, password) {
|
|||
});
|
||||
}
|
||||
|
||||
async function getMemberList(page) {
|
||||
async function getAccountList(page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/member/list?page=" + (page - 1) +
|
||||
"/admin/account/list?page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchMember(searchWord, page) {
|
||||
async function searchAccount(searchWord, page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/member/search?search_word=" + searchWord +
|
||||
"/admin/account/search?search_word=" + searchWord +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function getCreatorList(page) {
|
||||
async function getCreatorAccountList(page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/member/creator/list?page=" + (page - 1) +
|
||||
"/admin/account/creator/list?page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function searchCreator(searchWord, page) {
|
||||
async function searchCreatorAccount(searchWord, page) {
|
||||
return Vue.axios.get(
|
||||
"/admin/member/creator/search?search_word=" + searchWord +
|
||||
"/admin/account/creator/search?search_word=" + searchWord +
|
||||
"&page=" + (page - 1) +
|
||||
"&size=20"
|
||||
)
|
||||
}
|
||||
|
||||
async function updateMember(id, user_type) {
|
||||
async function updateAccount(id, user_type) {
|
||||
const request = {id, userType: user_type}
|
||||
return Vue.axios.put("/admin/member", request)
|
||||
}
|
||||
|
||||
async function getCreatorAllList() {
|
||||
return Vue.axios.get("/admin/member/creator/all/list")
|
||||
return Vue.axios.put("/admin/account", request)
|
||||
}
|
||||
|
||||
export {
|
||||
login,
|
||||
getMemberList,
|
||||
searchMember,
|
||||
getCreatorList,
|
||||
searchCreator,
|
||||
updateMember,
|
||||
getCreatorAllList
|
||||
getAccountList,
|
||||
searchAccount,
|
||||
getCreatorAccountList,
|
||||
searchCreatorAccount,
|
||||
updateAccount
|
||||
}
|
||||
|
|
|
@ -1,32 +1,27 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
async function createRecommendCreatorBanner(formData) {
|
||||
return Vue.axios.post('/admin/live/recommend-creator', formData, {
|
||||
async function createRecommendSudaCreator(formData) {
|
||||
return Vue.axios.post('/admin/suda/recommend-suda-creator', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function updateRecommendCreatorBanner(formData) {
|
||||
return Vue.axios.put('/admin/live/recommend-creator', formData, {
|
||||
async function updateRecommendSudaCreator(formData) {
|
||||
return Vue.axios.put('/admin/suda/recommend-suda-creator', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function updateRecommendCreatorBannerOrders(firstOrders, ids) {
|
||||
return Vue.axios.put('/admin/live/recommend-creator/orders', {firstOrders: firstOrders, ids: ids})
|
||||
async function updateRecommendSudaCreatorOrders(firstOrders, ids) {
|
||||
return Vue.axios.put('/admin/suda/recommend-suda-creator/orders', { firstOrders: firstOrders, ids: ids })
|
||||
}
|
||||
|
||||
async function getRecommendCreatorBanner(page) {
|
||||
return Vue.axios.get("/admin/live/recommend-creator?page=" + (page - 1) + "&size=20");
|
||||
async function getRecommendSudaCreator(page) {
|
||||
return Vue.axios.get("/admin/suda/recommend-suda-creator?page=" + (page - 1) + "&size=20");
|
||||
}
|
||||
|
||||
export {
|
||||
createRecommendCreatorBanner,
|
||||
updateRecommendCreatorBanner,
|
||||
updateRecommendCreatorBannerOrders,
|
||||
getRecommendCreatorBanner
|
||||
};
|
||||
export { createRecommendSudaCreator, updateRecommendSudaCreator, updateRecommendSudaCreatorOrders, getRecommendSudaCreator };
|
||||
|
|
|
@ -28,12 +28,12 @@ const routes = [
|
|||
{
|
||||
path: '/member/list',
|
||||
name: 'MemberList',
|
||||
component: () => import(/* webpackChunkName: "member" */ '../views/Member/MemberList')
|
||||
component: () => import(/* webpackChunkName: "member" */ '../views/Account/MemberList.vue')
|
||||
},
|
||||
{
|
||||
path: '/creator/tags',
|
||||
name: 'CreatorTags',
|
||||
component: () => import(/* webpackChunkName: "counselor" */ '../views/Creator/CreatorTags')
|
||||
component: () => import(/* webpackChunkName: "counselor" */ '../views/Creator/CreatorTags.vue')
|
||||
},
|
||||
{
|
||||
path: '/creator/list',
|
||||
|
@ -108,7 +108,7 @@ const routes = [
|
|||
{
|
||||
path: '/can/status',
|
||||
name: 'CoinStatus',
|
||||
component: () => import(/* webpackChunkName: "coin" */ '../views/Can/CanStatus.vue')
|
||||
component: () => import(/* webpackChunkName: "coin" */ '../views/Can/CoinStatus.vue')
|
||||
},
|
||||
{
|
||||
path: '/calculate/creator',
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="item in memberList"
|
||||
v-for="item in accounts"
|
||||
:key="item.id"
|
||||
>
|
||||
<td>{{ item.id }}</td>
|
||||
|
@ -206,7 +206,7 @@
|
|||
import * as api from '@/api/member'
|
||||
|
||||
export default {
|
||||
name: "MemberList",
|
||||
name: "AccountList",
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
@ -214,8 +214,8 @@ export default {
|
|||
page: 1,
|
||||
total_page: 0,
|
||||
search_word: '',
|
||||
memberList: [],
|
||||
member: null,
|
||||
accounts: [],
|
||||
account: null,
|
||||
email: null,
|
||||
nickname: null,
|
||||
user_type: null,
|
||||
|
@ -224,7 +224,7 @@ export default {
|
|||
},
|
||||
|
||||
async created() {
|
||||
await this.getMemberList()
|
||||
await this.getAccounts()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -238,23 +238,23 @@ export default {
|
|||
|
||||
async search() {
|
||||
this.page = 1
|
||||
await this.searchMember()
|
||||
await this.searchAccount()
|
||||
},
|
||||
|
||||
async searchMember() {
|
||||
async searchAccount() {
|
||||
if (this.search_word.length === 0) {
|
||||
await this.getMemberList()
|
||||
await this.getAccounts()
|
||||
} else if (this.search_word.length < 2) {
|
||||
this.notifyError('검색어를 2글자 이상 입력하세요.')
|
||||
} else {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.searchMember(this.search_word, this.page)
|
||||
const res = await api.searchAccount(this.search_word, this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
|
||||
const total_page = Math.ceil(data.totalCount / 20)
|
||||
this.memberList = data.items
|
||||
this.accounts = data.items
|
||||
|
||||
if (total_page <= 0)
|
||||
this.total_page = 1
|
||||
|
@ -275,21 +275,21 @@ export default {
|
|||
async next() {
|
||||
if (this.search_word.length < 2) {
|
||||
this.search_word = ''
|
||||
await this.getMemberList()
|
||||
await this.getAccounts()
|
||||
} else {
|
||||
await this.searchMember()
|
||||
await this.searchAccount()
|
||||
}
|
||||
},
|
||||
|
||||
async getMemberList() {
|
||||
async getAccounts() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getMemberList(this.page)
|
||||
const res = await api.getAccountList(this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
|
||||
const total_page = Math.ceil(data.totalCount / 20)
|
||||
this.memberList = data.items
|
||||
this.accounts = data.items
|
||||
|
||||
if (total_page <= 0)
|
||||
this.total_page = 1
|
||||
|
@ -306,23 +306,23 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
showPopupDialog(member) {
|
||||
this.member = member
|
||||
showPopupDialog(account) {
|
||||
this.account = account
|
||||
|
||||
if (member.userType === '일반회원') {
|
||||
if (account.userType === '일반회원') {
|
||||
this.user_type = 'USER'
|
||||
} else if (member.userType === '요즘친구') {
|
||||
} else if (account.userType === '요즘친구') {
|
||||
this.user_type = 'CREATOR'
|
||||
}
|
||||
|
||||
this.email = member.email
|
||||
this.nickname = member.nickname
|
||||
this.email = account.email
|
||||
this.nickname = account.nickname
|
||||
|
||||
this.show_popup_dialog = true
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.member = null
|
||||
this.account = null
|
||||
this.email = null
|
||||
this.nickname = null
|
||||
this.user_type = null
|
||||
|
@ -333,20 +333,20 @@ export default {
|
|||
this.is_loading = true
|
||||
|
||||
if (
|
||||
(this.user_type === 'CREATOR' && this.member.userType === '요즘친구') ||
|
||||
(this.user_type === 'USER' && this.member.userType === '일반회원')
|
||||
(this.user_type === 'CREATOR' && this.account.userType === '요즘친구') ||
|
||||
(this.user_type === 'USER' && this.account.userType === '일반회원')
|
||||
) {
|
||||
this.notifyError("변경사항이 없습니다.")
|
||||
} else {
|
||||
try {
|
||||
const res = await api.updateMember(this.member.id, this.user_type)
|
||||
const res = await api.updateAccount(this.account.id, this.user_type)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.page = 1
|
||||
this.total_page = 0
|
||||
this.search_word = ''
|
||||
|
||||
this.memberList = []
|
||||
await this.getMemberList()
|
||||
this.accounts = []
|
||||
await this.getAccounts()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>캔 충전</v-toolbar-title>
|
||||
<v-toolbar-title>코인 충전</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
|||
/>
|
||||
|
||||
<v-text-field
|
||||
v-model="can"
|
||||
label="지급할 캔 수"
|
||||
v-model="coin"
|
||||
label="지급할 코인 수"
|
||||
outlined
|
||||
required
|
||||
/>
|
||||
|
@ -39,7 +39,7 @@
|
|||
depressed
|
||||
@click="confirm"
|
||||
>
|
||||
캔 지급
|
||||
코인 지급
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
@ -50,7 +50,7 @@
|
|||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>캔 지급 확인</v-card-title>
|
||||
<v-card-title>코인 지급 확인</v-card-title>
|
||||
<v-card-text>
|
||||
회원번호: {{ account_id }}
|
||||
</v-card-text>
|
||||
|
@ -58,7 +58,7 @@
|
|||
기록내용: {{ method }}
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
지급할 캔 수: {{ can }} 캔
|
||||
지급할 코인 수: {{ coin }}코인
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!isLoading">
|
||||
<v-spacer />
|
||||
|
@ -67,7 +67,7 @@
|
|||
text
|
||||
@click="submit"
|
||||
>
|
||||
캔 지급
|
||||
코인 지급
|
||||
</v-btn>
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
|
@ -87,10 +87,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/can'
|
||||
import * as api from '@/api/coin'
|
||||
|
||||
export default {
|
||||
name: "CanCharge",
|
||||
name: "CoinCharge",
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
@ -98,7 +98,7 @@ export default {
|
|||
isLoading: false,
|
||||
account_id: '',
|
||||
method: '',
|
||||
can: ''
|
||||
coin: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -113,15 +113,15 @@ export default {
|
|||
|
||||
confirm() {
|
||||
if (this.account_id.trim() === '' || isNaN(this.account_id)) {
|
||||
return this.notifyError('캔을 지급할 회원의 회원번호를 입력하세요.')
|
||||
return this.notifyError('코인을 지급할 회원의 회원번호를 입력하세요.')
|
||||
}
|
||||
|
||||
if (this.method.trim() === '') {
|
||||
return this.notifyError('기록할 내용을 입력하세요')
|
||||
}
|
||||
|
||||
if (isNaN(this.can)) {
|
||||
return this.notifyError('캔은 숫자만 넣을 수 있습니다.')
|
||||
if (isNaN(this.coin)) {
|
||||
return this.notifyError('코인은 숫자만 넣을 수 있습니다.')
|
||||
}
|
||||
|
||||
if (!this.isLoading) {
|
||||
|
@ -140,12 +140,12 @@ export default {
|
|||
try {
|
||||
this.show_confirm = false
|
||||
|
||||
const res = await api.paymentCan(Number(this.can), this.method, this.account_id)
|
||||
const res = await api.paymentCoin(Number(this.coin), this.method, this.account_id)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess('캔이 지급되었습니다.')
|
||||
this.notifySuccess('코인이 지급되었습니다.')
|
||||
this.account_id = ''
|
||||
this.method = ''
|
||||
this.can = ''
|
||||
this.coin = ''
|
||||
this.is_loading = false
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>캔 환율관리</v-toolbar-title>
|
||||
<v-toolbar-title>코인 환율관리</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
캔등록
|
||||
코인등록
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
@ -35,26 +35,33 @@
|
|||
<v-col>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="cans"
|
||||
:items="coins"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
>
|
||||
<template v-slot:item.price="{ item }">
|
||||
{{ item.price.toLocaleString('en-US') }} 원
|
||||
{{ item.price.toLocaleString('en-US') }}원
|
||||
</template>
|
||||
|
||||
<template v-slot:item.can="{ item }">
|
||||
{{ item.can.toLocaleString('en-US') }} 캔
|
||||
<template v-slot:item.coin="{ item }">
|
||||
{{ item.coin.toLocaleString('en-US') }}코인
|
||||
</template>
|
||||
|
||||
<template v-slot:item.rewardCan="{ item }">
|
||||
{{ item.rewardCan.toLocaleString('en-US') }} 캔
|
||||
<template v-slot:item.rewardCoin="{ item }">
|
||||
{{ item.rewardCoin.toLocaleString('en-US') }}코인
|
||||
</template>
|
||||
|
||||
<template v-slot:item.management="{ item }">
|
||||
<v-btn
|
||||
:disabled="isLoading"
|
||||
@click="deleteCan(item)"
|
||||
@click="showModifyCoinDialog(item)"
|
||||
>
|
||||
수정
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
:disabled="isLoading"
|
||||
@click="deleteCoin(item)"
|
||||
>
|
||||
삭제
|
||||
</v-btn>
|
||||
|
@ -66,7 +73,7 @@
|
|||
</template>
|
||||
|
||||
<v-card>
|
||||
<v-card-title>캔 등록</v-card-title>
|
||||
<v-card-title>코인 등록</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="price"
|
||||
|
@ -76,15 +83,15 @@
|
|||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="can"
|
||||
label="캔"
|
||||
v-model="coin"
|
||||
label="코인"
|
||||
required
|
||||
/>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="reward_can"
|
||||
label="리워드 캔"
|
||||
v-model="reward_coin"
|
||||
label="리워드 코인"
|
||||
required
|
||||
/>
|
||||
</v-card-text>
|
||||
|
@ -98,6 +105,15 @@
|
|||
취소
|
||||
</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"
|
||||
text
|
||||
@click="submit"
|
||||
|
@ -112,19 +128,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/can'
|
||||
import * as api from '@/api/coin'
|
||||
|
||||
export default {
|
||||
name: "CanView",
|
||||
name: "CoinView",
|
||||
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
show_dialog: false,
|
||||
selected_can: null,
|
||||
selected_coin: null,
|
||||
price: null,
|
||||
can: null,
|
||||
reward_can: null,
|
||||
coin: null,
|
||||
reward_coin: null,
|
||||
headers: [
|
||||
{
|
||||
text: '원화(VAT포함)',
|
||||
|
@ -133,16 +149,16 @@ export default {
|
|||
value: 'price',
|
||||
},
|
||||
{
|
||||
text: '충전캔',
|
||||
text: '충전코인',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'can',
|
||||
value: 'coin',
|
||||
},
|
||||
{
|
||||
text: '리워드캔',
|
||||
text: '리워드코인',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'rewardCan',
|
||||
value: 'rewardCoin',
|
||||
},
|
||||
{
|
||||
text: '관리',
|
||||
|
@ -151,12 +167,12 @@ export default {
|
|||
value: 'management'
|
||||
},
|
||||
],
|
||||
cans: [],
|
||||
coins: [],
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
await this.getCans()
|
||||
await this.getCoins()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -170,17 +186,26 @@ export default {
|
|||
|
||||
cancel() {
|
||||
this.show_dialog = false
|
||||
this.can = null
|
||||
this.coin = null
|
||||
this.price = null
|
||||
this.reward_can = null
|
||||
this.selected_can = null
|
||||
this.reward_coin = null
|
||||
this.selected_coin = null
|
||||
},
|
||||
|
||||
async getCans() {
|
||||
showModifyCoinDialog(item) {
|
||||
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
|
||||
try {
|
||||
let res = await api.getCans();
|
||||
this.cans = res.data.data
|
||||
let res = await api.getCoins();
|
||||
this.coins = res.data.data
|
||||
} catch (e) {
|
||||
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
|
||||
} finally {
|
||||
|
@ -188,34 +213,60 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
async deleteCan(item) {
|
||||
async deleteCoin(item) {
|
||||
this.isLoading = true
|
||||
|
||||
let res = await api.deleteCan(item.id)
|
||||
let res = await api.deleteCoin(item.id)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess(res.data.message || '삭제되었습니다.')
|
||||
this.cans = []
|
||||
await this.getCans()
|
||||
this.coins = []
|
||||
await this.getCoins()
|
||||
} else {
|
||||
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() {
|
||||
this.isLoading = true
|
||||
|
||||
const res = await api.insertCan(this.can, this.reward_can, this.price)
|
||||
const res = await api.insertCoin(this.coin, this.reward_coin, this.price)
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.show_dialog = false
|
||||
this.can = null
|
||||
this.coin = null
|
||||
this.price = null
|
||||
this.reward_can = null
|
||||
this.selected_can = null
|
||||
this.reward_coin = null
|
||||
this.selected_coin = null
|
||||
this.notifySuccess(res.data.message || '등록되었습니다.')
|
||||
|
||||
this.cans = []
|
||||
await this.getCans()
|
||||
this.coins = []
|
||||
await this.getCoins()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<div>회원별 코인관리</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CoinByUser"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>캔 충전 현황</v-toolbar-title>
|
||||
<v-toolbar-title>코인 충전 현황</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
|
@ -132,7 +132,7 @@ import * as api from "@/api/charge_status";
|
|||
import datetime from 'vuejs-datetimepicker';
|
||||
|
||||
export default {
|
||||
name: "CanStatus",
|
||||
name: "CoinStatus",
|
||||
components: {datetime},
|
||||
|
||||
data() {
|
|
@ -235,7 +235,7 @@
|
|||
<script>
|
||||
import Draggable from "vuedraggable";
|
||||
|
||||
import * as memberApi from "@/api/member";
|
||||
import * as accountApi from "@/api/member";
|
||||
import * as eventApi from "@/api/event";
|
||||
import * as api from "@/api/audio_content"
|
||||
|
||||
|
@ -259,7 +259,7 @@ export default {
|
|||
},
|
||||
|
||||
async created() {
|
||||
await this.getCreatorAllList()
|
||||
await this.getCreatorList()
|
||||
await this.getEvents()
|
||||
await this.getBanners()
|
||||
},
|
||||
|
@ -485,11 +485,11 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
async getCreatorAllList() {
|
||||
async getCreatorList() {
|
||||
this.is_loading = true
|
||||
|
||||
try {
|
||||
const res = await memberApi.getCreatorAllList()
|
||||
const res = await accountApi.getCounselorList()
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.creators = res.data.data.map((item) => {
|
||||
|
|
|
@ -194,7 +194,7 @@ export default {
|
|||
} else {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.searchCreator(this.search_word, this.page)
|
||||
const res = await api.searchCreatorAccount(this.search_word, this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
|
||||
|
@ -229,7 +229,7 @@ export default {
|
|||
async getAccounts() {
|
||||
this.is_loading = true
|
||||
try {
|
||||
const res = await api.getCreatorList(this.page)
|
||||
const res = await api.getCreatorAccountList(this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
|
||||
|
|
|
@ -135,11 +135,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from "@/api/creator_tag";
|
||||
import * as api from "@/api/counselor_tag";
|
||||
import Draggable from "vuedraggable";
|
||||
|
||||
export default {
|
||||
name: "CreatorTags",
|
||||
name: "CounselorTags",
|
||||
|
||||
components: {Draggable},
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
|
||||
<script>
|
||||
import * as api from "@/api/explorer"
|
||||
import * as creatorTagApi from "@/api/creator_tag";
|
||||
import * as creatorTagApi from "@/api/counselor_tag";
|
||||
import Draggable from "vuedraggable";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<v-toolbar dark>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>추천 라이브 크리에이터</v-toolbar-title>
|
||||
<v-toolbar-title>추천 요즘라이브</v-toolbar-title>
|
||||
<v-spacer />
|
||||
</v-toolbar>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
depressed
|
||||
@click="showWriteDialog"
|
||||
>
|
||||
추천 라이브 크리에이터 등록
|
||||
추천 요즘라이브 등록
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="recommendLiveList"
|
||||
:loading="is_loading"
|
||||
:loading="isLoading"
|
||||
:items-per-page="20"
|
||||
item-key="id"
|
||||
class="elevation-1"
|
||||
|
@ -53,7 +53,7 @@
|
|||
width="100"
|
||||
>
|
||||
</td>
|
||||
<td><h3>{{ item.creatorNickname }}</h3></td>
|
||||
<td> <h3>{{ item.creatorNickname }}</h3> </td>
|
||||
<td>
|
||||
<h3>
|
||||
{{ item.startDate }} ~ {{ item.endDate }}
|
||||
|
@ -69,7 +69,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<v-btn
|
||||
:disabled="is_loading"
|
||||
:disabled="isLoading"
|
||||
@click="showModifyDialog(item)"
|
||||
>
|
||||
수정
|
||||
|
@ -100,11 +100,11 @@
|
|||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>추천 라이브 크리에이터 등록</v-card-title>
|
||||
<v-card-title>추천 요즘라이브 등록</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row align="center">
|
||||
<v-col cols="4">
|
||||
크리에이터
|
||||
요즘친구
|
||||
</v-col>
|
||||
<v-col cols="8">
|
||||
<v-select
|
||||
|
@ -131,7 +131,7 @@
|
|||
class="datepicker"
|
||||
format="YYYY-MM-DD H:i"
|
||||
/>
|
||||
<div> ~</div>
|
||||
<div> ~ </div>
|
||||
<datetime
|
||||
v-model="end_date"
|
||||
class="datepicker"
|
||||
|
@ -178,7 +178,7 @@
|
|||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions v-show="!is_loading">
|
||||
<v-card-actions v-show="!isLoading">
|
||||
<v-spacer />
|
||||
<v-btn
|
||||
color="blue darken-1"
|
||||
|
@ -213,15 +213,15 @@
|
|||
<script>
|
||||
import Draggable from 'vuedraggable';
|
||||
import datetime from 'vuejs-datetimepicker';
|
||||
import * as memberApi from "@/api/member";
|
||||
import * as accountApi from "@/api/member";
|
||||
import * as api from "@/api/recommend_suda_creator"
|
||||
|
||||
export default {
|
||||
name: "LiveRecommendView",
|
||||
components: {datetime, Draggable},
|
||||
components: { datetime, Draggable },
|
||||
data() {
|
||||
return {
|
||||
is_loading: false,
|
||||
isLoading: false,
|
||||
page: 1,
|
||||
total_page: 0,
|
||||
show_write_dialog: false,
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
value: 'image',
|
||||
},
|
||||
{
|
||||
text: '크리에이터',
|
||||
text: '요즘친구',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'creatorNickname',
|
||||
|
@ -271,7 +271,7 @@ export default {
|
|||
|
||||
async created() {
|
||||
await this.getCreatorList()
|
||||
await this.getRecommendCreator()
|
||||
await this.getRecommendSudaCreator()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -284,7 +284,7 @@ export default {
|
|||
|
||||
const firstOrders = (this.page - 1) * 20 + 1
|
||||
|
||||
const res = await api.updateRecommendCreatorBannerOrders(firstOrders, ids)
|
||||
const res = await api.updateRecommendSudaCreatorOrders(firstOrders, ids)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess(res.data.message)
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ export default {
|
|||
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append("recommend_creator_banner_id", this.selected_recommend_live.id)
|
||||
formData.append("recommend_suda_creator_id", this.selected_recommend_live.id)
|
||||
|
||||
if (this.image !== null) {
|
||||
formData.append("image", this.image)
|
||||
|
@ -328,12 +328,12 @@ export default {
|
|||
formData.append("is_adult", this.is_adult)
|
||||
}
|
||||
|
||||
const res = await api.updateRecommendCreatorBanner(formData)
|
||||
const res = await api.updateRecommendSudaCreator(formData)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.cancel()
|
||||
this.notifySuccess('수정되었습니다.')
|
||||
this.page = 1
|
||||
await this.getRecommendCreator()
|
||||
await this.getRecommendSudaCreator()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
|
@ -349,7 +349,7 @@ export default {
|
|||
async submit() {
|
||||
if (this.is_loading) return;
|
||||
|
||||
this.is_loading = true
|
||||
this.isLoading = true
|
||||
|
||||
try {
|
||||
const formData = new FormData()
|
||||
|
@ -359,14 +359,13 @@ export default {
|
|||
formData.append("end_date", this.end_date)
|
||||
formData.append("is_adult", this.is_adult)
|
||||
|
||||
const res = await api.createRecommendCreatorBanner(formData);
|
||||
const res = await api.createRecommendSudaCreator(formData);
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.cancel()
|
||||
this.notifySuccess('등록되었습니다.')
|
||||
this.page = 1
|
||||
await this.getRecommendCreator()
|
||||
await this.getRecommendSudaCreator()
|
||||
} else {
|
||||
this.is_loading = false
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
}
|
||||
|
@ -409,14 +408,14 @@ export default {
|
|||
},
|
||||
|
||||
async next() {
|
||||
await this.getRecommendCreator()
|
||||
await this.getRecommendSudaCreator()
|
||||
},
|
||||
|
||||
async getRecommendCreator() {
|
||||
this.is_loading = true
|
||||
async getRecommendSudaCreator() {
|
||||
this.isLoading = true
|
||||
|
||||
try {
|
||||
const res = await api.getRecommendCreatorBanner(this.page)
|
||||
const res = await api.getRecommendSudaCreator(this.page)
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
const data = res.data.data
|
||||
|
@ -436,15 +435,15 @@ export default {
|
|||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
this.isLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
async getCreatorList() {
|
||||
this.is_loading = true
|
||||
this.isLoading = true
|
||||
|
||||
try {
|
||||
const res = await memberApi.getCreatorAllList()
|
||||
const res = await accountApi.getCounselorList()
|
||||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.creatorList = res.data.data.map((item) => {
|
||||
|
@ -458,7 +457,7 @@ export default {
|
|||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
this.is_loading = false
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
this.isLoading = false
|
||||
}
|
||||
},
|
||||
imageAdd(payload) {
|
||||
|
|
|
@ -78,12 +78,7 @@
|
|||
</template>
|
||||
|
||||
<v-card>
|
||||
<v-card-title v-if="selected_tag !== null">
|
||||
관심사 수정
|
||||
</v-card-title>
|
||||
<v-card-title v-else>
|
||||
관심사 등록
|
||||
</v-card-title>
|
||||
<v-card-title>관심사 등록</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="tag_text"
|
||||
|
@ -199,7 +194,6 @@ export default {
|
|||
this.image = null
|
||||
this.image_url = null
|
||||
this.tag_text = null
|
||||
this.selected_tag = null
|
||||
},
|
||||
|
||||
showModifyTagDialog(tag) {
|
||||
|
@ -275,7 +269,6 @@ export default {
|
|||
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.show_dialog = false
|
||||
this.selected_tag = null
|
||||
this.image = null
|
||||
this.image_url = null
|
||||
this.tag_text = null
|
||||
|
|
Loading…
Reference in New Issue