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 {