<input v-model="amount" type="number" @input="throttle" placeholder="javascript" size="large"
class="" />
// 调用接口获取模糊数据
giveIntegralTotal() {
let obj = {}
this.$http.giveIntegralTotal(this.amount).then(res => {
console.log(res)
})
},
//节流函数
throttle(e) {
console.log(99999,e.detail.value)
this.amount = e.detail.value
//保持this的指向始终指向vue实例
var that = this;
if (!that.statu) {
return;
}
that.statu = false;
setTimeout(function() {
console.log(new Date());
that.giveIntegralTotal();
that.statu = true;
}, 1500)
},