This commit is contained in:
2026-01-18 20:17:59 +08:00
parent 7e05f5e76f
commit de9c14f070
23 changed files with 1825 additions and 71 deletions
+4 -4
View File
@@ -70,8 +70,8 @@ export default {
this.loading = true
try {
const res = await this.$store.dispatch('family/joinFamily', this.inviteCode.trim())
if (res.code === 200) {
const res = await this.$store.dispatch('joinFamily', this.inviteCode.trim())
if (res && res.code === 1) {
uni.showToast({
title: '加入成功',
icon: 'success'
@@ -81,14 +81,14 @@ export default {
}, 1500)
} else {
uni.showToast({
title: res.message || '加入失败',
title: res?.message || '加入失败',
icon: 'none'
})
}
} catch (error) {
console.error('加入家庭失败', error)
uni.showToast({
title: '加入失败,请重试',
title: error?.message || '加入失败,请重试',
icon: 'none'
})
} finally {