forked from Albatross/projectx
parent
9908780347
commit
9baa128cad
@ -0,0 +1,20 @@ |
||||
import Vue from 'vue' |
||||
import VueRouter from 'vue-router' |
||||
|
||||
Vue.use(VueRouter) |
||||
|
||||
const routes = [ |
||||
{ |
||||
path: '/', |
||||
name: 'Home', |
||||
component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue') |
||||
} |
||||
] |
||||
|
||||
const router = new VueRouter({ |
||||
mode: 'history', |
||||
base: process.env.BASE_URL, |
||||
routes |
||||
}) |
||||
|
||||
export default router |
@ -0,0 +1,40 @@ |
||||
<template> |
||||
<v-container> |
||||
<v-row> |
||||
<v-col cols="12" md="6" sm="12"> |
||||
<v-text-field placeholder="Name/Nickname" v-model="name"></v-text-field> |
||||
</v-col> |
||||
<v-col cols="12" md="6" sm="12"> |
||||
<v-text-field placeholder="Code" v-model="code"></v-text-field> |
||||
</v-col> |
||||
<v-col cols="12" md="12" sm="12"> |
||||
<v-text-field v-if="passwd" v-model="password" placeholder="Password" type="password"></v-text-field> |
||||
|
||||
</v-col> |
||||
<v-col cols="12" md="6" sm="12"><v-btn @click="passwd=!passwd" text>Password Login</v-btn></v-col> |
||||
<v-col cols="12" md="6" sm="12"> |
||||
<v-btn @click="login">Login</v-btn> |
||||
</v-col> |
||||
</v-row> |
||||
</v-container> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: 'Home', |
||||
data:() => ({ |
||||
passwd: false, |
||||
name:'', |
||||
code:'', |
||||
password:'' |
||||
}), |
||||
methods: { |
||||
login () { |
||||
this.$axios.post('login', { |
||||
username: this.code, |
||||
password: this.password |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
Loading…
Reference in new issue