-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
추천 기능 추가, 자신이 작성한 게시글, 댓글에 한해 수정, 삭제 기능 버튼 노출, 회원 정보 조회시 추천한 게시글 목록 조…
…회 기능 추가
- Loading branch information
Showing
12 changed files
with
213 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
</script> | ||
|
||
<template> | ||
<!-- User Info Popup --> | ||
|
||
</template> | ||
|
||
|
54 changes: 54 additions & 0 deletions
54
src/components/admin/AdminUserBoardRecommendedComponent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup> | ||
import {useBoardStore} from "@/stores/board.js"; | ||
import Swal from "sweetalert2"; | ||
import {ref} from "vue"; | ||
import {useRouter} from "vue-router"; | ||
const router = useRouter() | ||
const boardStore = useBoardStore(); | ||
const props = defineProps(['memNo']); | ||
const boards = ref([]); | ||
const result = await boardStore.getRecommendedBoardByMemNo(props.memNo, 1, 10); | ||
const data = result.data; | ||
if (data.data) { | ||
boards.value = data.data.boardImpList; | ||
} | ||
function goBoardPage(id) { | ||
router.push(`/boards/${id}`) | ||
} | ||
</script> | ||
|
||
<template> | ||
<div id="userRecommendedBoards"> | ||
<table id="userRecommendedBoardsTable"> | ||
<thead> | ||
<tr> | ||
<th style="width: 5rem;">식별번호</th> | ||
<th>제목</th> | ||
<th style="width: 12rem;">작성일자</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="board in boards" :key="board.id"> | ||
<td>{{ board.id }}</td> | ||
<td> | ||
<span @click="goBoardPage(board.id)" style="cursor:pointer;">{{ board.title }}</span> | ||
</td> | ||
<td>{{ board.regDate }}</td> | ||
</tr> | ||
<tr v-if="boards.length === 0"> | ||
<td colspan="4" style="text-align: center;">작성한 게시글이 존재하지 않습니다.</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
#userRecommendedBoards, #userRecommendedBoardsTable { | ||
width: 100%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.