fix: 全面修复 22 项问题
严重 Bug: - NaN 金额校验绕过(add 页面 parseFloat 空字符串) - 4 个页面补充 waitForReady(add/budget/category-manage/group-manage) - 导出 Loading 遮罩不消失(profile exportData 缺 hideLoading) - Store 吞掉请求错误不 re-throw(transaction/stats/budget/user) - 分类排序 SQL 拼接改参数化查询(category PUT /sort) - 备份接口添加管理员权限检查(backup requireAdmin) 中等问题: - 群组加入竞态条件改为 INSERT IGNORE - 统计页切月/切Tab添加 loadSeq 防竞态 - stats store 补全 loading 状态 + Overview 初始值补全 7 字段 - 保存成功后返回不再弹「放弃修改」确认框 - 群组管理创建/加入添加 saving 双重提交保护 - 预算页添加 onShow 刷新 - 服务端输入校验(name/color/invite_code/微信code) UI/样式: - 触摸目标: bell/nav-back/nav-save→88rpx, avatar-badge→64rpx, action-btn→80rpx - :active 反馈: bell/profile-card/identity-card/id-manage/arrow/action-btn/group-btn/cat-info - 内联样式改动态绑定(4处 spacer 使用 capsuleRight) - FAB 文字+改用 Icon 组件 - prefers-reduced-motion 动画降级(Skeleton/profile/budget/add) - 胶囊适配(add/category-manage/group-manage) - CategoryIcon !important 改为 iconStyle 计算属性 文档: - CLAUDE.md 补充 SaveSuccess/ChartWrapper 组件 + category/budget/index API
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<Icon name="arrowLeft" :size="40" color="#2D1B1B" />
|
||||
</view>
|
||||
<text class="nav-title">一起记</text>
|
||||
<view style="width: 72rpx;"></view>
|
||||
<view :style="{ width: capsuleRight + 72 + 'px' }"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -77,15 +77,18 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useGroupStore } from '@/stores/group'
|
||||
import { statusBarHeight } from '@/utils/system'
|
||||
import { waitForReady } from '@/utils/app-ready'
|
||||
import { statusBarHeight, capsuleRight } from '@/utils/system'
|
||||
import Icon from '@/components/Icon/Icon.vue'
|
||||
|
||||
const groupStore = useGroupStore()
|
||||
|
||||
const newGroupName = ref('')
|
||||
const inviteCode = ref('')
|
||||
const saving = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
await waitForReady()
|
||||
groupStore.fetchGroups()
|
||||
})
|
||||
|
||||
@@ -101,11 +104,13 @@ function copyInviteCode(code: string) {
|
||||
}
|
||||
|
||||
async function handleCreate() {
|
||||
if (saving.value) return
|
||||
const name = newGroupName.value.trim()
|
||||
if (!name) {
|
||||
uni.showToast({ title: '请输入群组名称', icon: 'none' })
|
||||
return
|
||||
}
|
||||
saving.value = true
|
||||
try {
|
||||
const result = await groupStore.createGroup(name)
|
||||
newGroupName.value = ''
|
||||
@@ -121,21 +126,27 @@ async function handleCreate() {
|
||||
})
|
||||
} catch (e: any) {
|
||||
uni.showToast({ title: e.message || '创建失败', icon: 'none' })
|
||||
} finally {
|
||||
saving.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function handleJoin() {
|
||||
if (saving.value) return
|
||||
const code = inviteCode.value.trim().toUpperCase()
|
||||
if (!code) {
|
||||
uni.showToast({ title: '请输入邀请码', icon: 'none' })
|
||||
return
|
||||
}
|
||||
saving.value = true
|
||||
try {
|
||||
const result = await groupStore.joinGroup(code)
|
||||
inviteCode.value = ''
|
||||
uni.showToast({ title: `已加入「${result.name}」`, icon: 'success' })
|
||||
} catch (e: any) {
|
||||
uni.showToast({ title: e.message || '加入失败', icon: 'none' })
|
||||
} finally {
|
||||
saving.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,11 +208,13 @@ function handleDissolve(group: any) {
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&:active { opacity: 0.6; }
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
@@ -336,6 +349,8 @@ function handleDissolve(group: any) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 8rpx;
|
||||
padding: 8rpx 0;
|
||||
min-height: 48rpx;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
@@ -363,11 +378,17 @@ function handleDissolve(group: any) {
|
||||
}
|
||||
|
||||
.group-btn {
|
||||
padding: 12rpx 24rpx;
|
||||
padding: 16rpx 28rpx;
|
||||
border-radius: 16rpx;
|
||||
min-height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&.leave { background: #FFF0E6; }
|
||||
&.dissolve { background: #FFE8E8; }
|
||||
|
||||
&:active { opacity: 0.7; }
|
||||
}
|
||||
|
||||
.group-btn-text {
|
||||
|
||||
Reference in New Issue
Block a user