|
@ -41,22 +41,7 @@ |
|
|
if(option.vid) this.vid = option.vid |
|
|
if(option.vid) this.vid = option.vid |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
if(this.vid){ |
|
|
if(this.vid) this.getVisitorInfo() |
|
|
var visitor_info = uni.getStorageSync('visitor_info_'+this.vid) |
|
|
|
|
|
if(!visitor_info) { |
|
|
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
visitor_info = JSON.parse(visitor_info) |
|
|
|
|
|
this.name = visitor_info.real_name |
|
|
|
|
|
this.idcardExt = visitor_info.id_no |
|
|
|
|
|
this.phone = visitor_info.mobile |
|
|
|
|
|
this.nameRule = true |
|
|
|
|
|
this.idcardExtRule = true |
|
|
|
|
|
this.phoneRule = true |
|
|
|
|
|
|
|
|
|
|
|
this.checkSubmit() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
add() { |
|
|
add() { |
|
@ -83,6 +68,22 @@ |
|
|
if(data == -1) return |
|
|
if(data == -1) return |
|
|
this.$func.toPage('/pages/visitors/visitors?type='+this.type) |
|
|
this.$func.toPage('/pages/visitors/visitors?type='+this.type) |
|
|
}); |
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
getVisitorInfo() { |
|
|
|
|
|
this.$http.req('get_visitor_info', {id:this.vid}, 'GET', true).then(data=>{ |
|
|
|
|
|
if(data == -1) { |
|
|
|
|
|
this.$func.toPage('/pages/index/index') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.name = data.name |
|
|
|
|
|
this.idcardExt = data.idcard_ext |
|
|
|
|
|
this.phone = data.phone |
|
|
|
|
|
this.nameRule = true |
|
|
|
|
|
this.idcardExtRule = true |
|
|
|
|
|
this.phoneRule = true |
|
|
|
|
|
this.checkSubmit() |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
nameBlurEvent(value, res){ |
|
|
nameBlurEvent(value, res){ |
|
|
this.name = value |
|
|
this.name = value |
|
|