Commit ef6bec74 authored by 赵茹林's avatar 赵茹林

fix last callback not update

parent 5d117cda
......@@ -267,36 +267,37 @@
this.callbackEdit.wechat.value = this.user.info.wx_number;
this.callbackEdit.wechat.origin = this.user.info.wx_number;
},
'callbackObj.timestamp'() {
this.user.user_id = this.callbackObj.user_id;
this.getUser();
this.getTag();
'callbackObj.timestamp'() { // 时间戳变化更新数据
this.initCallback();
}
},
mounted() {
this.user.user_id = this.callbackObj.user_id;
if (!this.hasUserInfo) {
this.getUser();
} else {
this.user.info = this.callbackObj.info;
}
this.getTag();
this.getData();
if (this.callbackObj.teacher_id) {
let json = {
user_id: this.callbackObj.user_id
this.initCallback();
},
methods: {
initCallback() {
this.user.user_id = this.callbackObj.user_id;
if (!this.hasUserInfo) {
this.getUser();
} else {
this.user.info = this.callbackObj.info;
}
getCallBackPrevApi(json).then(res => {
if (res && res[0] && res[0].next_visit_at && res[0].intention) {
this.add.intention = res[0].intention;
this.add.next_visit_at = res[0].next_visit_at;
this.getTag();
this.getData();
if (this.callbackObj.teacher_id) {
let json = {
user_id: this.callbackObj.user_id
}
})
}
getCallBackPrevApi(json).then(res => {
if (res && res[0] && res[0].next_visit_at && res[0].intention) {
this.add.intention = res[0].intention;
this.add.next_visit_at = res[0].next_visit_at;
}
})
}
},
},
methods: {
filterName(string, type) {
return this[type].find(i => {
return i.value == string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment