From 37c66c6919b2968319565b3a2dc3ba64e99d5096 Mon Sep 17 00:00:00 2001 From: xjs Date: Fri, 27 Jun 2025 11:53:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=97=E6=84=BF=E8=A1=A8=E5=9B=9E?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../college/components/EnrollmentPlan.vue | 10 +++-- src/pages-sub/home/wishesList/index.vue | 20 +++++++++- src/pages-sub/home/wishesList/wishesList.vue | 37 +++++++++++++++---- src/store/user.ts | 18 ++++++--- 4 files changed, 66 insertions(+), 19 deletions(-) diff --git a/src/pages-sub/home/college/components/EnrollmentPlan.vue b/src/pages-sub/home/college/components/EnrollmentPlan.vue index 56f2e38..f43c400 100644 --- a/src/pages-sub/home/college/components/EnrollmentPlan.vue +++ b/src/pages-sub/home/college/components/EnrollmentPlan.vue @@ -25,18 +25,20 @@ - + + - - + + + - + diff --git a/src/pages-sub/home/wishesList/index.vue b/src/pages-sub/home/wishesList/index.vue index 59e76de..b3d8208 100644 --- a/src/pages-sub/home/wishesList/index.vue +++ b/src/pages-sub/home/wishesList/index.vue @@ -174,6 +174,8 @@ import FilterMajorList from './components/FilterMajorList.vue' const userStore = useUserStore() const navigatorBack = () => { + userStore.clearWishListId() + userStore.clearWishList() uni.navigateBack() } @@ -332,16 +334,32 @@ watch( { immediate: true }, ) +const isEdit = ref(false) + const handlePreview = () => { if (majorCount.value === 0) { return } - uni.navigateTo({ url: '/pages-sub/home/wishesList/wishesList?editType=add&typeName=智能填报' }) + if (isEdit.value) { + uni.navigateTo({ + url: `/pages-sub/home/wishesList/wishesList?editType=edit&typeName=智能填报&id=${userStore.userInfo.wishListId}&change=true`, + }) + } else { + uni.navigateTo({ + url: `/pages-sub/home/wishesList/wishesList?editType=add&typeName=智能填报`, + }) + } } const resetMajorList = () => { filterMajorRef.value.handleClear() } + +onShow(() => { + if (userStore.userInfo.wishListId) { + isEdit.value = true + } +})