فهرست منبع

refactor(store): switchToChildWithCheck 文案与注释对齐 member 语义

iwt 2 هفته پیش
والد
کامیت
e8e2924c2e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      cfc-frontend/store/index.js

+ 2 - 2
cfc-frontend/store/index.js

@@ -183,13 +183,13 @@ const store = new Vuex.Store({
     updateChildren({ commit }, children) {
       commit('setChildren', children)
     },
-    // 切换孩子前检查家庭中是否有孩子成员
+    // 兼容旧 action:切换成员前检查(effectiveRole 年龄语义保留,用于过滤未成年成员)
     switchToChildWithCheck({ commit }, { memberId, members }) {
       var hasChildren = members && members.some(function(m) {
         return m.effectiveRole === 'child'
       })
       if (!hasChildren) {
-        uni.showToast({ title: '家庭中暂无孩子', icon: 'none' })
+        uni.showToast({ title: '家庭中暂无可切换的未成年成员', icon: 'none' })
         return false
       }
       commit('switchToChild', memberId)