From 2b671bdf787047a4d0f6be6607d4c8914ef969c7 Mon Sep 17 00:00:00 2001 From: huertian Date: Tue, 7 Jan 2025 13:55:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=B9=B6=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修正页面导航栏状态更新逻辑 --- components.d.ts | 1 + src/components/TabBar.vue | 3 ++- src/composables/useConfig.ts | 2 +- src/pages/index/index.vue | 11 ++++++----- src/pages/lesson/index.vue | 2 +- src/pages/progress/index.vue | 12 ++++++++++++ 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/components.d.ts b/components.d.ts index 70efff9..2f47f5b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,6 +19,7 @@ declare module 'vue' { WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default'] WdDropMenu: typeof import('wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue')['default'] WdDropMenuItem: typeof import('wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue')['default'] + WdFab: typeof import('wot-design-uni/components/wd-fab/wd-fab.vue')['default'] WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default'] WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default'] WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default'] diff --git a/src/components/TabBar.vue b/src/components/TabBar.vue index 667b43a..9c8501e 100644 --- a/src/components/TabBar.vue +++ b/src/components/TabBar.vue @@ -36,7 +36,8 @@ const nameLabelIconMap = { progress: { title: '进度管理', icon: 'transfer', - roles: ['teacher', 'admin', 'sysadmin'] as const // 校方教师、公司课程顾问、公司系统管理员 + roles: ['teacher', 'sysadmin'] as const // 校方教师、公司课程顾问、公司系统管理员 + // roles: ['teacher', 'admin', 'sysadmin'] as const // 校方教师、公司课程顾问、公司系统管理员 }, my: { title: '我的', diff --git a/src/composables/useConfig.ts b/src/composables/useConfig.ts index b7b0a46..aacb75d 100644 --- a/src/composables/useConfig.ts +++ b/src/composables/useConfig.ts @@ -5,7 +5,7 @@ export const useConfig = defineStore('config', () => { // const BASE_URL = ref("https://ppmp.fenshenzhike.com/api"); // const BASE_URL = ref("http://localhost:1218/api"); const BASE_URL = ref("http://192.168.0.119:1218/api"); - // const BASE_URL = ref("http://192.30.5.20:1218/api"); + // const BASE_URL = ref("http://192.30.5.14:1218/api"); return { BASE_URL diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index d8ac783..14dfdc1 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -11,6 +11,7 @@ import { useToast } from 'wot-design-uni'; import type { DropMenuItemBeforeToggle } from 'wot-design-uni/components/wd-drop-menu-item/types'; import WdTag from 'wot-design-uni/components/wd-tag/wd-tag.vue'; + const toast = useToast() const router = useRouter() const value = ref(0) @@ -192,7 +193,6 @@ onPullDownRefresh(() => { onLoad(() => { loadLessons() }) -