diff --git a/src/pages-evaluation-sub/aiAutoFill/index.vue b/src/pages-evaluation-sub/aiAutoFill/index.vue index 8a419a9..8e243b1 100644 --- a/src/pages-evaluation-sub/aiAutoFill/index.vue +++ b/src/pages-evaluation-sub/aiAutoFill/index.vue @@ -7,7 +7,7 @@ } diff --git a/src/pages-sub/home/wishesList/useWisheList.ts b/src/pages-sub/home/wishesList/useWisheList.ts deleted file mode 100644 index 19088b4..0000000 --- a/src/pages-sub/home/wishesList/useWisheList.ts +++ /dev/null @@ -1,44 +0,0 @@ -export const calcTypeName = (type: number) => { - const style = { - 2: { - text: '冲', - color: '#EB5241', - bgColor: 'rgba(235,82,65,0.15)', - }, - 1: { - text: '稳', - color: '#FA8E23', - bgColor: 'rgba(250,142,35,0.15)', - }, - 0: { - text: '保', - color: '#15C496', - bgColor: 'rgba(21,196,150,0.15)', - }, - }[type] || { text: '保', color: '#15C496', bgColor: 'rgba(21,196,150,0.15)' } - - return { - text: style.text, - style: { - color: style.color, - backgroundColor: style.bgColor, - }, - } -} -export const coverTypeModel = (tModel: Record, total: number) => { - const TYPE_LABELS = { - c: '冲', - w: '稳', - b: '保', - } as const - - let _result = Object.entries(TYPE_LABELS).map(([key, label]) => ({ - name: `${label}(${tModel[key]})`, - value: key === 'b' ? '0' : key === 'w' ? '1' : '2', - })) - _result.unshift({ - name: `全部${total}`, - value: '-1', - }) - return _result -} diff --git a/src/pages-sub/home/wishesList/wishesList.vue b/src/pages-sub/home/wishesList/wishesList.vue index 261cfc8..3def87e 100644 --- a/src/pages-sub/home/wishesList/wishesList.vue +++ b/src/pages-sub/home/wishesList/wishesList.vue @@ -1,11 +1,58 @@ + +{ + style: { + navigationBarTitleText: '当前志愿表', + }, +} + + diff --git a/src/pages.json b/src/pages.json index 3a359b3..fc392a9 100644 --- a/src/pages.json +++ b/src/pages.json @@ -239,18 +239,6 @@ "navigationStyle": "custom" } }, - { - "path": "home/wishesList/CollegeMajor", - "type": "page" - }, - { - "path": "home/wishesList/DataTable", - "type": "page" - }, - { - "path": "home/wishesList/HeaderTip", - "type": "page" - }, { "path": "home/wishesList/index", "type": "page", @@ -258,13 +246,12 @@ "navigationBarTitleText": "我的志愿表" } }, - { - "path": "home/wishesList/ScrollListItem", - "type": "page" - }, { "path": "home/wishesList/wishesList", - "type": "page" + "type": "page", + "style": { + "navigationBarTitleText": "当前志愿表" + } } ] }, diff --git a/src/store/user.ts b/src/store/user.ts index f4a0bd1..f21efaf 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -118,9 +118,9 @@ export const useUserStore = defineStore( userInfo.value.batchName = val } - const setWishListMajor = ({ val, unId }: { val: any; unId: string }) => { + const setWishListMajor = ({ val, uId }: { val: any; uId: string }) => { try { - const targetItem = userInfo.value.wishList.find((item) => item.unId === unId) + const targetItem = userInfo.value.wishList.find((item) => item.uId === uId) if (!targetItem) { console.error('未找到对应的志愿清单项') return @@ -129,7 +129,7 @@ export const useUserStore = defineStore( userInfo.value = { ...userInfo.value, wishList: userInfo.value.wishList.map((item) => { - if (item.unId === unId) { + if (item.uId === uId) { return { ...item, vItems: [...item.vItems, { ...val, sort: item.vItems.length + 1 }], @@ -143,10 +143,10 @@ export const useUserStore = defineStore( } } - const deleteWishListMajor = ({ unId, _pId }: { unId: string; _pId: string }) => { + const deleteWishListMajor = ({ uId, planId }: { uId: string; planId: string }) => { userInfo.value.wishList = userInfo.value.wishList.map((item) => { - if (item.unId === unId) { - item.vItems = item.vItems.filter((vItem) => vItem._pId !== _pId) + if (item.uId === uId) { + item.vItems = item.vItems.filter((vItem) => vItem.planId !== planId) return item } return item diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts index faa0af3..b5763b3 100644 --- a/src/types/uni-pages.d.ts +++ b/src/types/uni-pages.d.ts @@ -27,11 +27,7 @@ interface NavigateToOptions { "/pages-sub/home/news/index" | "/pages-sub/home/news/newsList" | "/pages-sub/home/schoolRank/index" | - "/pages-sub/home/wishesList/CollegeMajor" | - "/pages-sub/home/wishesList/DataTable" | - "/pages-sub/home/wishesList/HeaderTip" | "/pages-sub/home/wishesList/index" | - "/pages-sub/home/wishesList/ScrollListItem" | "/pages-sub/home/wishesList/wishesList" | "/login-sub/index" | "/pages-evaluation-sub/index" |