added some function for app..

This commit is contained in:
Cüneyt Şentürk 2022-01-12 10:25:22 +03:00
parent 70970a0962
commit 2f02c54718

View File

@ -70,6 +70,36 @@ const app = new Vue({
},
methods: {
addToCart(alias, subscription_type) {
let add_to_cart_promise = Promise.resolve(axios.get(url + '/apps/' + alias + '/' + subscription_type +'/add'));
add_to_cart_promise.then(response => {
if (response.data.success) {
this.$notify({
message: response.data.message,
timeout: 0,
icon: "fas fa-bell",
type: 'success'
});
}
if (response.data.error) {
this.installation.status = 'exception';
this.installation.html = '<div class="text-danger">' + response.data.message + '</div>';
}
// Set steps
if (response.data.data) {
this.installation.steps = response.data.data;
this.installation.steps_total = this.installation.steps.length;
this.next();
}
})
.catch(error => {
});
},
onChangeCategory(category) {
if (!category.length) {
return;