fix: ws推送时候在详情页数据不刷新的问题

This commit is contained in:
xuecong 2021-11-12 21:37:25 +08:00
parent a2baa18d75
commit 386474bc47
4 changed files with 20 additions and 0 deletions

View File

@ -304,6 +304,8 @@ export default {
community_id: this.postInfo.default_community_id community_id: this.postInfo.default_community_id
}; };
this.fetching = true;
utils.request utils.request
.post('/complain/detail', data) .post('/complain/detail', data)
.then(res => { .then(res => {
@ -460,6 +462,9 @@ export default {
if (cur.params.id !== old.params.id) { if (cur.params.id !== old.params.id) {
this.getDetail(); this.getDetail();
} }
},
'$route.params.id'() {
this.getDetail();
} }
}, },
components: { components: {

View File

@ -269,6 +269,8 @@ export default {
community_id: this.postInfo.default_community_id community_id: this.postInfo.default_community_id
}; };
this.fetching = true;
utils.request utils.request
.post('/fitment/detail', data) .post('/fitment/detail', data)
.then(res => { .then(res => {
@ -409,6 +411,9 @@ export default {
watch: { watch: {
'postInfo.default_community_id'() { 'postInfo.default_community_id'() {
this.getDetail(); this.getDetail();
},
'$route.params.id'() {
this.getDetail();
} }
}, },
components: { components: {

View File

@ -193,6 +193,8 @@ export default {
community_id: this.postInfo.default_community_id community_id: this.postInfo.default_community_id
}; };
this.fetching = true;
utils.request utils.request
.post('/move_car/detail', data) .post('/move_car/detail', data)
.then(res => { .then(res => {
@ -274,6 +276,9 @@ export default {
watch: { watch: {
'postInfo.default_community_id'() { 'postInfo.default_community_id'() {
this.getDetail(); this.getDetail();
},
'$route.params.id'() {
this.getDetail();
} }
}, },
components: { components: {

View File

@ -316,6 +316,8 @@ export default {
community_id: this.postInfo.default_community_id community_id: this.postInfo.default_community_id
}; };
this.fetching = true;
utils.request utils.request
.post('/repair/detail', data) .post('/repair/detail', data)
.then(res => { .then(res => {
@ -465,6 +467,9 @@ export default {
if (cur.params.id !== old.params.id) { if (cur.params.id !== old.params.id) {
this.getDetail(); this.getDetail();
} }
},
'$route.params.id'() {
this.getDetail();
} }
}, },
components: { components: {