更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-19
View File
@@ -1,6 +1,5 @@
<template>
<view class="page">
<!-- 吸顶搜索 -->
<view class="search-wrap" :style="headPad">
<view class="search-bar">
<FaIcon name="magnifying-glass" color="#8a94ad" :size="16" />
@@ -19,7 +18,6 @@
</view>
<view class="body">
<!-- 搜索结果:跨模块扁平列表 -->
<block v-if="keyword.trim()">
<view class="result-hint">
<text class="result-hint-text">找到 {{ searchResults.length }} 个结果</text>
@@ -47,7 +45,6 @@
</view>
</block>
<!-- 默认:按业务域分组浏览 -->
<block v-else>
<view v-if="groups.length === 0" class="empty-box">
<FaIcon name="cube" color="#c0c4cc" :size="32" />
@@ -118,22 +115,15 @@ const loading = ref(true)
const modules = ref([])
const menus = ref([])
/**
* 按「一级分类目录」归组,与子系统功能页(SubFunctions.vue)保持一致:
* 菜单层级形如 模块根 → 个人办公 → 通讯录,分组取一级目录名(个人办公 / 人事管理 …);
* 模块根仅作容器被跳过;无分类归属的顶层功能统一归入「常用功能」。
*/
const groups = computed(() => {
const byId = {}
menus.value.forEach((m) => {
byId[m.id] = m
})
// 只有叶子菜单才是可点功能;目录只作为分组标题,避免二级目录被当成卡片塞进组内
const leaves = menus.value
.filter((m) => m.leaf !== false)
.sort((a, b) => (a.sort || 0) - (b.sort || 0))
// 取该菜单所属的「一级分组」节点(自底向上找到链上最顶层节点)
function groupNodeOf(m) {
const chain = [m]
let cur = m
@@ -144,12 +134,9 @@ const groups = computed(() => {
}
const top = chain[0]
if (top.pid === 0) {
// 模块根在列表内:跳过根,取它下一层(个人办公 / 人事管理 …)
if (chain.length >= 2) return chain[1]
// 顶层节点自身:目录容器跳过,叶子归入「常用功能」
return top.leaf === false ? null : top
}
// 模块根不在列表内:链上顶层节点本身就是一级分组
return top
}
@@ -160,7 +147,6 @@ const groups = computed(() => {
const g = groupNodeOf(m)
if (!g) return
if (g.id === m.id) {
// 无分类归属的顶层散装功能
common.items.push(m)
return
}
@@ -178,7 +164,6 @@ const groups = computed(() => {
if (common.items.length) all.push(common)
all.push(...dirGroups)
// 组级「未开通」:整组菜单均被锁定;卡片浅底色与图标色按展开顺序统一编号轮换
let colorIndex = 0
return all.map((group) => {
const locked = group.items.length > 0 && group.items.every((it) => it.locked === true)
@@ -191,7 +176,6 @@ const groups = computed(() => {
})
})
/** 跨模块搜索:应用名 + 模块名 + 菜单标题 */
const searchResults = computed(() => {
const q = keyword.value.trim().toLowerCase()
if (!q) return []
@@ -322,9 +306,6 @@ onShow(() => {
color: $color-text-muted;
}
/* ============ 分组卡:白色卡片 + 一行 4 个功能宫格(图标在上、名称在下) ============
cell 占 25% 并自带右间隙,容器负 margin 抵消末列间隙,
避免使用 calc 除法——小程序端 wxss 对复杂 calc 支持不稳。 */
.group-card {
@include card;
padding: 24rpx 20rpx 8rpx;