apiCloud 双击事件
2021-02-19 23:19
标签:ret read class else inf info pos bsp token apiCloud 双击事件只能使用纯js去写 apiCloud 双击事件 标签:ret read class else inf info pos bsp token 原文地址:https://www.cnblogs.com/gqx-html/p/8304278.html var app = new Vue({
el: "#app",
data: function() {
return {
token: ‘‘,
us_id: ‘‘,
lastClickTime: 0,
lastClickId: 0
}
},
methods: {
follow:function(nc_id,r_index){
var this_obj= this;
var currentTime=new Date().getTime()
if(this.lastClickId != nc_id){
this.lastClickId = nc_id;
}else{
if(( currentTime - this.lastClickTime)300){
var a_data = {
token: this_obj.token,
nc_id: nc_id,
us_id: this_obj.us_id
};
var a_url = "/Info/add_follow_class";
common_ajax(a_url, a_data, function(res) {
this_obj.sort.push(res.info)
this_obj.more_sort.splice(r_index,1)
}, function(res) {
api.toast({
msg: res.info
});
});
}
}
this.lastClickTime = currentTime
}
}
});
app.ready();
上一篇:apiCloud 浏览图片
下一篇:Win7_KMS_激活脚本