优化代码
This commit is contained in:
@@ -148,7 +148,7 @@ export default {
|
||||
const familyRes = await this.$api.family.info.get()
|
||||
if (familyRes && familyRes.code === 1) {
|
||||
this.familyInfo = familyRes.data
|
||||
this.$store.commit('family/setFamilyInfo', familyRes.data)
|
||||
this.$store.commit('setFamilyInfo', familyRes.data)
|
||||
}
|
||||
|
||||
// 获取邀请码(仅家主)
|
||||
|
||||
@@ -172,10 +172,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
hasFamily() {
|
||||
if (!this.$store || !this.$store.getters) {
|
||||
if (!this.$store || !this.$store.state) {
|
||||
return false
|
||||
}
|
||||
return this.$store.getters.hasFamily || false
|
||||
return this.$store.state.family.familyId ? true :false
|
||||
},
|
||||
userName() {
|
||||
if (!this.$store || !this.$store.state || !this.$store.state.user || !this.$store.state.user.userInfo) {
|
||||
|
||||
Reference in New Issue
Block a user