2023-09-01 03:10:33 +07:00
|
|
|
<template>
|
|
|
|
|
|
|
|
<v-app>
|
|
|
|
<top-bar :show-back-icon="true" :page-title="pageTitle" />
|
|
|
|
<v-main>
|
|
|
|
<v-container>
|
|
|
|
<v-form name="login-form">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="username">Username: </label>
|
|
|
|
<input type="text" id="username" v-model="input.username" />
|
|
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="password">Password: </label>
|
|
|
|
<input type="password" id="password" v-model="input.password" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</v-form>
|
|
|
|
</v-container>
|
|
|
|
|
|
|
|
<v-btn @click.prevent="login">ลงชื่อเข้าใช้</v-btn>
|
2023-09-01 03:35:39 +07:00
|
|
|
<v-btn :to="{name: 'register'}">ฉันต้องการสมัครสมาชิก</v-btn>
|
2023-09-01 03:10:33 +07:00
|
|
|
|
|
|
|
</v-main>
|
|
|
|
</v-app>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-09-01 03:35:39 +07:00
|
|
|
import {RouterLink} from 'vue-router';
|
2023-09-01 03:10:33 +07:00
|
|
|
import TopBar from '@/components/TopBar.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TopBar
|
|
|
|
},
|
|
|
|
name: 'Login',
|
|
|
|
data() {
|
|
|
|
return {
|
2023-09-01 03:35:39 +07:00
|
|
|
pageTitle: 'ลงชื่อเข้าใช้',
|
2023-09-01 03:10:33 +07:00
|
|
|
input: {
|
|
|
|
username: '',
|
|
|
|
password: ''
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
login() {
|
|
|
|
if (this.input.username !== '' || this.input.password !== '') {
|
|
|
|
console.log('Authenticated: Checking with Backend');
|
|
|
|
} else {
|
|
|
|
console.log('Username and Password cannot be empty');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|