更新
This commit is contained in:
@@ -63,8 +63,8 @@ export default {
|
||||
this.loading = true
|
||||
|
||||
try {
|
||||
const res = await this.$store.dispatch('family/createFamily', this.familyName.trim())
|
||||
if (res.code === 200) {
|
||||
const res = await this.$store.dispatch('createFamily', this.familyName.trim())
|
||||
if (res && res.code === 1) {
|
||||
uni.showToast({
|
||||
title: '创建成功',
|
||||
icon: 'success'
|
||||
@@ -74,14 +74,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