mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
refactor(页面): 移除多个页面中的导航栏和返回逻辑
feat(轮播图): 更新轮播图图片资源并简化点击事件 style(主题): 简化导航栏颜色设置逻辑 chore(配置): 更新开发环境API基础URL配置 chore(数据库): 删除mysql配置文件 docs(组件): 更新组件类型声明文件
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import os
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from typing import Any, ClassVar, Dict, List, Optional, Union, Literal
|
||||
from pydantic import MongoDsn, PostgresDsn, RedisDsn, MySQLDsn
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from uvicorn.config import LifespanType
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#
|
||||
# The MySQL Server configuration file.
|
||||
#
|
||||
# For explanations see
|
||||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||
|
||||
[mysqld]
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
datadir = /var/lib/mysql
|
||||
# log-error = /var/log/mysql/error.log
|
||||
# By default we only accept connections from localhost
|
||||
#bind-address = 127.0.0.1
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
max_connections=1000
|
||||
@@ -7,8 +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_API_BASE_URL=http://localhost:8001
|
||||
|
||||
# 代理前缀
|
||||
VITE_APP_BASE_API=/api/v1
|
||||
|
||||
Vendored
+4
@@ -17,6 +17,8 @@ declare module 'vue' {
|
||||
QiunDataCharts: typeof import('./src/components/qiun-data-charts/qiun-data-charts.vue')['default']
|
||||
QiunError: typeof import('./src/components/qiun-error/qiun-error.vue')['default']
|
||||
QiunLoading: typeof import('./src/components/qiun-loading/qiun-loading.vue')['default']
|
||||
WdActionSheet: typeof import('wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue')['default']
|
||||
WdAvatar: typeof import('wot-design-uni/components/wd-avatar/wd-avatar.vue')['default']
|
||||
WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default']
|
||||
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
|
||||
WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
|
||||
@@ -27,6 +29,7 @@ declare module 'vue' {
|
||||
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']
|
||||
WdField: typeof import('wot-design-uni/components/wd-field/wd-field.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']
|
||||
@@ -43,6 +46,7 @@ declare module 'vue' {
|
||||
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']
|
||||
WdResult: typeof import('wot-design-uni/components/wd-result/wd-result.vue')['default']
|
||||
WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default']
|
||||
WdSwitch: typeof import('wot-design-uni/components/wd-switch/wd-switch.vue')['default']
|
||||
WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
<template>
|
||||
<view style="width: 100%; height: var(--status-bar-height)" />
|
||||
<view class="app-container">
|
||||
<wd-swiper
|
||||
v-model:current="current"
|
||||
:list="swiperList"
|
||||
autoplay
|
||||
@click="handleClick"
|
||||
@change="onChange"
|
||||
/>
|
||||
<wd-swiper v-model:current="current" :list="swiperList" autoplay />
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<wd-grid clickable :column="4" class="mt-2">
|
||||
@@ -141,7 +135,11 @@ const chartOpts = ref({
|
||||
// 日期范围
|
||||
const recentDaysRange = ref(7);
|
||||
|
||||
const swiperList = ref(["/static/images/banner.png"]);
|
||||
const swiperList = ref([
|
||||
"/static/images/banner02.jpg",
|
||||
"/static/images/banner03.jpg",
|
||||
"/static/images/banner01.png",
|
||||
]);
|
||||
|
||||
// 快捷导航列表
|
||||
const navList = reactive([
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container dark:text-[var(--wot-dark-color)]">
|
||||
<wd-navbar
|
||||
title="关于我们"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<view class="about-header">
|
||||
<wd-img
|
||||
@@ -90,11 +82,6 @@ onMounted(() => {
|
||||
version.value = uni.getSystemInfoSync().appVersion;
|
||||
// #endif
|
||||
});
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
</script>
|
||||
|
||||
<route lang="json">
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<view class="faq-container">
|
||||
<wd-navbar title="常见问题" left-arrow placeholder safe-area-inset-top @click-left="handleBack" />
|
||||
|
||||
<scroll-view class="content-scroll" scroll-y :scroll-top="scrollTop" @scroll="handleScroll">
|
||||
<view class="content-wrapper">
|
||||
<!-- 技术支持卡片 -->
|
||||
@@ -192,11 +190,6 @@ const guideSteps = ref([
|
||||
},
|
||||
]);
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
const handleScroll = (e: any) => {
|
||||
scrollTop.value = e.detail.scrollTop;
|
||||
};
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="意见反馈" left-text="返回" left-arrow placeholder safe-area-inset-top right-text="首页"
|
||||
@click-left="handleBack" @click-right="handleClickRight" />
|
||||
|
||||
<wd-text size="small">选填,最多上传3张图片</wd-text>
|
||||
<wd-form ref="formRef" :model="formData" :rules="rules" errorType="toast">
|
||||
<!-- 问题类型选择 -->
|
||||
@@ -154,18 +151,6 @@ const handleSubmit = async () => {
|
||||
console.log("表单验证失败", error);
|
||||
}
|
||||
};
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 首页
|
||||
const handleClickRight = () => {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<route lang="json">
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar title="完善个人信息" left-arrow @click-left="handleBack" />
|
||||
|
||||
<!-- 头部标题 -->
|
||||
<view class="header">
|
||||
<view class="title">完善个人信息</view>
|
||||
@@ -333,11 +331,6 @@ const handleSkip = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 返回
|
||||
function handleBack() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar
|
||||
title="个人信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<wd-card v-if="userProfile" custom-style="margin-top: 20rpx">
|
||||
<wd-cell-group border>
|
||||
<wd-cell class="avatar-cell" title="头像" center is-link>
|
||||
@@ -218,10 +210,6 @@ function touchstartListener(event: TouchEvent) {
|
||||
function touchmoveListener(event: TouchEvent) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function handleBack() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.avatar-cell {
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar
|
||||
title="账号和安全"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<wd-cell-group border>
|
||||
<wd-cell
|
||||
@@ -116,11 +108,6 @@ const passwordChangeForm = reactive<PasswordChangeForm>({
|
||||
});
|
||||
const passwordChangeFormRef = ref();
|
||||
|
||||
// 处理返回按钮点击
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
/** 加载用户信息 */
|
||||
const loadUserProfile = async () => {
|
||||
userProfile.value = await UserAPI.getCurrentUserInfo();
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar
|
||||
title="用户协议"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<view class="flex-col-center py-4">
|
||||
<text class="text-xl font-bold mb-2">用户协议</text>
|
||||
@@ -70,11 +62,6 @@ const agreementContent = [
|
||||
},
|
||||
];
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 同意协议
|
||||
const handleAgree = () => {
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container dark:text-[var(--wot-dark-color)]">
|
||||
<wd-navbar
|
||||
title="网络测试"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
|
||||
<!-- 网络状态展示 -->
|
||||
<wd-card custom-style="margin: 20rpx">
|
||||
<wd-cell-group border>
|
||||
@@ -188,11 +180,6 @@ const startTest = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
// 生命周期钩子
|
||||
onMounted(() => {
|
||||
getNetworkType();
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<wd-navbar
|
||||
title="隐私政策"
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
@click-left="handleBack"
|
||||
/>
|
||||
<wd-card custom-style="margin-top: 20rpx">
|
||||
<view class="flex-col-center py-4">
|
||||
<text class="text-xl font-bold mb-2">隐私政策</text>
|
||||
@@ -84,11 +77,6 @@ const handleAgree = () => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
};
|
||||
|
||||
// 返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
</script>
|
||||
<route lang="json">
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 243 KiB After Width: | Height: | Size: 243 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -54,16 +54,11 @@ export const useThemeStore = defineStore("appTheme", () => {
|
||||
|
||||
// 设置导航栏颜色
|
||||
const setNavigationBarColor = () => {
|
||||
// 只在非H5环境下调用setNavigationBarColor
|
||||
if (process.env.UNI_PLATFORM !== "h5") {
|
||||
console.log("设置导航栏颜色", theme.value);
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: theme.value === "light" ? "#000000" : "#ffffff",
|
||||
backgroundColor: theme.value === "light" ? "#ffffff" : "#000000",
|
||||
});
|
||||
} else {
|
||||
console.log("H5环境下跳过设置导航栏颜色");
|
||||
}
|
||||
console.log("设置导航栏颜色", theme.value);
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: theme.value === "light" ? "#000000" : "#ffffff",
|
||||
backgroundColor: theme.value === "light" ? "#ffffff" : "#000000",
|
||||
});
|
||||
};
|
||||
|
||||
// 设置主题色
|
||||
|
||||
@@ -6,7 +6,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user