Skip to content
Snippets Groups Projects
Commit 01421acc authored by KimDoHyun's avatar KimDoHyun
Browse files

한 부분까지 css 부탁드립니다.

parent 507eba38
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,24 @@ const routes = [
component: () =>
import(/* webpackChunkName: "about" */ "../views/Post.vue")
},
{
path: "/club_join/:clubId",
name: "club_join",
component: () =>
import(/* webpackChunkName: "about" */ "../views/club_Join.vue")
},
{
path: "/joinedClub/user/:uid",
name: "club_detail",
component: () =>
import(/* webpackChunkName: "about" */ "../views/club_Detail.vue")
},
{
path: "/activityLog/one/:clubId/:boardId",
name: "board",
component: () =>
import(/* webpackChunkName: "about" */ "../views/Board.vue")
},
]
const router = new VueRouter({
......
<!--활동일지 게시판에서 게시글 눌렀을 때-->
<template>
<div class="board">
<NavClub id="navClub"></NavClub>
제목: {{board[0].title}}<br>
내용: {{board[0].content}}<br>
글쓴이: {{board[0].writer}}<br>
작성 날짜: {{board[0].date}}<br>
</div>
</template>
<script>
import axios from "axios"
import NavClub from '@/components/NavClub.vue'
export default {
components: {
'NavClub': NavClub
},
data(){
return{
club:[],
board:[]
}
},
async created(){
let id = this.$route.params.clubId;
const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
this.club = res.data.result
let bid = this.$route.params.boardId;
const board = await this.$http.get(`http://jnhonlinux.ddns.net:3000/activityLog/one/${id}/${bid}`)
this.board = board.data.result
}
}
</script>
\ No newline at end of file
......@@ -2,52 +2,63 @@
<template>
<div class="modify">
<div>
이름: <input type="text" name="name" placeholder="김도현" readonly/>
이름: <input type="text" name="name">
<br>
이메일: <input type="email" v-model="user.email" placeholder="kdh5998@ajou.ac.kr" required>
이메일: <input type="email" v-model="email" required>
<br>
대학교: <input type="text" v-model="user.university" placeholder="아주대학교" required>
대학교: <input type="text" v-model="univ" required>
<br>
전공: <input type="text" v-model="user.major" placeholder="소프트웨어학과" required>
전공: <input type="text" v-model="department" required>
<br>
학번: <input type="text" v-model="user.student_num" placeholder="201720726">
학번: <input type="text" v-model="sid">
<br>
전화번호: <input type="text" v-model="phone" pattern="(010)-\d{3,4}-\d{4}">
<br>
비밀번호: <input type="password" v-model="password">
<br>
비밀번호 재확인: <input type="password" v-model="repassword">
<br>
전화번호: <input type="text" v-model="user.phone_num" placeholder="01092495992" pattern="(010)-\d{3,4}-\d{4}">
<br><br>
<!--아직 못함-->
<button @click="submit()">제출하기</button>
</div>
</div>
</template>
<script>
import { eventBus } from '../main'
import axios from "axios"
import {mapState} from "vuex"
export default {
data(){
return {
name:'',
email:'',
university:'',
major:'',
student_num:'',
phone_num:'',
user:{}
univ:'',
department:'',
sid:'',
phone:'',
password:'',
repassword:''
}
},
created(){
this.user.email = this.email
this.user.university = this.university
this.user.major = this.major
this.user.student_num = this.student_num
this.user.phone_num = this.phone_num
},
computed: {
...mapState(['userInfo'])
},
methods: {
submit(){
console.log(this.user)
// eventBus.$emit("userWasModified",new Date())
// if(this.name==''||this.email==''||this.univ==''||this.department==''||this.sid==''||this.phone==''||this.password==''||this.repassword==''){
// alert("빈칸을 채워주세요.")
// }
let id = this.userInfo.id
axios.post(`http://jnhonlinux.ddns.net:3000/users/${id}`, {
name: this.name,
email: this.email,
phone: this.phone,
department: this.department,
univ: this.univ,
sid: this.sid,
password: this.password
})
}
}
}
......
......@@ -14,7 +14,6 @@
</template>
<script>
import { eventBus } from "../main"
import {mapState} from "vuex"
export default {
data() {
......
......@@ -9,6 +9,7 @@
<textarea style="resize:none;" cols="60" rows="13" v-model="content" placeholder="게시글을 작성하세요." class="content" required></textarea>
</div>
<br>
<button @click="cancel">취소</button>
<button @click="post">게시</button>
</div>
</template>
......@@ -33,6 +34,7 @@ export default {
},
methods: {
post(){
if(this.title != '' && this.content != ''){
let id = this.$route.params.clubId;
axios.post(`http://jnhonlinux.ddns.net:3000/activityLog/${id}`, {
title: this.title,
......@@ -42,6 +44,20 @@ export default {
})
router.push(`/club_post/${id}`)
}
if(this.title == '' && this.content != ''){
alert("제목을 써주세요.")
}
if(this.title != '' && this.content == ''){
alert("내용을 써주세요.")
}
if(this.title == '' && this.content == ''){
alert("제목과 내용을 써주세요.")
}
},
cancel(){
let id = this.$route.params.clubId;
router.push(`/club_post/${id}`)
}
},
async created() {
let id = this.$route.params.clubId;
......
<!--클럽 회원 관리에서 유저 정보 자세히 보기-->
<template>
<div class="detail">
<NavClub id="navClub"></NavClub>
hi
</div>
</template>
<script>
import NavClub from '@/components/NavClub.vue'
export default {
name: 'club_detail',
components: {
'NavClub': NavClub
},
data(){
return {
club:[],
member:[]
}
},
// async created() {
// let id = this.$route.params.clubId;
// const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
// this.club = res.data.result
// const member = await this.$http.get(`http://jnhonlinux.ddns.net:3000/joinedClub/${id}`)
// this.member = member.data.result
// },
}
</script>
\ No newline at end of file
......@@ -16,13 +16,10 @@
<script>
import NavClub from '@/components/NavClub.vue'
import Post from '@/views/Post.vue'
export default {
name: 'club_post',
name: 'club_free',
components: {
'NavClub': NavClub,
'Post' : Post
'NavClub': NavClub
},
data(){
return {
......
<template>
<div>
<NavClub id="navClub"></NavClub>
<div class="join">
<h2>가입 신청서</h2>
<textarea style="resize:none;" cols="60" rows="13" v-model="comment" placeholder="자기 소개 및 하고싶은 말씀을 적어주세요." class="comment"></textarea>
</div>
<button @click="post">제출</button>
</div>
</template>
<script>
import NavClub from '@/components/NavClub.vue'
import router from "../router/index"
import axios from "axios"
import {mapState} from "vuex"
export default {
data(){
return {
comment:'',
club:[{
id:''
}]
}
},
components: {
'NavClub': NavClub
},
async created() {
let id = this.$route.params.clubId;
const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
this.club = res.data.result
},
computed: {
...mapState(['userInfo'])
},
methods: {
post(){
if(this.comment != ''){
let id = this.$route.params.clubId;
axios.put(`http://jnhonlinux.ddns.net:3000/applyClub/${id}`, {
user: this.userInfo.name,
comment: this.comment,
club: this.club[0].id
})
alert("가입신청이 완료되었습니다.")
router.push(`/club_page/${id}`)
}
else{
alert("빈칸을 채워주세요.")
}
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
<!--동아리 내에서 동아리 회원 관리-->
<template>
<div class="manage">
<NavClub id="navClub">가나다</NavClub>
<h3>{{$route.query.clubName}}</h3>
<NavClub id="navClub"></NavClub>
<h3>동아리원 목록</h3>
<div class="clubmember">
<div v-for="clubmem in club">
<h3>이름: {{clubmem.name}}, 학번: {{club.student_num}}, 학과:{{club.major}}</h3>
<div v-for="clubmem in member">
<h3 style="display:inline">이름: {{clubmem.user}}</h3>
<button><router-link :to="{path:`/joinedClub/user/${clubmem.user}`}">자세히</router-link></button>
</div>
</div>
<br><br>
<div>
<h3>가입 신청자 목록</h3>
<div class="waitmember">
<!--관리자만 볼 수 있도록 가입 신청 대기자들 목록 표시-->
</div>
<br><br>
</div>
</template>
......@@ -24,13 +25,17 @@ export default {
},
data(){
return {
club:{}
club:[],
member:[]
}
},
async created() {
let id = this.$route.params.clubId;
const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
this.club = res.data.result
const member = await this.$http.get(`http://jnhonlinux.ddns.net:3000/joinedClub/${id}`)
this.member = member.data.result
},
}
</script>
......@@ -41,4 +46,7 @@ export default {
height: 300px;
overflow: scroll;
}
.clubmember h3 {
margin-right: 80px;
}
</style>
\ No newline at end of file
......@@ -3,8 +3,8 @@
<div class="clubView">
<NavClub id="navClub"></NavClub>
<div v-for="board in activityLog" class="board">
<router-link :to="{ name: 'board', params: { id: board.id}}">
<div>
<router-link :to="{ name: 'board', params: { clubId: `${club[0].id}`, boardId: board.id }}">
<div class="boardlist">
{{board.writer}}{{board.title}}{{board.date}}
</div>
</router-link>
......@@ -16,13 +16,11 @@
<script>
import NavClub from '@/components/NavClub.vue'
import Post from '@/views/Post.vue'
export default {
name: 'club_post',
components: {
'NavClub': NavClub,
'Post' : Post
'NavClub': NavClub
},
data(){
return {
......@@ -44,9 +42,8 @@ export default {
let id = this.$route.params.clubId;
const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
this.club = res.data.result
const activityLog = await this.$http.get(`http://jnhonlinux.ddns.net:3000/activityLog/${id}`)
const activityLog = await this.$http.get(`http://jnhonlinux.ddns.net:3000/activityLog/all/${id}`)
this.activityLog = activityLog.data.result
}
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment