feat: 品牌文案配置化 + 全页面下拉刷新

- 新增 configStore 管理品牌文案(appName, appSlogan, appDescription)
- 关于弹窗、分享标题使用 configStore 读取品牌名
- 所有数据页面添加下拉刷新功能
- 所有数据页面 onShow 时自动刷新数据
This commit is contained in:
2026-06-08 10:59:09 +08:00
parent 62ca400b64
commit 6af876a8f4
12 changed files with 161 additions and 24 deletions

View File

@@ -140,8 +140,9 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { onShow, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { onShow, onPullDownRefresh, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { useGroupStore } from '@/stores/group'
import { useConfigStore } from '@/stores/config'
import { waitForReady } from '@/utils/app-ready'
import { statusBarHeight, capsuleRight } from '@/utils/system'
import { API_BASE } from '@/config'
@@ -149,6 +150,7 @@ import Icon from '@/components/Icon/Icon.vue'
import type { GroupMember, Group } from '@/api/group'
const groupStore = useGroupStore()
const configStore = useConfigStore()
const actionTab = ref<'create' | 'join'>('create')
const newGroupName = ref('')
@@ -174,6 +176,11 @@ onShow(() => {
if (initialLoaded.value) groupStore.fetchGroups()
})
onPullDownRefresh(async () => {
await groupStore.fetchGroups()
uni.stopPullDownRefresh()
})
// #ifdef MP-WEIXIN
onShareAppMessage(() => {
// 空值保护:通过右上角菜单触发时 invite_code 可能为空
@@ -188,7 +195,7 @@ onShareAppMessage(() => {
})
onShareTimeline(() => ({
title: '小菜记账 — 一起来记账吧!'
title: `${configStore.appName} — 一起来记账吧!`
}))
// #endif