mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-22 13:05:18 +00:00
refactor(页面): 移除多个页面中的导航栏和返回逻辑
feat(轮播图): 更新轮播图图片资源并简化点击事件 style(主题): 简化导航栏颜色设置逻辑 chore(配置): 更新开发环境API基础URL配置 chore(数据库): 删除mysql配置文件 docs(组件): 更新组件类型声明文件
This commit is contained in:
@@ -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",
|
||||
});
|
||||
};
|
||||
|
||||
// 设置主题色
|
||||
|
||||
Reference in New Issue
Block a user