更新
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user