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

d

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