Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.2",
"core-js": "^3.6.4",
"vue": "^2.6.11",
"vue-router": "^3.1.6",
"vue-the-mask": "^0.11.1",
"vuex": "^3.1.3"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<noscript>
Expand Down
Binary file added src/assets/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 35 additions & 26 deletions src/pages/SignIn.vue
Original file line number Diff line number Diff line change
@@ -1,46 +1,55 @@
<template>
<div>
<h1>Ola</h1>
<h1>Login</h1>
<div>
<label for>Username</label>
<input v-model="username" type="text" />
</div>

<div class="b">
<label class="a" for="">Email</label>
<input v-bind="email" type="text">
</div>
<div>
<label for>Senha</label>
<input v-model="password" type="text" />
</div>

<div class="b">
<label class="a" for="">Password</label>
<input v-model="password" type="text"> {{email}}
</div>
<p>Token: {{token}}</p>

<div class="btn">
<button @click="login">Login</button>
</div>
<button @click="login">Entrar</button>
</div>
</template>

<script>
import { axiosNormal as axios } from "../util/axios";

export default {
data() {
return {
email: "",
password: ""
}
username: "",
password: "",
token: ""
};
},
methods: {
login() {
alert(this.password)
async login() {
let data;
try {
const res = await axios.get("/signin", {
params: {
username: this.username,
password: this.password
}
});

data = res.data;
} catch (err) {
alert("Erro");
}

this.token = data.token;

}
}
}
};
</script>

<style>
.a{
margin-right: 10px;
margin-bottom: 10px;
}
.b{
margin-right: 10px;
margin-bottom: 10px;
}
</style>
Loading