|
@ -63,21 +63,20 @@ |
|
|
if(this.adding) return |
|
|
if(this.adding) return |
|
|
this.adding = true |
|
|
this.adding = true |
|
|
var param = new Object() |
|
|
var param = new Object() |
|
|
param.real_name = this.name |
|
|
param.name = this.name |
|
|
param.id_no = this.idcardExt |
|
|
param.idcard_ext = this.idcardExt |
|
|
param.mobile = this.phone |
|
|
param.phone = this.phone |
|
|
var that = this |
|
|
var that = this |
|
|
var addtimer = setTimeout(function() { |
|
|
var addtimer = setTimeout(function() { |
|
|
that.adding = false |
|
|
that.adding = false |
|
|
}, 5000); |
|
|
}, 5000); |
|
|
|
|
|
|
|
|
var req = 'client/user/visit_user/' |
|
|
var req = 'setting_visitor/' |
|
|
var method = 'POST' |
|
|
var method = 'POST' |
|
|
if(this.vid){ |
|
|
if(this.vid){ |
|
|
req = 'client/user/visit_user/'+this.vid+'/' |
|
|
param.id = this.vid |
|
|
method = 'put' |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.$http.req(req, param, method, true).then(data=>{ |
|
|
this.$http.req(req, param, method, true).then(data=>{ |
|
|
clearTimeout(addtimer) |
|
|
clearTimeout(addtimer) |
|
|
this.adding = false |
|
|
this.adding = false |
|
@ -107,7 +106,6 @@ |
|
|
}, |
|
|
}, |
|
|
submit(){ |
|
|
submit(){ |
|
|
this.checkSubmit() |
|
|
this.checkSubmit() |
|
|
this.canSubmit = true |
|
|
|
|
|
if(!this.canSubmit) return |
|
|
if(!this.canSubmit) return |
|
|
this.add() |
|
|
this.add() |
|
|
} |
|
|
} |
|
|