Ignore:
Timestamp:
01/25/25 00:58:19 (3 months ago)
Author:
Ljubomir Ilievski <ilievski.ljubomir@…>
Branches:
master
Children:
4894099
Parents:
a520992
Message:

Zavrsen pogolem del Login/Register Logika

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ReserveNGo-frontend/src/components/Project/login_.vue

    ra520992 r17bf12d  
    1 <script setup>
     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}
    236
    337</script>
     
    1044    <div class="row justify-content-center  ">
    1145
     46<!--      <form action="http://localhost:8080/api/auth/login" method="POST">-->
    1247      <div class="col-3">
    13         <form action="http://localhost:8080/api/auth/login" method="POST">
     48        <form  v-on:submit.prevent="makeLogin">
    1449
    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">
    1752
    1853      <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">
    2055
    2156        <button type="submit" class="btn btn-dark mt-2">Login</button>
Note: See TracChangeset for help on using the changeset viewer.