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

fix last callback not update

parent 5d117cda
...@@ -267,36 +267,37 @@ ...@@ -267,36 +267,37 @@
this.callbackEdit.wechat.value = this.user.info.wx_number; this.callbackEdit.wechat.value = this.user.info.wx_number;
this.callbackEdit.wechat.origin = this.user.info.wx_number; this.callbackEdit.wechat.origin = this.user.info.wx_number;
}, },
'callbackObj.timestamp'() { 'callbackObj.timestamp'() { // 时间戳变化更新数据
this.user.user_id = this.callbackObj.user_id; this.initCallback();
this.getUser();
this.getTag();
} }
}, },
mounted() { mounted() {
this.user.user_id = this.callbackObj.user_id; this.initCallback();
if (!this.hasUserInfo) { },
this.getUser(); methods: {
} else { initCallback() {
this.user.info = this.callbackObj.info; this.user.user_id = this.callbackObj.user_id;
} if (!this.hasUserInfo) {
this.getTag(); this.getUser();
this.getData(); } else {
this.user.info = this.callbackObj.info;
if (this.callbackObj.teacher_id) {
let json = {
user_id: this.callbackObj.user_id
} }
getCallBackPrevApi(json).then(res => { this.getTag();
if (res && res[0] && res[0].next_visit_at && res[0].intention) { this.getData();
this.add.intention = res[0].intention;
this.add.next_visit_at = res[0].next_visit_at; 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) { filterName(string, type) {
return this[type].find(i => { return this[type].find(i => {
return i.value == string 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