Просмотр исходного кода

refactor(family): 废弃独立添加孩子页面,重定向至家庭成员

children/create-child/edit-child页面改为自动跳转到family-members,孩子管理统一通过家庭成员功能完成

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Sisyphus 3 месяцев назад
Родитель
Сommit
9f6857fac6

+ 48 - 97
cfc-frontend/pages/profile-extra/children.vue

@@ -1,116 +1,67 @@
 <template>
-  <view class="container">
-    <view class="children-list">
-      <view class="child-item" v-for="child in children" :key="child.id">
-        <view class="child-avatar">{{ child.nickname ? child.nickname[0] : '?' }}</view>
-        <view class="child-info">
-          <text class="child-name">{{ child.nickname }}</text>
-          <text class="child-detail">年龄: {{ child.age }} | 积分: {{ child.totalPoints }}</text>
-        </view>
-        <view class="child-actions">
-          <button class="btn-invite" open-type="share" @click="prepareInvite(child)">邀请</button>
-          <text class="btn-edit" @click="editChild(child)">编辑</text>
-        </view>
-      </view>
-    </view>
-    <view class="empty" v-if="children.length === 0">
-      <text>暂无孩子,请点击下方按钮添加</text>
-    </view>
-    
-    <!-- 添加孩子按钮 -->
-    <view class="add-btn-wrapper">
-      <button class="btn-add" @click="addChild">
-        <text class="add-icon">+</text>
-        <text>添加孩子</text>
-      </button>
+  <view class="redirect-container">
+    <view class="redirect-card">
+      <text class="redirect-icon">👪</text>
+      <text class="redirect-title">已将孩子管理整合到家庭成员</text>
+      <text class="redirect-desc">孩子的信息请在「家庭成员」中添加和管理</text>
+      <button class="redirect-btn" @click="goToFamilyMembers">前往家庭成员</button>
     </view>
   </view>
 </template>
 
 <script>
