zan:function (n){
this.$http({
url:URL,
data:{
act:'acc',
id:n
}
}).then(function(res){
//这里怎么写,大胸弟....
});
},
After clicking, it’s not enough to change the displayed number. The variable used is the variable number + 1
After the click event, add one to the number and then change the displayed number on the page. Either you write less or there is something wrong with the order of your writing
After clicking, send a like request through ajax. If the request is successful, the number of likes will be updated. If the request fails, "Like Failed" will be displayed and the number will remain unchanged.