From 1455e2e0d7571793b18583125d2af0f26ba8ff42 Mon Sep 17 00:00:00 2001 From: guoyue Date: Mon, 19 Sep 2022 19:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E7=94=B3=E8=AF=B7=EF=BC=9A?= =?UTF-8?q?=E8=9E=8D=E5=90=88=E6=9C=8D=E5=8A=A1=E7=89=B9=E6=AE=8A=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/apply.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index 35fa458c..b5fb82bc 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -224,6 +224,11 @@ HomeHeader, AbilityToApplyFor, }, + beforeRouteLeave(from, to, next) { + console.log('from, to, next------------>', from, to, next); + localStorage.removeItem('integrationServicesItemInfo') + next() + }, setup() { const router = useRouter() const disabled = ref(false) @@ -238,7 +243,6 @@ 'integrationServicesItemInfo------------>', integrationServicesItemInfo ) - const applyAll = router.currentRoute.value.query.applyAll const num = ref(0) if (!applyAll) { @@ -372,6 +376,7 @@ //退出返回上一页 const resetFields = () => { window.history.go(-1) + localStorage.removeItem('integrationServicesItemInfo') } // 跳转到能力集市 @@ -805,9 +810,11 @@ updateIntegrationServices(_data) .then((res) => { console.log('res---更新--------->', res) + localStorage.removeItem('integrationServicesItemInfo') }) .catch((err) => { console.log('err----更新-------->', err) + localStorage.removeItem('integrationServicesItemInfo') }) } return {