feat: 系统配置 + 用户签名
- 新增 sys_config 表,存储应用版本号、标语、描述 - 关于小菜弹窗版本号改为从数据库动态获取 - 用户表新增 slogan 字段(个性签名) - 编辑资料页面支持修改签名 - 管理后台新增系统配置管理页面 - 更新 CLAUDE.md 文档
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="p-info">
|
||||
<text class="p-name">{{ userStore.nickname }}</text>
|
||||
<text class="p-tagline">记账小能手</text>
|
||||
<text class="p-tagline">{{ userStore.slogan }}</text>
|
||||
<text class="p-streak">累计 {{ txStore.total }} 笔记录</text>
|
||||
</view>
|
||||
<Icon name="chevronRight" :size="28" color="rgba(255,255,255,0.6)" />
|
||||
@@ -85,9 +85,9 @@
|
||||
<view class="modal-mask" v-if="showAbout" @tap="showAbout = false">
|
||||
<view class="modal" @tap.stop>
|
||||
<text class="about-title">小菜记账</text>
|
||||
<text class="about-version">v1.0.0</text>
|
||||
<text class="about-desc">温暖 x 轻松的个人记账小程序</text>
|
||||
<text class="about-desc">让记账从负担变成享受</text>
|
||||
<text class="about-version">v{{ appConfig.app_version || '1.0.0' }}</text>
|
||||
<text class="about-desc">{{ appConfig.app_slogan || '温暖 x 轻松的个人记账小程序' }}</text>
|
||||
<text class="about-desc">{{ appConfig.app_description || '让记账从负担变成享受' }}</text>
|
||||
<view class="modal-btns modal-btns-top">
|
||||
<view class="modal-btn confirm" @tap="showAbout = false">知道了</view>
|
||||
</view>
|
||||
@@ -143,6 +143,7 @@ import { useUserStore } from '@/stores/user'
|
||||
import { useGroupStore } from '@/stores/group'
|
||||
import { waitForReady } from '@/utils/app-ready'
|
||||
import { getTransactions } from '@/api/transaction'
|
||||
import { getConfig } from '@/api/config'
|
||||
import { formatAmount } from '@/utils/format'
|
||||
import { statusBarHeight } from '@/utils/system'
|
||||
import Icon from '@/components/Icon/Icon.vue'
|
||||
@@ -159,6 +160,7 @@ const loading = ref(true)
|
||||
const showAbout = ref(false)
|
||||
const showIdentity = ref(false)
|
||||
const initialLoaded = ref(false)
|
||||
const appConfig = ref<Record<string, string>>({})
|
||||
|
||||
onMounted(async () => {
|
||||
await waitForReady()
|
||||
@@ -169,7 +171,8 @@ onMounted(async () => {
|
||||
budgetStore.fetchBudget(),
|
||||
txStore.fetchTransactions({ page: 1, pageSize: 1 }),
|
||||
userStore.fetchUserInfo(),
|
||||
groupStore.fetchGroups()
|
||||
groupStore.fetchGroups(),
|
||||
getConfig().then(config => { appConfig.value = config }).catch(() => {})
|
||||
])
|
||||
} catch (e) {
|
||||
console.error('Profile load error:', e)
|
||||
|
||||
Reference in New Issue
Block a user