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 @@