Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div>
- <h1>TELA DE LOGIN</h1>
- <form method="post">
- <input type="text" v-model="form.username" placeholder="Usuário"> <br/>
- <input type="password" v-model="form.password" placeholder="*******">
- </form>
- <button v-on:click="login()">Logar</button>
- </div>
- </template>
- <script>
- import Service from '../libraries/service'
- export default {
- name: 'viewLogin',
- props: ['app'],
- data : function () {
- return {
- service: Service,
- auth: false,
- form : {
- username : '',
- password : '',
- }
- }
- },
- methods : {
- login : function () {
- Service.call('/auth/login', {}).get(function(res) {
- console.log(res);
- });
- this.app.login(true);
- }
- },
- watch: {
- auth: function (val) {
- console.log(val)
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement