source: ReserveNGo-frontend/src/components/Project/login_.vue@ 17bf12d

Last change on this file since 17bf12d was 17bf12d, checked in by Ljubomir Ilievski <ilievski.ljubomir@…>, 3 months ago

Zavrsen pogolem del Login/Register Logika

  • Property mode set to 100644
File size: 1.4 KB
Line 
1<script>
2
3
4import { userStore } from '@/PiniaStores/UserStore.js'
5
6export default {
7 data() {
8 return {
9 form_info:{
10 email: '',
11 password: ''
12 },
13
14 url: 'http://localhost:8080/api/auth/login',
15
16 userStore_: userStore(),
17
18 }
19 },
20 methods: {
21 /*async makeLogin() {
22
23 await fetch(this.url, {
24 method: 'POST',
25 headers: { 'Content-Type': 'application/x-www-form-urlencoded'},
26 body: new URLSearchParams({
27 email: this.form_info.email,
28 password: this.form_info.password
29 })
30 }).then((response) => response.json())
31 .then(json => )
32
33 }*/
34 }
35}
36
37</script>
38
39<template>
40
41
42 <div class="container-xxl">
43
44 <div class="row justify-content-center ">
45
46<!-- <form action="http://localhost:8080/api/auth/login" method="POST">-->
47 <div class="col-3">
48 <form v-on:submit.prevent="makeLogin">
49
50 <label for="email" class="form-label">Email</label>
51 <input v-model="this.form_info.email" name="email" id="email" class="form-control" type="email">
52
53 <label for="password" class="form-label">Password</label>
54 <input v-model="this.form_info.password" name="password" id="password" type="password" class="form-control">
55
56 <button type="submit" class="btn btn-dark mt-2">Login</button>
57 </form>
58 </div>
59
60
61
62 </div>
63
64
65 </div>
66</template>
67
68<style scoped>
69
70</style>
Note: See TracBrowser for help on using the repository browser.