From b5ba96c0f32e29b915f3df434124ee994f20cfb4 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 23 Nov 2021 14:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 ++- src/apps/AppInterview/AppInterview.vue | 4 +++- src/apps/AppInterview/interviewDetail.vue | 3 ++- src/components/AiBack.vue | 26 +++++++++++------------ src/pages/loading.vue | 2 +- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/App.vue b/src/App.vue index 27521f7f..a1f57161 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,12 +20,13 @@ export default { }, methods: { ...mapMutations(['initWaterMarker', 'logout', 'getConfig']), - goto(params) { + goto(params, cb) { let {path: url, query: {app}} = this.$route params.query = {app, ...(params.query || {})} uni.navigateTo({ url, success: () => { this.$router.push({...params}) + cb && cb() } }) } diff --git a/src/apps/AppInterview/AppInterview.vue b/src/apps/AppInterview/AppInterview.vue index 686411d9..cfca66ed 100644 --- a/src/apps/AppInterview/AppInterview.vue +++ b/src/apps/AppInterview/AppInterview.vue @@ -32,6 +32,7 @@
+ @@ -46,6 +47,7 @@ import AiImage from "../../components/AiImage"; import AiDate from "../../components/AiDate"; import AiFixedBtn from "../../components/AiFixedBtn"; import InterviewDetail from "./interviewDetail"; +import AiBack from "../../components/AiBack"; export default { name: "AppInterview", @@ -53,7 +55,7 @@ export default { inject: { root: {} }, - components: {InterviewDetail, AiFixedBtn, AiDate, AiImage, AiCard, AiTopFixed, AiSelect}, + components: {AiBack, InterviewDetail, AiFixedBtn, AiDate, AiImage, AiCard, AiTopFixed, AiSelect}, data() { return { search: {title: ""}, diff --git a/src/apps/AppInterview/interviewDetail.vue b/src/apps/AppInterview/interviewDetail.vue index 8c30becb..5219094c 100644 --- a/src/apps/AppInterview/interviewDetail.vue +++ b/src/apps/AppInterview/interviewDetail.vue @@ -41,6 +41,7 @@ import AiBack from "../../components/AiBack"; export default { name: 'interviewDetail', components: {AiBack, AiTextarea, AiImage, AiUploader}, + inject: {root: {}}, computed: { isEdit() { let flag = this.$route.query?.detail != 1 @@ -73,7 +74,7 @@ export default { }).then(res => { if (res?.code == 0) { this.$u.toast("提交成功!") - uni.navigateBack() + this.root.goto({query: {}}) } }) } diff --git a/src/components/AiBack.vue b/src/components/AiBack.vue index 71816ba0..a198969a 100644 --- a/src/components/AiBack.vue +++ b/src/components/AiBack.vue @@ -1,5 +1,9 @@