Protected Content
Unfortunately, the content you are trying to access cannot be viewed in mobile browser.
Please download our app to access this content
Login
Connect through
{{ network.name }}
`;
Vue.component('login-form',{
template:_loginTemplate,
data:function(){
return {
usernameVal:'',
msg:[],
passwordVal:'',
isLoading: false,
loading: "",
showPassword:false,
minUsername:`1`,
socialNetworks: JSON.parse('null'),
loginWithOTP: `0`,
disableCaptcha:`1`,
successReq:window.vodlix.loginSuccess,
showLoginNote: "0",
loginNoteInHtml: ``
}
},
props:{
lasturl:{
type:String,
default:''
}
},
computed: {
hasSocialNetworks() {
return this.socialNetworks && this.socialNetworks.length > 0;
},
disabledCaptcha() {
return this.disableCaptcha != "1";
},
btnDisable(){
// return this.usernameVal.length < this.minUsername || this.passwordVal.length < 1
return this.usernameVal.length < 1 || this.passwordVal.length < 1
}
},
methods:{
userNameRules(){
if ( this.usernameVal == '' )
this.msg['usernameVal'] = `Username is required`
else
this.msg['usernameVal'] = ''
// else if ( this.usernameVal.length < this.minUsername )
// this.msg['usernameVal'] = `Username must contain atleast ${this.minUsername} characters`
},
passwordRules(){
if ( this.passwordVal == '' )
this.msg['passwordVal'] = `Password is required`
else
this.msg['passwordVal'] = ''
// else if ( this.passwordVal.length < 3 )
// this.msg['passwordVal'] = `Password must be alphanumeric`
},
getLogin(){
var button_text = 'Logging In...'
$(".submitBtn").attr('disabled',true)
$(".submitBtn").html(button_text)
window.vodlix.auth.loginUser({
username: this.usernameVal,
password: this.passwordVal
},this.lasturl);
},
requestAuthUrl(network) {
this.$set(this, "isLoading", true);
this.$set(this, "loading", network.network);
window.vodlix.api.get(`/v2/auth/social/${ network.network }`)
.then(response => {
const { data } = response;
if (data.auth_url !== undefined) {
return window.location.href = data.auth_url;
} else {
window.vodlix.error.toast({
html: `No oauth url returned for ${ network.name }. Please contact
our support .`
});
this.$set(this, "isLoading", false);
this.$set(this, "loading", "");
}
}).catch(err => {
const { responseJSON: response } = err;
window.vodlix.error.toast({
text: response.message
});
this.$set(this, "isLoading", false);
this.$set(this, "loading", "");
})
}
},
mounted(){
//console.log('sdf', window.awl.baseUrl)
},
})
-->