Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastapp/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
64 changes: 1 addition & 63 deletions fastapp/.eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
8 changes: 7 additions & 1 deletion fastapp/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down
7 changes: 0 additions & 7 deletions fastapp/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,19 @@ 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']
WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default']
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']
Expand All @@ -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']
}
}
12 changes: 3 additions & 9 deletions fastapp/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
},
// 检查文件的配置
Expand All @@ -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+ 运行时环境
},
},
Expand Down
42 changes: 42 additions & 0 deletions fastapp/pages.config.ts
Original file line number Diff line number Diff line change
@@ -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",
},
],
},
});
Binary file removed fastapp/public/logo.png
Binary file not shown.
48 changes: 0 additions & 48 deletions fastapp/src/composables/useTheme.ts

This file was deleted.

13 changes: 11 additions & 2 deletions fastapp/src/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
<script lang="ts" setup>
import { useTheme } from "@/composables/useTheme";
import { onLoad } from "@dcloudio/uni-app";
import { useThemeStore } from "@/store/modules/theme.store";

const { theme, themeVars } = useTheme();
const useTheme = useThemeStore();

let theme = useTheme.theme;
let themeVars = useTheme.themeVars;

onLoad(() => {
theme = useTheme.theme;
themeVars = useTheme.themeVars;
});
</script>

<script lang="ts">
Expand Down
7 changes: 5 additions & 2 deletions fastapp/src/layouts/tabbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@

<script setup lang="ts">
import { useRouter, useRoute } from "uni-mini-router";
import { useTheme } from "@/composables/useTheme";
import { useTabbar } from "@/composables/useTabbar";
import { useThemeStore } from "@/store/modules/theme.store";

const useTheme = useThemeStore();

const router = useRouter();
const route = useRoute();
const { themeVars, theme } = useTheme();
let theme = useTheme.theme;
let themeVars = useTheme.themeVars;
const { activeTabbar, getTabbarItemValue, setTabbarItemActive, tabbarList } = useTabbar();

function handleTabbarChange({ value }: { value: string }) {
Expand Down
35 changes: 19 additions & 16 deletions fastapp/src/pages.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"easycom": {
"autoscan": true,
"custom": {
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue",
"^cu-(.*)": "@/components/cu-$1/index.vue"
}
},

"pages": [
{
"path": "pages/index/index",
Expand All @@ -19,7 +11,11 @@
},
{
"path": "pages/login/index",
"type": "page"
"type": "page",
"name": "login",
"style": {
"navigationBarTitleText": "登录"
}
},
{
"path": "pages/mine/index",
Expand Down Expand Up @@ -127,20 +123,27 @@
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "@navBgColor",
"navigationBarTextStyle": "@navTxtStyle",
"navigationBarTitleText": "FastApp",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
"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": "#474747",
"selectedColor": "#3B8DFF",
"backgroundColor": "#F8F8F8",
"borderStyle": "black",
"color": "@tabColor",
"selectedColor": "@tabSelectedColor",
"backgroundColor": "@tabBgColor",
"borderStyle": "@tabBorderStyle",
"list": [
{
"pagePath": "pages/index/index"
Expand Down
17 changes: 3 additions & 14 deletions fastapp/src/pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</wd-grid-item>
</wd-grid>

<wd-card>
<wd-card type="rectangle">
<template #title>
<view class="flex-between">
<view>访问趋势</view>
Expand All @@ -76,7 +76,7 @@
</view>
</template>

<view class="w-full h-360px mb-40rpx">
<view class="h-330px mb-2rpx">
<qiun-data-charts type="area" :chartData="chartData" :opts="chartOpts" />
</view>
</wd-card>
Expand Down Expand Up @@ -135,11 +135,7 @@ const chartOpts = ref({
// 日期范围
const recentDaysRange = ref(7);

const swiperList = ref([
"/static/images/banner02.jpg",
"/static/images/banner03.jpg",
"/static/images/banner01.png",
]);
const swiperList = ref(["/static/images/banner01.jpg", "/static/images/banner02.jpg"]);

// 快捷导航列表
const navList = reactive([
Expand Down Expand Up @@ -194,13 +190,6 @@ const generateStaticTrendData = (days: number) => {
};
};

function handleClick(e: any) {
console.log(e);
}
function onChange(e: any) {
console.log(e);
}

// 加载访问统计数据(使用静态数据)
const loadVisitStatsData = async () => {
// 模拟异步加载
Expand Down
Loading