Changeset 17bf12d for ReserveNGo-frontend/src/components/Project/login_.vue
- Timestamp:
- 01/25/25 00:58:19 (3 months ago)
- Branches:
- master
- Children:
- 4894099
- Parents:
- a520992
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ReserveNGo-frontend/src/components/Project/login_.vue
ra520992 r17bf12d 1 <script setup> 1 <script> 2 3 4 import { userStore } from '@/PiniaStores/UserStore.js' 5 6 export 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 } 2 36 3 37 </script> … … 10 44 <div class="row justify-content-center "> 11 45 46 <!-- <form action="http://localhost:8080/api/auth/login" method="POST">--> 12 47 <div class="col-3"> 13 <form action="http://localhost:8080/api/auth/login" method="POST">48 <form v-on:submit.prevent="makeLogin"> 14 49 15 <label for="email" class="form-label">Email</label>16 <input name="email" id="email" class="form-control" type="email">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"> 17 52 18 53 <label for="password" class="form-label">Password</label> 19 <input name="password" id="password" type="password" class="form-control">54 <input v-model="this.form_info.password" name="password" id="password" type="password" class="form-control"> 20 55 21 56 <button type="submit" class="btn btn-dark mt-2">Login</button>
Note:
See TracChangeset
for help on using the changeset viewer.