-import { getChildren } from '../../utils/api.js'
-
 export default {
-  data() {
-    return {
-      children: [],
-      shareData: null
-    }
-  },
-  onLoad() {
-  },
   onShow() {
-    this.loadChildren()
-  },
-  onShareAppMessage() {
-    if (this.shareData) {
-      return {
-        title: this.shareData.title,
-        path: this.shareData.path,
-        imageUrl: '/static/invite-card.png'
-      }
-    }
+    // 自动跳转到家庭成员页面
+    uni.redirectTo({ url: '/pages/profile-extra/family-members' })
   },
   methods: {
-    async loadChildren() {
-      try {
-        const res = await getChildren()
-        this.children = res.data || []
-      } catch (e) {
-        console.error(e)
-      }
-    },
-    async prepareInvite(child) {
-      try {
-        const { generateInviteCard } = require('../../utils/api.js')
-        const res = await generateInviteCard('child', child.id)
-        const code = res.data.code
-        this.shareData = {
-          title: '邀请 ' + (child.nickname || '孩子') + ' 加入家庭',
-          path: '/pages/login/login?invite_code=' + code
-        }
-        uni.showToast({ title: '点击右上角转发给TA', icon: 'none' })
-      } catch (e) {
-        uni.showToast({ title: e.message || '生成邀请失败', icon: 'none' })
-      }
-    },
-    editChild(child) {
-      uni.navigateTo({
-        url: '/pages/profile-extra/edit-child?childId=' + child.id
-      })
-    },
-    addChild() {
-      uni.navigateTo({
-        url: '/pages/profile-extra/create-child'
-      })
+    goToFamilyMembers() {
+      uni.redirectTo({ url: '/pages/profile-extra/family-members' })
     }
   }
 }
 </script>
 
 <style scoped>
-.container { padding: 30rpx; padding-bottom: 150rpx; }
-.children-list { background: #fff; border-radius: 20rpx; }
-.child-item { display: flex; align-items: center; padding: 30rpx; border-bottom: 1rpx solid #f0f0f0; }
-.child-avatar { width: 100rpx; height: 100rpx; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40rpx; font-weight: bold; margin-right: 20rpx; }
-.child-info { flex: 1; }
-.child-name { font-size: 32rpx; font-weight: bold; color: #333; display: block; }
-.child-detail { font-size: 26rpx; color: #666; display: block; }
-.child-dan { font-size: 24rpx; color: #999; }
-.btn-edit { color: #F97316; font-size: 28rpx; }
-.btn-invite { background: #3B82F6; color: #fff; font-size: 24rpx; padding: 4rpx 16rpx; border-radius: 8rpx; margin-right: 10rpx; line-height: 1.8; display: inline-block; }
-.empty { text-align: center; padding: 100rpx; color: #999; }
-.add-btn-wrapper { position: fixed; bottom: 30rpx; left: 30rpx; right: 30rpx; }
-.btn-add { 
-  display: flex; 
-  align-items: center; 
-  justify-content: center; 
-  background: linear-gradient(135deg, #F97316, #FB923C); 
-  color: #fff; 
-  border-radius: 50rpx; 
-  padding: 24rpx 0;
+.redirect-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  min-height: 100vh;
+  background: #f5f5f5;
+  padding: 40rpx;
+}
+.redirect-card {
+  background: #fff;
+  border-radius: 20rpx;
+  padding: 60rpx 40rpx;
+  text-align: center;
+  width: 100%;
+}
+.redirect-icon {
+  font-size: 80rpx;
+  display: block;
+  margin-bottom: 24rpx;
+}
+.redirect-title {
   font-size: 32rpx;
-  box-shadow: 0 4rpx 12rpx rgba(255, 107, 107, 0.3);
+  font-weight: bold;
+  color: #333;
+  display: block;
+  margin-bottom: 16rpx;
+}
+.redirect-desc {
+  font-size: 28rpx;
+  color: #666;
+  display: block;
+  margin-bottom: 40rpx;
+}
+.redirect-btn {
+  background: #07c160;
+  color: #fff;
+  border-radius: 44rpx;
+  font-size: 30rpx;
+  padding: 20rpx 60rpx;
 }
-.add-icon { font-size: 40rpx; margin-right: 10rpx; font-weight: bold; }
 </style>

+ 50 - 215
cfc-frontend/pages/profile-extra/create-child.vue

@@ -1,231 +1,66 @@
 <template>
-  <view class="container">
-    <view class="form-container">
-      <view class="page-title">{{ isEditMode ? '编辑孩子信息' : '添加孩子' }}</view>
-
-      <!-- 姓名(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>孩子姓名</text>
-        <input class="input" v-model="form.nickname" placeholder="请输入孩子姓名" />
-      </view>
-
-      <!-- 出生日期(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>出生日期</text>
-        <picker mode="date" :value="form.birthday" @change="onBirthdayChange" :end="todayDate">
-          <view class="picker">
-            {{ form.birthday || '请选择出生日期' }}
-          </view>
-        </picker>
-      </view>
-
-      <!-- 性别(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>性别</text>
-        <picker :range="genderOptions" range-key="label" @change="onGenderChange">
-          <view class="picker">
-            {{ genderLabel || '请选择性别' }}
-          </view>
-        </picker>
-      </view>
-
-      <!-- 年龄(根据出生日期自动计算) -->
-      <view class="form-item">
-        <text class="label">年龄</text>
-        <view class="age-display">{{ calculatedAge || '根据出生日期自动计算' }}</view>
-      </view>
-
-      <!-- 手机号(非必填) -->
-      <view class="form-item">
-        <text class="label">手机号(选填)</text>
-        <input class="input" type="number" v-model="form.phone" placeholder="请输入手机号" maxlength="11" />
-      </view>
-
-      <!-- 身份证号(非必填) -->
-      <view class="form-item">
-        <text class="label">身份证号(选填)</text>
-        <input class="input" v-model="form.idCard" placeholder="请输入身份证号" maxlength="18" />
-      </view>
-
-      <!-- 扣分开关 -->
-      <view class="form-item">
-        <text class="label">扣分开关</text>
-        <switch :checked="form.penaltyEnabled === 1" @change="onPenaltyChange" color="#F97316" />
-        <text class="hint">开启后,超时未完成任务将扣减积分</text>
-      </view>
-
-      <button class="btn-primary" :loading="submitting" @click="submit">{{ isEditMode ? '保存修改' : '保存' }}</button>
+  <view class="redirect-container">
+    <view class="redirect-card">
+      <text class="redirect-icon">👪</text>
+      <text class="redirect-title">请通过「家庭成员」添加孩子</text>
+      <text class="redirect-desc">现在孩子的信息统一在家庭成员中管理,添加时填写出生日期即可自动识别为孩子</text>
+      <button class="redirect-btn" @click="goToFamilyMembers">前往家庭成员</button>
     </view>
   </view>
 </template>
 
 <script>
-import { createChild, getChildren, updateChild } from '../../utils/api.js'
-
 export default {
-  data() {
-    return {
-      childId: '',
-      isEditMode: false,
-      submitting: false,
-      form: {
-        nickname: '',
-        birthday: '',
-        gender: '',
-        age: '',
-        phone: '',
-        idCard: '',
-        penaltyEnabled: 0
-      },
-      genderOptions: [
-        { value: 'male', label: '男' },
-        { value: 'female', label: '女' }
-      ],
-      todayDate: ''
-    }
-  },
-  computed: {
-    genderLabel() {
-      const gender = this.genderOptions.find(g => g.value === this.form.gender)
-      return gender ? gender.label : ''
-    },
-    calculatedAge() {
-      if (!this.form.birthday) return ''
-      const birth = new Date(this.form.birthday)
-      const today = new Date()
-      let age = today.getFullYear() - birth.getFullYear()
-      const monthDiff = today.getMonth() - birth.getMonth()
-      if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
-        age--
-      }
-      return age >= 0 ? age + '岁' : ''
-    }
-  },
-  onLoad(options) {
-    // 设置今天的日期作为选择器结束日期
-    const today = new Date()
-    this.todayDate = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${String(today.getDate()).padStart(2, '0')}`
-    
-    this.isEditMode = options.mode === 'edit'
-    this.childId = options.childId || ''
-
-    if (this.isEditMode && this.childId) {
-      uni.setNavigationBarTitle({ title: '编辑孩子' })
-      this.loadChildDetail()
-    } else {
-      uni.setNavigationBarTitle({ title: '添加孩子' })
-    }
+  onShow() {
+    uni.redirectTo({ url: '/pages/profile-extra/family-members' })
   },
   methods: {
-    async loadChildDetail() {
-      try {
-        const res = await getChildren()
-        const children = res.data || []
-        const targetChild = children.find(child => String(child.id) === String(this.childId))
-
-        if (!targetChild) {
-          uni.showToast({ title: '未找到孩子信息', icon: 'none' })
-          setTimeout(() => uni.navigateBack(), 1200)
-          return
-        }
-
-        this.form.nickname = targetChild.nickname || ''
-        this.form.birthday = targetChild.birthday || ''
-        this.form.gender = targetChild.gender || ''
-        this.form.age = targetChild.age != null ? String(targetChild.age) : ''
-        this.form.phone = targetChild.phone || ''
-        this.form.idCard = targetChild.idCard || ''
-        this.form.penaltyEnabled = targetChild.penaltyEnabled != null ? targetChild.penaltyEnabled : 0
-      } catch (e) {
-        uni.showToast({ title: '加载孩子信息失败', icon: 'none' })
-      }
-    },
-    onBirthdayChange(e) {
-      this.form.birthday = e.detail.value
-    },
-    onGenderChange(e) {
-      this.form.gender = this.genderOptions[e.detail.value].value
-    },
-    onPenaltyChange(e) {
-      this.form.penaltyEnabled = e.detail.value ? 1 : 0
-    },
-    async submit() {
-      // 必填校验
-      if (!this.form.nickname || !this.form.nickname.trim()) {
-        uni.showToast({ title: '请输入孩子姓名', icon: 'none' })
-        return
-      }
-      if (!this.form.birthday) {
-        uni.showToast({ title: '请选择出生日期', icon: 'none' })
-        return
-      }
-      if (!this.form.gender) {
-        uni.showToast({ title: '请选择性别', icon: 'none' })
-        return
-      }
-
-      // 手机号格式校验(如果填写了)
-      if (this.form.phone && !/^1[3-9]\d{9}$/.test(this.form.phone)) {
-        uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
-        return
-      }
-
-      // 身份证格式校验(如果填写了)
-      if (this.form.idCard && !/^\d{15}$|^\d{17}[\dXx]$/.test(this.form.idCard)) {
-        uni.showToast({ title: '请输入正确的身份证号', icon: 'none' })
-        return
-      }
-
-      // 计算年龄
-      const birth = new Date(this.form.birthday)
-      const today = new Date()
-      let age = today.getFullYear() - birth.getFullYear()
-      const monthDiff = today.getMonth() - birth.getMonth()
-      if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
-        age--
-      }
-
-      try {
-        this.submitting = true
-        const payload = {
-          nickname: this.form.nickname.trim(),
-          birthday: this.form.birthday,
-          gender: this.form.gender,
-          age: age >= 0 ? age : 0,
-          phone: this.form.phone || null,
-          idCard: this.form.idCard || null,
-          penaltyEnabled: this.form.penaltyEnabled
-        }
-
-        if (this.isEditMode) {
-          await updateChild(this.childId, payload)
-        } else {
-          await createChild(payload)
-        }
-
-        uni.showToast({ title: this.isEditMode ? '修改成功' : '添加成功', icon: 'success' })
-        setTimeout(() => uni.navigateBack(), 1500)
-      } catch (e) {
-        uni.showToast({ title: this.isEditMode ? '修改失败' : '添加失败', icon: 'none' })
-      } finally {
-        this.submitting = false
-      }
+    goToFamilyMembers() {
+      uni.redirectTo({ url: '/pages/profile-extra/family-members' })
     }
   }
 }
 </script>
 
 <style scoped>
-.container { padding: 30rpx; }
-.form-container { background: #fff; border-radius: 20rpx; padding: 30rpx; }
-.page-title { font-size: 34rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; }
-.form-item { margin-bottom: 30rpx; }
-.form-item.required .label { font-weight: bold; }
-.label { display: block; font-size: 28rpx; color: #333; margin-bottom: 10rpx; }
-.required-mark { color: #F97316; margin-right: 4rpx; }
-.input { border: 1rpx solid #ddd; border-radius: 10rpx; padding: 20rpx; font-size: 28rpx; }
-.picker { border: 1rpx solid #ddd; border-radius: 10rpx; padding: 20rpx; font-size: 28rpx; color: #666; }
-.age-display { border: 1rpx solid #ddd; border-radius: 10rpx; padding: 20rpx; font-size: 28rpx; color: #999; background: #f9f9f9; }
-.hint { font-size: 24rpx; color: #999; margin-left: 20rpx; }
-.btn-primary { background: #F97316; color: #fff; border-radius: 20rpx; margin-top: 40rpx; }
+.redirect-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  min-height: 100vh;
+  background: #f5f5f5;
+  padding: 40rpx;
+}
+.redirect-card {
+  background: #fff;
+  border-radius: 20rpx;
+  padding: 60rpx 40rpx;
+  text-align: center;
+  width: 100%;
+}
+.redirect-icon {
+  font-size: 80rpx;
+  display: block;
+  margin-bottom: 24rpx;
+}
+.redirect-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  display: block;
+  margin-bottom: 16rpx;
+}
+.redirect-desc {
+  font-size: 28rpx;
+  color: #666;
+  display: block;
+  margin-bottom: 40rpx;
+}
+.redirect-btn {
+  background: #07c160;
+  color: #fff;
+  border-radius: 44rpx;
+  font-size: 30rpx;
+  padding: 20rpx 60rpx;
+}
 </style>

+ 35 - 294
cfc-frontend/pages/profile-extra/edit-child.vue

@@ -1,325 +1,66 @@
 <template>
-  <view class="container">
-    <view class="form-container">
-      <view class="page-title">编辑孩子信息</view>
-
-      <!-- 姓名(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>孩子姓名</text>
-        <input class="input" v-model="form.nickname" placeholder="请输入孩子姓名" />
-      </view>
-
-      <!-- 出生日期(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>出生日期</text>
-        <picker mode="date" :value="form.birthday" @change="onBirthdayChange" :end="todayDate">
-          <view class="picker">
-            {{ form.birthday || '请选择出生日期' }}
-          </view>
-        </picker>
-      </view>
-
-      <!-- 性别(必填) -->
-      <view class="form-item required">
-        <text class="label"><text class="required-mark">*</text>性别</text>
-        <picker :range="genderOptions" range-key="label" @change="onGenderChange">
-          <view class="picker">
-            {{ genderLabel || '请选择性别' }}
-          </view>
-        </picker>
-      </view>
-
-      <!-- 年龄(根据出生日期自动计算) -->
-      <view class="form-item">
-        <text class="label">年龄</text>
-        <view class="age-display">{{ calculatedAge || '根据出生日期自动计算' }}</view>
-      </view>
-
-      <!-- 手机号(非必填) -->
-      <view class="form-item">
-        <text class="label">手机号(选填)</text>
-        <input class="input" type="number" v-model="form.phone" placeholder="请输入手机号" maxlength="11" />
-      </view>
-
-      <!-- 身份证号(非必填) -->
-      <view class="form-item">
-        <text class="label">身份证号(选填)</text>
-        <input class="input" v-model="form.idCard" placeholder="请输入身份证号" maxlength="18" />
-      </view>
-
-      <!-- 扣分开关(仅 children 系统支持) -->
-      <view class="form-item" v-if="!isFamilyMember">
-        <text class="label">扣分开关</text>
-        <switch :checked="form.penaltyEnabled === 1" @change="onPenaltyChange" color="#F97316" />
-        <text class="hint">开启后,超时未完成任务将扣减积分</text>
-      </view>
-
-      <!-- 对家庭成员可见(仅 children 系统支持) -->
-      <view class="form-item" v-if="!isFamilyMember">
-        <text class="label">对家庭成员可见</text>
-        <switch :checked="form.showToFamily !== 0" @change="onShowToFamilyChange" color="#5B9BD5" />
-        <text class="hint">关闭后,其他家庭成员将看不到此孩子</text>
-      </view>
-
-      <!-- 主题风格(仅 children 系统支持) -->
-      <view class="form-item" v-if="!isFamilyMember">
-        <text class="label">主题风格</text>
-        <picker :range="themes" range-key="label" @change="onThemeChange">
-          <view class="picker">
-            {{ currentThemeLabel || '请选择主题' }}
-          </view>
-        </picker>
-      </view>
-
-      <button class="btn-primary" :loading="submitting" @click="submit">保存修改</button>
+  <view class="redirect-container">
+    <view class="redirect-card">
+      <text class="redirect-icon">👪</text>
+      <text class="redirect-title">请在「家庭成员」中编辑信息</text>
+      <text class="redirect-desc">孩子的信息编辑已整合到家庭成员管理中</text>
+      <button class="redirect-btn" @click="goToFamilyMembers">前往家庭成员</button>
     </view>
   </view>
 </template>
 
 <script>
-import { getChildren, updateChild, updateFamilyMember } from '../../utils/api.js'
-
 export default {
-  data() {
-    return {
-      childId: '',
-      memberId: '',
-      isFamilyMember: false,
-      submitting: false,
-      form: {
-        nickname: '',
-        birthday: '',
-        gender: '',
-        age: '',
-        phone: '',
-        idCard: '',
-        penaltyEnabled: 1,
-        showToFamily: 1,
-        theme: 'default'
-      },
-      genderOptions: [
-        { value: 'male', label: '男' },
-        { value: 'female', label: '女' }
-      ],
-      themes: [
-        { value: 'default', label: '默认' },
-        { value: 'ocean', label: '海洋' },
-        { value: 'forest', label: '森林' },
-        { value: 'sunset', label: '日落' }
-      ]
-    }
-  },
-  computed: {
-    currentThemeLabel() {
-      const theme = this.themes.find(t => t.value === this.form.theme)
-      return theme ? theme.label : '默认'
-    },
-    genderLabel() {
-      const gender = this.genderOptions.find(g => g.value === this.form.gender)
-      return gender ? gender.label : ''
-    },
-    todayDate() {
-      return new Date().toISOString().split('T')[0]
-    },
-    calculatedAge() {
-      if (!this.form.birthday) return ''
-      const birth = new Date(this.form.birthday)
-      const today = new Date()
-      let age = today.getFullYear() - birth.getFullYear()
-      const monthDiff = today.getMonth() - birth.getMonth()
-      if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
-        age--
-      }
-      return age > 0 ? age + '岁' : ''
-    }
-  },
-  onLoad(options) {
-    this.childId = options.childId || ''
-    this.memberId = options.memberId || ''
-    if (!this.childId && !this.memberId) {
-      uni.showToast({ title: '参数错误', icon: 'none' })
-      setTimeout(() => uni.navigateBack(), 1500)
-      return
-    }
-    // 优先按 childId 从 children 系统加载,找不到则按 memberId 从 family-member 系统加载
-    if (this.childId) {
-      this.loadChildData()
-    } else {
-      this.isFamilyMember = true
-      this.loadFamilyMemberData(options)
-    }
+  onShow() {
+    uni.redirectTo({ url: '/pages/profile-extra/family-members' })
   },
   methods: {
-    async loadChildData() {
-      try {
-        const res = await getChildren()
-        const children = res.data || []
-        const child = children.find(c => c.id == this.childId)
-        if (child) {
-          this.form = {
-            nickname: child.nickname || '',
-            birthday: child.birthday || '',
-            gender: child.gender || '',
-            age: child.age || '',
-            phone: child.phone || '',
-            idCard: child.idCard || '',
-            penaltyEnabled: child.penaltyEnabled !== 0 ? 1 : 0,
-            showToFamily: child.showToFamily !== 0 ? 1 : 0,
-            theme: child.theme || 'default'
-          }
-        } else {
-          // children 系统找不到,尝试作为 family member 加载
-          this.isFamilyMember = true
-          this.memberId = this.childId
-          this.childId = ''
-        }
-      } catch (e) {
-        console.error('加载孩子数据失败', e)
-        uni.showToast({ title: '加载失败', icon: 'none' })
-      }
-    },
-    loadFamilyMemberData(options) {
-      // 从 URL 参数中填充基本信息(family member 系统字段有限)
-      this.form.nickname = options.nickname ? decodeURIComponent(options.nickname) : ''
-      this.form.gender = options.gender || ''
-      this.form.phone = options.phone || ''
-      this.form.birthday = options.birthday || ''
-    },
-    onBirthdayChange(e) {
-      this.form.birthday = e.detail.value
-      // 根据出生日期自动计算年龄
-      const birth = new Date(e.detail.value)
-      const today = new Date()
-      let age = today.getFullYear() - birth.getFullYear()
-      const monthDiff = today.getMonth() - birth.getMonth()
-      if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
-        age--
-      }
-      this.form.age = age
-    },
-    onGenderChange(e) {
-      this.form.gender = this.genderOptions[e.detail.value].value
-    },
-    onPenaltyChange(e) {
-      this.form.penaltyEnabled = e.detail.value ? 1 : 0
-    },
-    onShowToFamilyChange(e) {
-      this.form.showToFamily = e.detail.value ? 1 : 0
-    },
-    onThemeChange(e) {
-      this.form.theme = this.themes[e.detail.value].value
-    },
-    async submit() {
-      if (!this.form.nickname) {
-        uni.showToast({ title: '请输入孩子姓名', icon: 'none' })
-        return
-      }
-      if (!this.form.birthday) {
-        uni.showToast({ title: '请选择出生日期', icon: 'none' })
-        return
-      }
-      if (!this.form.gender) {
-        uni.showToast({ title: '请选择性别', icon: 'none' })
-        return
-      }
-
-      this.submitting = true
-      try {
-        if (this.isFamilyMember) {
-          await updateFamilyMember({
-            memberId: this.memberId,
-            nickname: this.form.nickname,
-            birthday: this.form.birthday,
-            gender: this.form.gender,
-            phone: this.form.phone
-          })
-        } else {
-          await updateChild(this.childId, {
-            nickname: this.form.nickname,
-            birthday: this.form.birthday,
-            gender: this.form.gender,
-            age: this.form.age,
-            phone: this.form.phone,
-            idCard: this.form.idCard,
-            penaltyEnabled: this.form.penaltyEnabled,
-            showToFamily: this.form.showToFamily,
-            theme: this.form.theme
-          })
-        }
-        uni.showToast({ title: '保存成功', icon: 'success' })
-        setTimeout(() => uni.navigateBack(), 1500)
-      } catch (e) {
-        console.error('保存失败', e)
-        uni.showToast({ title: '保存失败', icon: 'none' })
-      } finally {
-        this.submitting = false
-      }
+    goToFamilyMembers() {
+      uni.redirectTo({ url: '/pages/profile-extra/family-members' })
     }
   }
 }
 </script>
 
 <style scoped>
-.container {
-  padding: 30rpx;
+.redirect-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  min-height: 100vh;
+  background: #f5f5f5;
+  padding: 40rpx;
 }
-
-.form-container {
+.redirect-card {
   background: #fff;
   border-radius: 20rpx;
-  padding: 30rpx;
-}
-
-.page-title {
-  font-size: 36rpx;
-  font-weight: bold;
+  padding: 60rpx 40rpx;
   text-align: center;
-  margin-bottom: 40rpx;
+  width: 100%;
 }
-
-.form-item {
-  margin-bottom: 30rpx;
+.redirect-icon {
+  font-size: 80rpx;
+  display: block;
+  margin-bottom: 24rpx;
 }
-
-.form-item.required .label {
+.redirect-title {
+  font-size: 32rpx;
   font-weight: bold;
-}
-
-.required-mark {
-  color: #F97316;
-  margin-right: 8rpx;
-}
-
-.label {
-  display: block;
-  font-size: 28rpx;
   color: #333;
-  margin-bottom: 10rpx;
-}
-
-.input, .picker {
-  border: 1rpx solid #ddd;
-  border-radius: 10rpx;
-  padding: 20rpx;
-  font-size: 28rpx;
+  display: block;
+  margin-bottom: 16rpx;
 }
-
-.age-display {
+.redirect-desc {
   font-size: 28rpx;
   color: #666;
-  padding: 20rpx;
-}
-
-.hint {
   display: block;
-  font-size: 24rpx;
-  color: #999;
-  margin-top: 10rpx;
+  margin-bottom: 40rpx;
 }
-
-.btn-primary {
-  background: linear-gradient(135deg, #F97316, #FB923C);
+.redirect-btn {
+  background: #07c160;
   color: #fff;
-  margin-top: 40rpx;
+  border-radius: 44rpx;
+  font-size: 30rpx;
+  padding: 20rpx 60rpx;
 }
 </style>