added some function for app..
This commit is contained in:
parent
70970a0962
commit
2f02c54718
30
resources/assets/js/views/modules/item.js
vendored
30
resources/assets/js/views/modules/item.js
vendored
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user