delete:function(params){ if(!confirm('确定要删除吗')){ return false; } var _that=this; return IDB.deleteRecord(storeBrands,params.id).then(function(value){ _that.transitionToRoute('index',{queryParams: {r: Math.round(Math.random() * 10000)}}); }).catch(function(error){ alert(error); return false; }); },
delete:function(params){ if(!confirm('确定要删除吗')){ return false; } var _that=this; return IDB.deleteRecord(storeBrands,params.id).then(function(value){ _that.transitionToRoute('index'); location.href=location.href; }).catch(function(error){ alert(error); return false; }); }