更新密码找回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

+1 -21
View File
@@ -1,6 +1,5 @@
<template>
<view class="page">
<!-- 本周概览 -->
<view class="hero-card">
<view class="hero-left">
<text class="hero-sub">查看每周日程提醒</text>
@@ -14,7 +13,6 @@
</view>
</view>
<!-- 月历(可下拉展开) -->
<view class="cal-card">
<view class="cal-header">
<view class="cal-nav" @tap="switchMonth(-1)">
@@ -30,7 +28,6 @@
</view>
</view>
<!-- 周历条 -->
<view class="week-strip">
<view
v-for="d in weekDays"
@@ -47,7 +44,6 @@
</view>
</view>
<!-- 月历展开 -->
<view v-if="monthOpen" class="month-grid">
<text v-for="n in WEEK_LABELS" :key="'w' + n" class="month-weekname">周{{ n }}</text>
<view
@@ -63,7 +59,6 @@
</view>
</view>
<!-- 我的日程 -->
<view class="section-head">
<text class="section-title">我的日程({{ shownItems.length }})</text>
<view class="range-tabs">
@@ -101,7 +96,6 @@
<view class="bottom-space" />
<!-- 新增按钮 -->
<view class="fab" @tap="openCreate">
<FaIcon name="plus" color="#ffffff" :size="20" />
<text class="fab-text">新增</text>
@@ -117,7 +111,6 @@ import { pad, startOfDay, isToday } from '@/utils/date.js'
import { isLoggedIn } from '@/utils/auth.js'
import { getGuestToken } from '@/utils/guest.js'
/** 周一为一周第一天 */
const WEEK_LABELS = ['一', '二', '三', '四', '五', '六', '日']
const schedules = ref([])
@@ -139,10 +132,9 @@ function startOfWeek(base = new Date()) {
const weekStart = computed(() => startOfWeek(selectedDate.value))
const selectedKey = computed(() => dateKey(selectedDate.value))
/* ---------- 月历(可下拉展开) ---------- */
const monthOpen = ref(false)
const viewYear = ref(new Date().getFullYear())
const viewMonth = ref(new Date().getMonth()) // 0-based
const viewMonth = ref(new Date().getMonth())
const monthLabel = computed(() => `${viewYear.value}年${viewMonth.value + 1}月`)
@@ -160,7 +152,6 @@ function switchMonth(step) {
viewMonth.value = m
}
/** 月历格子:从包含 1 号的那周周一起,固定 6 行 × 7 列 */
const monthCells = computed(() => {
const first = new Date(viewYear.value, viewMonth.value, 1)
const offset = (first.getDay() + 6) % 7
@@ -185,12 +176,10 @@ function pickMonthDay(cell) {
range.value = 'day'
}
/** 只保留已设置提醒渠道的日程 */
const reminders = computed(() =>
schedules.value.filter((item) => item.remindChannels && item.remindChannels.length > 0)
)
/** 提醒按日期聚合,key 为 YYYY-MM-DD */
const reminderMap = computed(() => {
const map = {}
reminders.value.forEach((item) => {
@@ -218,7 +207,6 @@ const weekDays = computed(() => {
})
})
/** 本周(周一~周日)的提醒,按时间升序 */
const weekItems = computed(() => {
const base = weekStart.value
const startTs = base.getTime()
@@ -283,7 +271,6 @@ function openCreate() {
}
onMounted(() => {
// 免登录页面:登录态或游客令牌均可用;两者皆无回门户触发授权/登录
if (!isLoggedIn() && !getGuestToken()) {
uni.reLaunch({ url: '/pages/nav/nav' })
return
@@ -291,7 +278,6 @@ onMounted(() => {
loadReminders()
})
// 新增/编辑返回后刷新列表
onShow(() => {
if (isLoggedIn() || getGuestToken()) loadReminders()
})
@@ -319,7 +305,6 @@ async function loadReminders() {
box-sizing: border-box;
}
/* ---------- 本周概览 ---------- */
.hero-card {
display: flex;
align-items: center;
@@ -371,7 +356,6 @@ async function loadReminders() {
justify-content: center;
}
/* ---------- 月历(可下拉展开) ---------- */
.cal-card {
margin-top: 20rpx;
padding: 12rpx 8rpx 16rpx;
@@ -425,7 +409,6 @@ async function loadReminders() {
color: $color-primary;
}
/* ---------- 周历条 ---------- */
.week-strip {
display: flex;
padding: 8rpx 8rpx 4rpx;
@@ -477,7 +460,6 @@ async function loadReminders() {
}
}
/* ---------- 月历网格 ---------- */
.month-grid {
display: flex;
flex-wrap: wrap;
@@ -533,7 +515,6 @@ async function loadReminders() {
opacity: 0.6;
}
/* ---------- 我的日程 ---------- */
.section-head {
display: flex;
align-items: center;
@@ -645,7 +626,6 @@ async function loadReminders() {
height: 60rpx;
}
/* ---------- 新增按钮 ---------- */
.fab {
position: fixed;
right: 32rpx;