|
|
@@ -35,7 +35,7 @@
|
|
|
<!-- email -->
|
|
|
<b-form-group label="Email" label-for="login-email">
|
|
|
<validation-provider #default="{ errors }" name="Email" rules="required|email">
|
|
|
- <b-form-input id="login-email" ref="inputEmail" v-model="userEmail"
|
|
|
+ <b-form-input id="login-email" v-model="userEmail"
|
|
|
:state="errors.length > 0 ? false : null" name="login-email" placeholder="john@example.com" />
|
|
|
<small class="text-danger">{{ errors[0] }}</small>
|
|
|
</validation-provider>
|
|
|
@@ -51,7 +51,7 @@
|
|
|
</div>
|
|
|
<validation-provider #default="{ errors }" name="Password" rules="required">
|
|
|
<b-input-group class="input-group-merge" :class="errors.length > 0 ? 'is-invalid' : null">
|
|
|
- <b-form-input id="login-password" ref="inputPassword" v-model="password"
|
|
|
+ <b-form-input id="login-password" v-model="password"
|
|
|
:state="errors.length > 0 ? false : null" class="form-control-merge" :type="passwordFieldType"
|
|
|
name="login-password" placeholder="············" />
|
|
|
<b-input-group-append is-text>
|
|
|
@@ -184,7 +184,7 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
|
|
|
- useJwt.login({ email: this.$refs.inputEmail.value, password: this.$refs.inputPassword.value })
|
|
|
+ useJwt.login({ email: this.userEmail, password: this.password })
|
|
|
.then(res => {
|
|
|
useJwt.setToken(res.data.token)
|
|
|
localStorage.setItem('userData', res.data.userData)
|