diff --git a/fastapp/.env.development b/fastapp/.env.development index 48bce05a..cbd0cc9f 100644 --- a/fastapp/.env.development +++ b/fastapp/.env.development @@ -7,7 +7,7 @@ VITE_APP_ENV=development VITE_APP_TITLE=fastapiadmin # 网络请求公用地址 -VITE_API_BASE_URL=http://localhost:8001 +VITE_API_BASE_URL=https://service.fastapiadmin.com # 代理前缀 VITE_APP_BASE_API=/api/v1 diff --git a/fastapp/.eslintrc-auto-import.json b/fastapp/.eslintrc-auto-import.json index 3e525d14..662da57f 100644 --- a/fastapp/.eslintrc-auto-import.json +++ b/fastapp/.eslintrc-auto-import.json @@ -93,68 +93,6 @@ "watchSyncEffect": true, "DirectiveBinding": true, "MaybeRef": true, - "MaybeRefOrGetter": true, - "CommonUtil": true, - "Storage": true, - "acceptHMRUpdate": true, - "applyThemeOnPageShow": true, - "applyThemeToMiniProgram": true, - "auth": true, - "checkLogin": true, - "clearAll": true, - "clearToken": true, - "clearTokens": true, - "clearUserInfo": true, - "createPinia": true, - "createRouter": true, - "debounce": true, - "defineStore": true, - "dept": true, - "dict": true, - "file": true, - "getAccessToken": true, - "getActivePinia": true, - "getDarkerColor": true, - "getLighterColor": true, - "getRefreshToken": true, - "getToken": true, - "getUserInfo": true, - "isLoggedIn": true, - "log": true, - "mapActions": true, - "mapGetters": true, - "mapState": true, - "mapStores": true, - "mapWritableState": true, - "menu": true, - "notice": true, - "request": true, - "requireLogin": true, - "role": true, - "setAccessToken": true, - "setActivePinia": true, - "setMapStoreSuffix": true, - "setRefreshToken": true, - "setToken": true, - "setUserInfo": true, - "setupStore": true, - "store": true, - "storeToRefs": true, - "useDictStore": true, - "useMessage": true, - "useNotify": true, - "useRoute": true, - "useRouter": true, - "useThemeStore": true, - "useToast": true, - "useUserStore": true, - "user": true, - "config": true, - "extendedColorOptions": true, - "themeColorOptions": true, - "useStomp": true, - "useTabbar": true, - "useTheme": true, - "useWechat": true + "MaybeRefOrGetter": true } } diff --git a/fastapp/.stylelintrc.json b/fastapp/.stylelintrc.json index dc2cf332..856b1abd 100644 --- a/fastapp/.stylelintrc.json +++ b/fastapp/.stylelintrc.json @@ -1,5 +1,11 @@ { - "extends": ["stylelint-config-recommended", "stylelint-config-recommended-scss", "stylelint-config-recommended-vue/scss", "stylelint-config-html/vue", "stylelint-config-recess-order"], + "extends": [ + "stylelint-config-recommended", + "stylelint-config-recommended-scss", + "stylelint-config-recommended-vue/scss", + "stylelint-config-html/vue", + "stylelint-config-recess-order" + ], "plugins": ["stylelint-prettier"], "overrides": [ { diff --git a/fastapp/components.d.ts b/fastapp/components.d.ts index fd8faa43..ccaf2917 100644 --- a/fastapp/components.d.ts +++ b/fastapp/components.d.ts @@ -23,8 +23,6 @@ declare module 'vue' { WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default'] WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default'] WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default'] - WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default'] - WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default'] WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default'] WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default'] WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default'] @@ -32,15 +30,12 @@ declare module 'vue' { WdGridItem: typeof import('wot-design-uni/components/wd-grid-item/wd-grid-item.vue')['default'] WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default'] WdImg: typeof import('wot-design-uni/components/wd-img/wd-img.vue')['default'] - WdImgCropper: typeof import('wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue')['default'] WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default'] WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default'] WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default'] - WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default'] WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default'] WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default'] WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default'] - WdProgress: typeof import('wot-design-uni/components/wd-progress/wd-progress.vue')['default'] WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default'] WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default'] WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default'] @@ -49,8 +44,6 @@ declare module 'vue' { WdTabbarItem: typeof import('wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue')['default'] WdTag: typeof import('wot-design-uni/components/wd-tag/wd-tag.vue')['default'] WdText: typeof import('wot-design-uni/components/wd-text/wd-text.vue')['default'] - WdTextarea: typeof import('wot-design-uni/components/wd-textarea/wd-textarea.vue')['default'] WdToast: typeof import('wot-design-uni/components/wd-toast/wd-toast.vue')['default'] - WdUpload: typeof import('wot-design-uni/components/wd-upload/wd-upload.vue')['default'] } } diff --git a/fastapp/eslint.config.mjs b/fastapp/eslint.config.mjs index 0a1400bf..1bd36600 100644 --- a/fastapp/eslint.config.mjs +++ b/fastapp/eslint.config.mjs @@ -29,10 +29,6 @@ export default [ "**/u-charts/**", "**/qiun-**/**", "**/auto-imports.d.ts", - // unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用 - "src/types/auto-imports.d.ts", - // vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore - "uni-pages.d.ts", ], }, // 检查文件的配置 @@ -47,15 +43,13 @@ export default [ ...{ uni: "readonly", // uni-app 全局对象 UniApp: "readonly", // uni-app 全局对象 - PageResult: "readonly", // 分页结果数据类型 - PageQuery: "readonly", // 分页查询数据类型 - OptionType: "readonly", // 选项类型 getCurrentPages: "readonly", // uni-app 全局 API ApiResponse: "readonly", // 统一响应数据类型 + PageQuery: "readonly", // 分页查询数据类型 + PageResult: "readonly", // 分页结果数据类型 + OptionType: "readonly", // 选项类型 creatorType: "readonly", // 创建人类型 UploadFileResult: "readonly", // 上传文件返回类型 - Todo: "readonly", // 待办事项 - TodoState: "readonly", // 待办事项状态 plus: true, // HTML5+ 运行时环境 }, }, diff --git a/fastapp/pages.config.ts b/fastapp/pages.config.ts new file mode 100644 index 00000000..9ddc96c9 --- /dev/null +++ b/fastapp/pages.config.ts @@ -0,0 +1,42 @@ +// pages.config.ts +import { defineUniPages } from "@uni-helper/vite-plugin-uni-pages"; + +export default defineUniPages({ + // 你也可以定义 pages 字段,它具有最高的优先级。 + pages: [], + globalStyle: { + navigationBarBackgroundColor: "@navBgColor", + navigationBarTextStyle: "@navTxtStyle", + navigationBarTitleText: "FastApp", + backgroundColor: "@bgColor", + backgroundTextStyle: "@bgTxtStyle", + backgroundColorTop: "@bgColorTop", + backgroundColorBottom: "@bgColorBottom", + enablePullDownRefresh: false, + onReachBottomDistance: 50, + animationType: "pop-in", + animationDuration: 300, + }, + + tabBar: { + custom: true, + customize: true, + overlay: true, + height: "0", + color: "@tabColor", + selectedColor: "@tabSelectedColor", + backgroundColor: "@tabBgColor", + borderStyle: "@tabBorderStyle", + list: [ + { + pagePath: "pages/index/index", + }, + { + pagePath: "pages/work/index", + }, + { + pagePath: "pages/mine/index", + }, + ], + }, +}); diff --git a/fastapp/public/logo.png b/fastapp/public/logo.png deleted file mode 100644 index 81834963..00000000 Binary files a/fastapp/public/logo.png and /dev/null differ diff --git a/fastapp/src/composables/useTheme.ts b/fastapp/src/composables/useTheme.ts deleted file mode 100644 index f341676b..00000000 --- a/fastapp/src/composables/useTheme.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { useThemeStore, ThemeMode, ThemeColorOption } from "@/store"; - -export function useTheme() { - const store = useThemeStore(); - - /** - * 切换暗黑模式 - * @param mode 指定主题模式,不传则自动切换 - */ - function toggleTheme(mode?: ThemeMode) { - store.toggleTheme(mode); - } - - /** - * 设置主题色 - * @param option 主题色选项 - */ - function setThemeColor(option: ThemeColorOption) { - store.setCurrentThemeColor(option); - } - - /** - * 初始化主题 - */ - function initTheme() { - store.initTheme(); - } - - // 注意:全局主题管理已在App.vue中处理 - // 包括:系统主题监听、导航栏颜色同步等 - // 组件中一般不需要再调用initTheme(),除非有特殊需求 - - return { - // 状态 - theme: computed(() => store.theme), - isDark: computed(() => store.isDark), - currentThemeColor: computed(() => store.currentThemeColor), - themeVars: computed(() => store.themeVars), - - // 主题选项 - themeColorOptions: computed(() => store.themeColorOptions), - - // 方法 - initTheme, - toggleTheme, - setThemeColor, - }; -} diff --git a/fastapp/src/layouts/default.vue b/fastapp/src/layouts/default.vue index cb7e2d36..a370f566 100644 --- a/fastapp/src/layouts/default.vue +++ b/fastapp/src/layouts/default.vue @@ -1,7 +1,16 @@ - + +{ + "name": "login", + "style": { + "navigationBarTitleText": "登录" + } +} +