Skip to content
Snippets Groups Projects
Commit 73f56e03 authored by KimDoHyun's avatar KimDoHyun
Browse files

d

parent 4d0e058a
No related branches found
No related tags found
No related merge requests found
......@@ -17,12 +17,11 @@
<router-link to='/login' v-if="isLogin === false">로그인</router-link><br>
<router-link to='/mypage' v-if="isLogin == true">마이 페이지</router-link><br><br>
<router-link to='/club' v-if="isLogin == true">동아리 구경</router-link><br><br>
<div style="list-style:none;" v-if="isLogin == true">내 동아리
<div v-for= "club in clublist">
<router-link :to="{path:`/club_page/${club.club}`,params:{clubId:club.club}}"></router-link>
{{club.clubname}}
</div>
{{clublist}}
<li v-for= "club in clublist">
<router-link :to="{name: 'club_page',params:{clubId:club.club}}">{{club.clubname}}</router-link>
</li>
</div><br>
<div @click="$store.dispatch('logout')">
<router-link to='/' v-if="isLogin == true">로그아웃</router-link><br><br>
......@@ -50,7 +49,7 @@ export default {
let uid = this.userInfo.uid
const res = await axios.get(`http://jnhonlinux.ddns.net:3000/joinedClub/user/${uid}`)
this.clublist = res.data.result
console.log(this.clublist)
const res2 = await axios.get('http://jnhonlinux.ddns.net:3000/club')
this.club = res2.data.result
}
......
......@@ -33,13 +33,16 @@ export default {
},
methods:{
post(){
axios.post(`http://jnhonlinux.ddns.net:3000/freeBoard`,{
let id = this.$route.params.clubId;
axios.post(`http://jnhonlinux.ddns.net:3000/freeBoard/${id}`,{
uid: this.userInfo.uid
}).then(res=>{
let id = this.$route.params.clubId;
console.log(res.data)
if(res.data.success == true){
router.push(`/club_free/${id}`)
} else {
alert('Not User');
}
})
}
......
......@@ -12,13 +12,16 @@
<hr/>
<div>
<h1>공지사항</h1>
<div v-for="notice in noticeBoard">
작성자: {{notice}}
</div>
</div>
</div>
</template>
<script>
import NavClub from '@/components/NavClub.vue'
import axios from "axios"
export default {
name: 'club_page',
......@@ -33,13 +36,19 @@ export default {
univ:'',
logo:'',
produce:''
}]
}],
noticeBoard:[]
}
},
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 noticeboard= await axios.get(`http://jnhonlinux.ddns.net:3000/noticeBoard/all/${id}`)
console.log(noticeboard)
this.noticeBoard = noticeboard.data.result
},
}
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment