Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fetchCommodies:function(){
Indicator.open();
let vm = this;
vm.$http.post('/api/commodities/topic',{
topic_id : vm.$route.params.hashid
}).then(function(response){
vm.$set('data',response.data);
vm.$nextTick(function(){
Indicator.close();
vm.data == '' ? vm.$set('empty',true) : vm.$set('empty',false);
});
});
}
}
fetchCommodies:function(){
Indicator.open();
let vm = this;
vm.$http.post('/api/commodities/plate',{
plate_id : vm.$route.params.hashid
}).then(function(response){
vm.$set('data',response.data);
vm.$nextTick(function(){
Indicator.close();
vm.data == '' ? vm.$set('empty',true) : vm.$set('empty',false);
});
});
}
}
addAddress:function(){
let vm = this;
Indicator.open();
vm.$http.post('/api/address',vm.form_data).then(function(response){
Indicator.close();
Toast({
message: response.data.message
});
if(response.data.code === 0){
window.history.go(-1);
}
});
}
}
fetchCommodies:function(){
Indicator.open();
let vm = this;
vm.$http.post('/api/commodities/category',{
category_id : vm.$route.params.hashid
}).then(function(response){
vm.$set('data',response.data);
vm.$nextTick(function(){
Indicator.close();
vm.data == '' ? vm.$set('empty',true) : vm.$set('empty',false);
});
});
}
}
deleteAddress:function(address){
let vm = this;
Indicator.open();
vm.$http.delete('/api/address/'+address.id).then(function(response){
Indicator.close();
Toast({
message: response.data.message
});
if(response.data.code === 0){
window.history.go(-1);
}
});
}
}