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

push에러 때문에 다시

parents 685c8dbb 422fcefd
No related branches found
No related tags found
No related merge requests found
<template>
<div class="navClub">
<div id="clubMenu">
<router-link to='/clubHomePage'>프롤로그 </router-link> |
<router-link to='/'>공지사항 </router-link> |
<router-link to='/'>활동일지 </router-link> |
<router-link to='/'>자유게시판 </router-link> |
<router-link to='/'>캘린더 </router-link> |
<router-link to='/'>자주묻는질문 </router-link> |
<router-link to='/'>가입신청</router-link> |
</div>
</div>
</template>
<script>
</script>
<style>
.navClub {
background-color: cadetblue;
text-align: center;
}
</style>
\ No newline at end of file
......@@ -2,7 +2,6 @@
<div class="clubForm">
{{name}} <br>
{{address}} <br>
</div>
</template>
......
<template>
<div class="clubHone">
클럽 페이지 메인입니다.
</div>
</template>
<script>
export default {
async created() {
let id = req.params.id;
const res = await this.$http.get(`http://jnhonlinux.ddns.net:3000/club/${id}`)
if(res.data.success == true) {
this.data = res.data.result[0]
}
},
data() {
return {
name: '',
address: ''
}
}
}
</script>
<style>
.clubForm {
width: 300px;
height: 200px;
border: 2px solid black;
}
</style>
\ No newline at end of file
......@@ -4,6 +4,7 @@ import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import SignUp from '../views/SignUp.vue'
import Club from '../views/Club.vue'
import ClubPage from '../views/ClubPage.vue'
Vue.use(VueRouter)
......@@ -44,6 +45,10 @@ const routes = [
path: '/club',
name: 'club',
component: Club
},{
path: '/clubpage',
name: 'clubpage',
component: ClubPage
}
]
......
......@@ -4,8 +4,13 @@
<input type="text" id="searchClub" placeholder="Search"> <br>
<hr>
<div class="clubList">
<div class="club" v-for="club in data" :key="club">
{{club.name}}
<div class="club" v-for="club in data" :key="club" v-on:click="testClick" >
{{club.name}}<br/>
회장: {{club.manager}}<br/>
{{club.picture}}><br/>
{{club.detail}}<br/>
</div>
</div>
</div>
......@@ -30,6 +35,11 @@ export default {
name: '',
}
},
methods:{
testClick(){
return this.$router.push('/clubpage');
}
}
}
</script>
......
<template>
<div class="clubView">
<NavClub id="navClub">가나다</NavClub>
<h1>클럽 페이지 입니다.</h1>
<div id="clubMain">
<router-view/>
</div>
</div>
</template>
<script>
import NavClub from '@/components/NavClub.vue'
import clubHomePage from '@/components/clubHomePage.vue'
export default {
name: 'clubpage',
components: {
'NavClub': NavClub
},
async created() {
const res = await this.$http.get('http://jnhonlinux.ddns.net:3000/club')
if(res.data.success == true) {
this.data = res.data.result
}
},
}
</script>
<template>
<div class="joinedClub">
<NavOfClub></NavOfClub>
<h1>This is joinedClub Page</h1>
</div>
</template>
<script>
import NavOfClub from '@/components/NavOfClub.vue'
export default {
name: 'joinedClub',
components: {
NavOfClub
}
}
</script>
\ No newline at end of file
<template>
<div class="publicBoard">
<h1>This is Public Board</h1>
</div>
</template>
<script>
export default {
}
</script>
......@@ -7,6 +7,9 @@
<div class="signUpInput">
<input type="text" v-model="password" placeholder="Password">
</div>
<div class="signUpInput">
<input type="text" v-model="name" placeholder="Name">
</div>
<div class="signUpInput">
<input type="text" v-model="email" placeholder="Email">
</div>
......@@ -42,19 +45,26 @@ export default {
textLimit: 30,
uid: '',
password: '',
name: '',
email: '',
phone: '',
univ: '',
department: '',
sid: '',
ifsuper: '',
ifsuper: 0,
}
},
methods: {
async btnSignUp(){
if(this.uid == '' || this.password == ''){
alert('input Your Id & Pwd');
}else if(!this.sid_valid){
alert('plz input Number in StudentId');
} else {
const res = await this.$http.post('http://jnhonlinux.ddns.net:3000/signup', {
'uid': this.uid,
'password': this.password,
'name': this.name,
'email': this.email,
'phone': this.phone,
'univ': this.univ,
......@@ -68,6 +78,16 @@ export default {
}
}
}
},
computed: {
sid_valid: function() {
if(!isNaN(this.sid)){
return true
} else {
return false
}
}
}
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment