wip: 临时提交

This commit is contained in:
Ray.Hao
2025-07-24 20:43:15 +08:00
parent 8bda7dd0b1
commit 7fa0758b19
7 changed files with 442 additions and 12 deletions

View File

@@ -26,14 +26,13 @@
<script setup lang="ts">
const router = useRouter();
const route = useRoute();
const { themeVars, theme } = useTheme();
const { activeTabbar, getTabbarItemValue, setTabbarItemActive, tabbarList } = useTabbar();
function handleTabbarChange({ value }: { value: string }) {
console.log("tabbarChange", value);
setTabbarItemActive(value);
router.pushTab({ name: value });
}

View File

@@ -1,4 +1,3 @@
import { createRouter } from "uni-mini-router";
import { pages, subPackages } from "virtual:uni-pages";
import { isLoggedIn } from "@/utils/auth";
// 生成路由配置
@@ -29,6 +28,7 @@ const router = createRouter({
// 全局前置守卫
router.beforeEach((to, from, next) => {
console.log("路由跳转:", to.path);
// 检查页面是否需要登录
if (to.meta && to.meta.requireAuth) {
if (!isLoggedIn) {

View File

@@ -158,8 +158,8 @@ declare global {
const usePrevRoute: typeof import('@uni-helper/uni-use')['usePrevRoute']
const useProvider: typeof import('@uni-helper/uni-use')['useProvider']
const useRequest: typeof import('@uni-helper/uni-use')['useRequest']
const useRoute: typeof import('../composables/useCommon')['useRoute']
const useRouter: typeof import('../composables/useCommon')['useRouter']
const useRoute: typeof import('uni-mini-router')['useRoute']
const useRouter: typeof import('uni-mini-router')['useRouter']
const useScanCode: typeof import('@uni-helper/uni-use')['useScanCode']
const useScreenBrightness: typeof import('@uni-helper/uni-use')['useScreenBrightness']
const useSelectorQuery: typeof import('@uni-helper/uni-use')['useSelectorQuery']
@@ -173,7 +173,7 @@ declare global {
const useTemplateRef: typeof import('vue')['useTemplateRef']
const useTheme: typeof import('../composables/useTheme')['useTheme']
const useThemeStore: typeof import('../store/modules/theme.store')['useThemeStore']
const useToast: typeof import('../composables/useCommon')['useToast']
const useToast: typeof import('wot-design-uni')['useToast']
const useUploadFile: typeof import('@uni-helper/uni-use')['useUploadFile']
const useUserStore: typeof import('../store/modules/user.store')['useUserStore']
const useVisible: typeof import('@uni-helper/uni-use')['useVisible']
@@ -310,15 +310,15 @@ declare module 'vue' {
readonly useMessage: UnwrapRef<typeof import('wot-design-uni')['useMessage']>
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
readonly useNotify: UnwrapRef<typeof import('wot-design-uni')['useNotify']>
readonly useRoute: UnwrapRef<typeof import('../composables/useCommon')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('../composables/useCommon')['useRouter']>
readonly useRoute: UnwrapRef<typeof import('uni-mini-router')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('uni-mini-router')['useRouter']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly useStomp: UnwrapRef<typeof import('../composables/useStomp')['useStomp']>
readonly useTabbar: UnwrapRef<typeof import('../composables/useTabbar')['useTabbar']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly useTheme: UnwrapRef<typeof import('../composables/useTheme')['useTheme']>
readonly useThemeStore: UnwrapRef<typeof import('../store/modules/theme.store')['useThemeStore']>
readonly useToast: UnwrapRef<typeof import('../composables/useCommon')['useToast']>
readonly useToast: UnwrapRef<typeof import('wot-design-uni')['useToast']>
readonly useUserStore: UnwrapRef<typeof import('../store/modules/user.store')['useUserStore']>
readonly useWechat: UnwrapRef<typeof import('../composables/useWechat')['useWechat']>
readonly user: UnwrapRef<typeof import('../api/user')['default']>