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

删除原生小程序目录miniprogram,项目使用uni-app开发

User 5 месяцев назад
Родитель
Сommit
5a9fdbe6d7
68 измененных файлов с 0 добавлено и 5505 удалено
  1. 0 37
      miniprogram/app.js
  2. 0 54
      miniprogram/app.json
  3. 0 45
      miniprogram/app.wxss
  4. 0 5
      miniprogram/images/default-avatar.svg
  5. 0 8
      miniprogram/images/empty-log.svg
  6. 0 6
      miniprogram/images/empty-reward.svg
  7. 0 6
      miniprogram/images/empty-task.svg
  8. 0 5
      miniprogram/images/tab-me-active.svg
  9. 0 5
      miniprogram/images/tab-me.svg
  10. 0 7
      miniprogram/images/tab-reward-active.svg
  11. 0 7
      miniprogram/images/tab-reward.svg
  12. 0 6
      miniprogram/images/tab-task-active.svg
  13. 0 6
      miniprogram/images/tab-task.svg
  14. 0 54
      miniprogram/pages/achievements/achievements.js
  15. 0 4
      miniprogram/pages/achievements/achievements.json
  16. 0 69
      miniprogram/pages/achievements/achievements.wxml
  17. 0 152
      miniprogram/pages/achievements/achievements.wxss
  18. 0 110
      miniprogram/pages/child-edit/child-edit.js
  19. 0 4
      miniprogram/pages/child-edit/child-edit.json
  20. 0 75
      miniprogram/pages/child-edit/child-edit.wxml
  21. 0 92
      miniprogram/pages/child-edit/child-edit.wxss
  22. 0 33
      miniprogram/pages/child-home/child-home.js
  23. 0 5
      miniprogram/pages/child-home/child-home.json
  24. 0 49
      miniprogram/pages/child-home/child-home.wxml
  25. 0 177
      miniprogram/pages/child-home/child-home.wxss
  26. 0 171
      miniprogram/pages/family-manage/family-manage.js
  27. 0 4
      miniprogram/pages/family-manage/family-manage.json
  28. 0 68
      miniprogram/pages/family-manage/family-manage.wxml
  29. 0 176
      miniprogram/pages/family-manage/family-manage.wxss
  30. 0 28
      miniprogram/pages/index/index.js
  31. 0 4
      miniprogram/pages/index/index.json
  32. 0 9
      miniprogram/pages/index/index.wxml
  33. 0 37
      miniprogram/pages/index/index.wxss
  34. 0 79
      miniprogram/pages/login/login.js
  35. 0 4
      miniprogram/pages/login/login.json
  36. 0 32
      miniprogram/pages/login/login.wxml
  37. 0 112
      miniprogram/pages/login/login.wxss
  38. 0 56
      miniprogram/pages/parent-home/parent-home.js
  39. 0 5
      miniprogram/pages/parent-home/parent-home.json
  40. 0 44
      miniprogram/pages/parent-home/parent-home.wxml
  41. 0 144
      miniprogram/pages/parent-home/parent-home.wxss
  42. 0 261
      miniprogram/pages/points-log/points-log.js
  43. 0 5
      miniprogram/pages/points-log/points-log.json
  44. 0 117
      miniprogram/pages/points-log/points-log.wxml
  45. 0 210
      miniprogram/pages/points-log/points-log.wxss
  46. 0 288
      miniprogram/pages/reward-list/reward-list.js
  47. 0 5
      miniprogram/pages/reward-list/reward-list.json
  48. 0 106
      miniprogram/pages/reward-list/reward-list.wxml
  49. 0 259
      miniprogram/pages/reward-list/reward-list.wxss
  50. 0 247
      miniprogram/pages/settings/settings.js
  51. 0 4
      miniprogram/pages/settings/settings.json
  52. 0 167
      miniprogram/pages/settings/settings.wxml
  53. 0 196
      miniprogram/pages/settings/settings.wxss
  54. 0 186
      miniprogram/pages/task-create/task-create.js
  55. 0 4
      miniprogram/pages/task-create/task-create.json
  56. 0 101
      miniprogram/pages/task-create/task-create.wxml
  57. 0 189
      miniprogram/pages/task-create/task-create.wxss
  58. 0 218
      miniprogram/pages/task-detail/task-detail.js
  59. 0 4
      miniprogram/pages/task-detail/task-detail.json
  60. 0 105
      miniprogram/pages/task-detail/task-detail.wxml
  61. 0 224
      miniprogram/pages/task-detail/task-detail.wxss
  62. 0 151
      miniprogram/pages/task-list/task-list.js
  63. 0 5
      miniprogram/pages/task-list/task-list.json
  64. 0 100
      miniprogram/pages/task-list/task-list.wxml
  65. 0 203
      miniprogram/pages/task-list/task-list.wxss
  66. 0 9
      miniprogram/sitemap.json
  67. 0 71
      miniprogram/utils/api.js
  68. 0 76
      miniprogram/utils/util.js

+ 0 - 37
miniprogram/app.js

@@ -1,37 +0,0 @@
-// app.js
-App({
-  globalData: {
-    baseUrl: 'http://localhost:8080/api',
-    token: '',
-    userInfo: null,
-    role: ''  // parent 或 child
-  },
-
-  onLaunch() {
-    // 检查登录状态
-    const token = wx.getStorageSync('token');
-    const role = wx.getStorageSync('role');
-    const userInfo = wx.getStorageSync('userInfo');
-    
-    if (token) {
-      this.globalData.token = token;
-      this.globalData.role = role;
-      this.globalData.userInfo = userInfo;
-    }
-  },
-
-  // 检查是否登录
-  checkLogin() {
-    return !!this.globalData.token;
-  },
-
-  // 退出登录
-  logout() {
-    this.globalData.token = '';
-    this.globalData.role = '';
-    this.globalData.userInfo = null;
-    wx.removeStorageSync('token');
-    wx.removeStorageSync('role');
-    wx.removeStorageSync('userInfo');
-  }
-})

+ 0 - 54
miniprogram/app.json

@@ -1,54 +0,0 @@
-{
-  "pages": [
-    "pages/index/index",
-    "pages/login/login",
-    "pages/parent-home/parent-home",
-    "pages/child-home/child-home",
-    "pages/task-list/task-list",
-    "pages/task-detail/task-detail",
-    "pages/task-create/task-create",
-    "pages/reward-list/reward-list",
-    "pages/points-log/points-log",
-    "pages/settings/settings",
-    "pages/child-edit/child-edit",
-    "pages/family-manage/family-manage",
-    "pages/achievements/achievements",
-    "pages/dan-assessment/dan-assessment",
-    "pages/help/help",
-    "pages/feedback/feedback"
-  ],
-  "window": {
-    "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#FF6B6B",
-    "navigationBarTitleText": "知行益家",
-    "navigationBarTextStyle": "white"
-  },
-  "tabBar": {
-    "color": "#999",
-    "selectedColor": "#FF6B6B",
-    "backgroundColor": "#fff",
-    "borderStyle": "black",
-    "list": [
-      {
-        "pagePath": "pages/parent-home/parent-home",
-        "text": "任务",
-        "iconPath": "images/tab-task.svg",
-        "selectedIconPath": "images/tab-task-active.svg"
-      },
-      {
-        "pagePath": "pages/reward-list/reward-list",
-        "text": "奖励",
-        "iconPath": "images/tab-reward.svg",
-        "selectedIconPath": "images/tab-reward-active.svg"
-      },
-      {
-        "pagePath": "pages/settings/settings",
-        "text": "我的",
-        "iconPath": "images/tab-me.svg",
-        "selectedIconPath": "images/tab-me-active.svg"
-      }
-    ]
-  },
-  "usingComponents": {},
-  "sitemapLocation": "sitemap.json"
-}

+ 0 - 45
miniprogram/app.wxss

@@ -1,45 +0,0 @@
-/* app.wxss */
-page {
-  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
-  font-size: 28rpx;
-  color: #333;
-  background-color: #f5f5f5;
-}
-
-.container {
-  box-sizing: border-box;
-}
-
-/* 通用按钮样式 */
-.btn-primary {
-  background: #FF6B6B;
-  color: #fff;
-}
-
-.btn-primary::after {
-  border: none;
-}
-
-/* 通用卡片样式 */
-.card {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-}
-
-/* flex布局工具 */
-.flex {
-  display: flex;
-}
-
-.flex-center {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.flex-between {
-  display: flex;
-  justify-content: space-between;
-}

+ 0 - 5
miniprogram/images/default-avatar.svg

@@ -1,5 +0,0 @@
-<svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
-  <circle cx="60" cy="60" r="60" fill="#f5f5f5"/>
-  <circle cx="60" cy="50" r="25" fill="#e0e0e0"/>
-  <ellipse cx="60" cy="100" rx="40" ry="30" fill="#e0e0e0"/>
-</svg>

+ 0 - 8
miniprogram/images/empty-log.svg

@@ -1,8 +0,0 @@
-<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
-  <rect width="200" height="200" fill="#f5f5f5"/>
-  <rect x="50" y="50" width="100" height="100" rx="10" fill="#e0e0e0"/>
-  <line x1="70" y1="80" x2="130" y2="80" stroke="#ccc" stroke-width="2"/>
-  <line x1="70" y1="100" x2="130" y2="100" stroke="#ccc" stroke-width="2"/>
-  <line x1="70" y1="120" x2="130" y2="120" stroke="#ccc" stroke-width="2"/>
-  <text x="100" y="180" text-anchor="middle" font-family="Arial" font-size="14" fill="#999">暂无记录</text>
-</svg>

+ 0 - 6
miniprogram/images/empty-reward.svg

@@ -1,6 +0,0 @@
-<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
-  <rect width="200" height="200" fill="#f5f5f5"/>
-  <rect x="50" y="50" width="100" height="80" rx="10" fill="#e0e0e0"/>
-  <rect x="70" y="130" width="60" height="20" rx="10" fill="#e0e0e0"/>
-  <text x="100" y="180" text-anchor="middle" font-family="Arial" font-size="14" fill="#999">暂无奖励</text>
-</svg>

+ 0 - 6
miniprogram/images/empty-task.svg

@@ -1,6 +0,0 @@
-<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
-  <rect width="200" height="200" fill="#f5f5f5"/>
-  <circle cx="100" cy="80" r="40" fill="#e0e0e0"/>
-  <rect x="60" y="130" width="80" height="20" rx="10" fill="#e0e0e0"/>
-  <text x="100" y="180" text-anchor="middle" font-family="Arial" font-size="14" fill="#999">暂无任务</text>
-</svg>

+ 0 - 5
miniprogram/images/tab-me-active.svg

@@ -1,5 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <circle cx="40" cy="30" r="15" fill="#FF6B6B"/>
-  <ellipse cx="40" cy="60" rx="25" ry="15" fill="#FF6B6B"/>
-</svg>

+ 0 - 5
miniprogram/images/tab-me.svg

@@ -1,5 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <circle cx="40" cy="30" r="15" fill="#999"/>
-  <ellipse cx="40" cy="60" rx="25" ry="15" fill="#999"/>
-</svg>

+ 0 - 7
miniprogram/images/tab-reward-active.svg

@@ -1,7 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <rect x="20" y="30" width="41" height="31" rx="5" fill="#FF6B6B"/>
-  <rect x="30" y="20" width="21" height="15" rx="3" fill="#FF6B6B"/>
-  <line x1="40" y1="45" x2="40" y2="55" stroke="#fff" stroke-width="3"/>
-  <line x1="30" y1="50" x2="50" y2="50" stroke="#fff" stroke-width="3"/>
-</svg>

+ 0 - 7
miniprogram/images/tab-reward.svg

@@ -1,7 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <rect x="20" y="30" width="41" height="31" rx="5" fill="#999"/>
-  <rect x="30" y="20" width="21" height="15" rx="3" fill="#999"/>
-  <line x1="40" y1="45" x2="40" y2="55" stroke="#fff" stroke-width="3"/>
-  <line x1="30" y1="50" x2="50" y2="50" stroke="#fff" stroke-width="3"/>
-</svg>

+ 0 - 6
miniprogram/images/tab-task-active.svg

@@ -1,6 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <rect x="10" y="20" width="61" height="41" rx="5" fill="#FF6B6B"/>
-  <line x1="20" y1="35" x2="61" y2="35" stroke="#fff" stroke-width="3"/>
-  <line x1="20" y1="50" x2="50" y2="50" stroke="#fff" stroke-width="3"/>
-</svg>

+ 0 - 6
miniprogram/images/tab-task.svg

@@ -1,6 +0,0 @@
-<svg width="81" height="81" viewBox="0 0 81 81" xmlns="http://www.w3.org/2000/svg">
-  <rect width="81" height="81" fill="none"/>
-  <rect x="10" y="20" width="61" height="41" rx="5" fill="#999"/>
-  <line x1="20" y1="35" x2="61" y2="35" stroke="#fff" stroke-width="3"/>
-  <line x1="20" y1="50" x2="50" y2="50" stroke="#fff" stroke-width="3"/>
-</svg>

+ 0 - 54
miniprogram/pages/achievements/achievements.js

@@ -1,54 +0,0 @@
-// pages/achievements/achievements.js
-Page({
-  data: {
-    childId: 0,
-    childName: '',
-    loading: false,
-    achievements: [
-      { id: 1, name: '初次尝试', description: '完成第一个任务', icon: '⭐', unlocked: true, unlockedAt: '2026-03-25' },
-      { id: 2, name: '三日火焰', description: '连续3天按时完成', icon: '🔥', unlocked: true, unlockedAt: '2026-03-28' },
-      { id: 3, name: '一周达人', description: '连续7天按时完成', icon: '🏆', unlocked: false, condition: '连续打卡4天' },
-      { id: 4, name: '百题斩', description: '完成100个任务', icon: '📖', unlocked: false, condition: '已完成15个任务' },
-      { id: 5, name: '精准打击', description: '连续10个任务提前完成', icon: '🎯', unlocked: false, condition: '已提前完成3个任务' },
-      { id: 6, name: '坚持不懈', description: '连续30天按时完成', icon: '💪', unlocked: false, condition: '连续打卡4天' },
-      { id: 7, name: '专注大师', description: '完成50次专注训练', icon: '🧠', unlocked: false, condition: '已完成0次专注训练' },
-      { id: 8, name: '积分富豪', description: '累计获得1000积分', icon: '💰', unlocked: false, condition: '已获得120积分' },
-      { id: 9, name: '全勤宝宝', description: '一周所有任务全部完成', icon: '🏅', unlocked: false, condition: '本周完成3/5个任务' },
-      { id: 10, name: '完美主义', description: '单月任务完成率100%', icon: '🎖️', unlocked: false, condition: '本月完成率60%' }
-    ],
-    stats: {
-      totalTasks: 15,
-      completedTasks: 12,
-      totalPoints: 120,
-      streakDays: 4,
-      achievementsUnlocked: 2
-    }
-  },
-
-  onLoad(options) {
-    const childId = options.childId || 0;
-    const childName = options.childName || '';
-    this.setData({ childId, childName });
-    wx.setNavigationBarTitle({ title: childName ? `${childName}的成就` : '成就徽章' });
-    this.loadAchievements();
-  },
-
-  loadAchievements() {
-    this.setData({ loading: true });
-    
-    setTimeout(() => {
-      this.setData({ loading: false });
-    }, 500);
-  },
-
-  onAchievementTap(e) {
-    const achievementId = e.currentTarget.dataset.id;
-    const achievement = this.data.achievements.find(a => a.id === achievementId);
-    
-    wx.showModal({
-      title: achievement.name,
-      content: `${achievement.description}\n\n${achievement.unlocked ? `解锁时间:${achievement.unlockedAt}` : `进度:${achievement.condition}`}`,
-      showCancel: false
-    });
-  }
-});

+ 0 - 4
miniprogram/pages/achievements/achievements.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "成就徽章",
-  "enablePullDownRefresh": false
-}

+ 0 - 69
miniprogram/pages/achievements/achievements.wxml

@@ -1,69 +0,0 @@
-<!--pages/achievements/achievements.wxml-->
-<view class="container">
-  <view class="loading" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-
-  <view class="achievements-content" wx:else>
-    <!-- 统计信息 -->
-    <view class="stats-card">
-      <view class="stats-grid">
-        <view class="stat-item">
-          <text class="stat-value">{{stats.totalTasks}}</text>
-          <text class="stat-label">总任务</text>
-        </view>
-        <view class="stat-item">
-          <text class="stat-value">{{stats.completedTasks}}</text>
-          <text class="stat-label">已完成</text>
-        </view>
-        <view class="stat-item">
-          <text class="stat-value">{{stats.totalPoints}}</text>
-          <text class="stat-label">总积分</text>
-        </view>
-        <view class="stat-item">
-          <text class="stat-value">{{stats.streakDays}}</text>
-          <text class="stat-label">连续天数</text>
-        </view>
-        <view class="stat-item">
-          <text class="stat-value">{{stats.achievementsUnlocked}}</text>
-          <text class="stat-label">已解锁</text>
-        </view>
-      </view>
-    </view>
-
-    <!-- 成就列表 -->
-    <view class="achievements-list">
-      <view class="list-title">成就徽章</view>
-      
-      <view class="achievement-grid">
-        <view 
-          class="achievement-item {{item.unlocked ? 'unlocked' : 'locked'}}"
-          wx:for="{{achievements}}"
-          wx:key="id"
-          data-id="{{item.id}}"
-          bindtap="onAchievementTap"
-        >
-          <view class="achievement-icon">{{item.icon}}</view>
-          <view class="achievement-info">
-            <text class="achievement-name">{{item.name}}</text>
-            <text class="achievement-desc">{{item.description}}</text>
-          </view>
-          <view class="achievement-status">
-            <text class="status-text">{{item.unlocked ? '已解锁' : '未解锁'}}</text>
-          </view>
-        </view>
-      </view>
-    </view>
-
-    <!-- 提示信息 -->
-    <view class="tips-card">
-      <text class="tips-title">解锁技巧</text>
-      <view class="tips-content">
-        <text class="tip-item">✅ 每天按时完成任务可以获得连续打卡</text>
-        <text class="tip-item">✅ 提前完成任务可以解锁精准打击徽章</text>
-        <text class="tip-item">✅ 完成专注训练可以解锁专注大师徽章</text>
-        <text class="tip-item">✅ 积攒积分可以解锁积分富豪徽章</text>
-      </view>
-    </view>
-  </view>
-</view>

+ 0 - 152
miniprogram/pages/achievements/achievements.wxss

@@ -1,152 +0,0 @@
-/* pages/achievements/achievements.wxss */
-.container {
-  padding: 20rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 400rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-.stats-card {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.stats-grid {
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: space-around;
-}
-
-.stat-item {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  width: 30%;
-  margin-bottom: 20rpx;
-}
-
-.stat-value {
-  font-size: 48rpx;
-  font-weight: bold;
-  color: #FF6B6B;
-  margin-bottom: 10rpx;
-}
-
-.stat-label {
-  font-size: 24rpx;
-  color: #999;
-}
-
-.achievements-list {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.list-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  margin-bottom: 30rpx;
-}
-
-.achievement-grid {
-  display: flex;
-  flex-direction: column;
-}
-
-.achievement-item {
-  display: flex;
-  align-items: center;
-  padding: 20rpx;
-  border-radius: 12rpx;
-  margin-bottom: 20rpx;
-  background-color: #f9f9f9;
-}
-
-.achievement-item.unlocked {
-  background-color: #fff8e1;
-  border: 2rpx solid #FFD700;
-}
-
-.achievement-item.locked {
-  opacity: 0.7;
-}
-
-.achievement-icon {
-  font-size: 60rpx;
-  margin-right: 20rpx;
-}
-
-.achievement-info {
-  flex: 1;
-}
-
-.achievement-name {
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 5rpx;
-}
-
-.achievement-desc {
-  font-size: 24rpx;
-  color: #666;
-}
-
-.achievement-status {
-  margin-left: 20rpx;
-}
-
-.status-text {
-  font-size: 24rpx;
-  color: #999;
-  padding: 4rpx 12rpx;
-  border-radius: 12rpx;
-  background-color: #f0f0f0;
-}
-
-.unlocked .status-text {
-  background-color: #4CAF50;
-  color: #fff;
-}
-
-.tips-card {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.tips-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  margin-bottom: 20rpx;
-  display: block;
-}
-
-.tips-content {
-  display: flex;
-  flex-direction: column;
-}
-
-.tip-item {
-  font-size: 26rpx;
-  color: #666;
-  margin-bottom: 10rpx;
-}

+ 0 - 110
miniprogram/pages/child-edit/child-edit.js

@@ -1,110 +0,0 @@
-// pages/child-edit/child-edit.js
-Page({
-  data: {
-    childId: 0,
-    child: null,
-    loading: false,
-    danLevels: [
-      { value: 'A1', label: 'A1 - 幼儿园小班' },
-      { value: 'A2', label: 'A2 - 幼儿园中班' },
-      { value: 'A3', label: 'A3 - 幼儿园大班' },
-      { value: 'B1', label: 'B1 - 小学一年级' },
-      { value: 'B2', label: 'B2 - 小学二年级' },
-      { value: 'B3', label: 'B3 - 小学三年级' },
-      { value: 'B4', label: 'B4 - 小学四年级' },
-      { value: 'B5', label: 'B5 - 小学五年级' },
-      { value: 'B6', label: 'B6 - 小学六年级' }
-    ],
-    themes: [
-      { value: 'default', label: '默认主题' },
-      { value: 'space', label: '太空主题' },
-      { value: 'ocean', label: '海洋主题' },
-      { value: 'forest', label: '森林主题' }
-    ]
-  },
-
-  onLoad(options) {
-    const childId = options.id || 0;
-    this.setData({ childId });
-    this.loadChildInfo();
-  },
-
-  loadChildInfo() {
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockChild = {
-      id: this.data.childId,
-      name: '小明',
-      age: 8,
-      grade: '小学二年级',
-      danLevel: 'B2',
-      theme: 'default',
-      penaltyEnabled: true
-    };
-
-    setTimeout(() => {
-      this.setData({
-        child: mockChild,
-        loading: false
-      });
-    }, 500);
-  },
-
-  onNameInput(e) {
-    this.setData({ 'child.name': e.detail.value });
-  },
-
-  onAgeInput(e) {
-    this.setData({ 'child.age': parseInt(e.detail.value) || 0 });
-  },
-
-  onGradeInput(e) {
-    this.setData({ 'child.grade': e.detail.value });
-  },
-
-  onDanLevelChange(e) {
-    this.setData({ 'child.danLevel': e.detail.value });
-  },
-
-  onThemeChange(e) {
-    this.setData({ 'child.theme': e.detail.value });
-  },
-
-  onPenaltyEnabledChange(e) {
-    this.setData({ 'child.penaltyEnabled': e.detail.value });
-  },
-
-  onSave() {
-    if (!this.data.child.name.trim()) {
-      wx.showToast({ title: '请输入孩子姓名', icon: 'none' });
-      return;
-    }
-
-    wx.showModal({
-      title: '确认保存',
-      content: '确定要保存孩子信息吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doSave();
-        }
-      }
-    });
-  },
-
-  doSave() {
-    wx.showLoading({ title: '保存中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      wx.showToast({
-        title: '保存成功',
-        icon: 'success'
-      });
-      
-      setTimeout(() => {
-        wx.navigateBack();
-      }, 1500);
-    }, 1000);
-  }
-});

+ 0 - 4
miniprogram/pages/child-edit/child-edit.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "编辑孩子信息",
-  "enablePullDownRefresh": false
-}

+ 0 - 75
miniprogram/pages/child-edit/child-edit.wxml

@@ -1,75 +0,0 @@
-<!--pages/child-edit/child-edit.wxml-->
-<view class="container">
-  <view class="loading" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-
-  <view class="edit-form" wx:else>
-    <view class="form-section">
-      <text class="section-title">基本信息</text>
-      
-      <view class="form-item">
-        <text class="form-label">姓名 <text class="required">*</text></text>
-        <input 
-          class="form-input"
-          placeholder="请输入孩子姓名"
-          value="{{child.name}}"
-          bindinput="onNameInput"
-        />
-      </view>
-
-      <view class="form-item">
-        <text class="form-label">年龄 <text class="required">*</text></text>
-        <input 
-          class="form-input"
-          type="number"
-          placeholder="请输入年龄"
-          value="{{child.age}}"
-          bindinput="onAgeInput"
-        />
-      </view>
-
-      <view class="form-item">
-        <text class="form-label">年级</text>
-        <input 
-          class="form-input"
-          placeholder="请输入年级(如:小学二年级)"
-          value="{{child.grade}}"
-          bindinput="onGradeInput"
-        />
-      </view>
-    </view>
-
-    <view class="form-section">
-      <text class="section-title">DAN测评等级</text>
-      <view class="form-item">
-        <text class="form-label">当前等级</text>
-        <picker mode="selector" range="{{danLevels}}" range-key="label" value="{{child.danLevel}}" bindchange="onDanLevelChange">
-          <view class="picker-value">{{child.danLevel}}</view>
-        </picker>
-      </view>
-      <text class="form-tip">DAN测评等级影响推荐任务类型和难度</text>
-    </view>
-
-    <view class="form-section">
-      <text class="section-title">个性化设置</text>
-      
-      <view class="form-item">
-        <text class="form-label">主题</text>
-        <picker mode="selector" range="{{themes}}" range-key="label" value="{{child.theme}}" bindchange="onThemeChange">
-          <view class="picker-value">{{child.theme}}</view>
-        </picker>
-      </view>
-
-      <view class="form-item">
-        <text class="form-label">扣分机制</text>
-        <switch checked="{{child.penaltyEnabled}}" bindchange="onPenaltyEnabledChange" color="#FF6B6B"/>
-      </view>
-      <text class="form-tip">6岁以下建议关闭扣分机制</text>
-    </view>
-
-    <view class="button-group">
-      <button class="save-btn" bindtap="onSave">保存信息</button>
-    </view>
-  </view>
-</view>

+ 0 - 92
miniprogram/pages/child-edit/child-edit.wxss

@@ -1,92 +0,0 @@
-/* pages/child-edit/child-edit.wxss */
-.container {
-  padding: 20rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 400rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-.form-section {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.section-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 30rpx;
-}
-
-.form-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 20rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.form-item:last-child {
-  border-bottom: none;
-}
-
-.form-label {
-  font-size: 30rpx;
-  color: #333;
-}
-
-.required {
-  color: #F44336;
-  margin-left: 10rpx;
-}
-
-.form-input {
-  flex: 1;
-  text-align: right;
-  font-size: 30rpx;
-  color: #666;
-  padding: 10rpx;
-}
-
-.picker-value {
-  font-size: 30rpx;
-  color: #666;
-  text-align: right;
-}
-
-.form-tip {
-  font-size: 24rpx;
-  color: #999;
-  display: block;
-  margin-top: 10rpx;
-}
-
-.button-group {
-  margin-top: 40rpx;
-  padding: 0 20rpx;
-}
-
-.save-btn {
-  background-color: #FF6B6B;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.save-btn::after {
-  border: none;
-}

+ 0 - 33
miniprogram/pages/child-home/child-home.js

@@ -1,33 +0,0 @@
-// pages/child-home/child-home.js
-Page({
-  data: {
-    childName: '小明',
-    streak: 5,
-    points: 120,
-    todayTasks: [
-      { id: 1, title: '写作业', points: 2, deadline: '20:00', completed: false },
-      { id: 2, title: '练琴', points: 3, deadline: '19:00', completed: false },
-      { id: 3, title: '阅读20分钟', points: 2, deadline: '21:00', completed: true }
-    ],
-    currentWish: {
-      name: '乐高星球大战',
-      current: 320,
-      total: 500
-    }
-  },
-
-  onShow() {
-    this.loadData();
-  },
-
-  loadData() {
-    // TODO: 从后端加载数据
-  },
-
-  onTaskTap(e) {
-    const taskId = e.currentTarget.dataset.id;
-    wx.navigateTo({ 
-      url: `/pages/task-detail/task-detail?id=${taskId}` 
-    });
-  }
-})

+ 0 - 5
miniprogram/pages/child-home/child-home.json

@@ -1,5 +0,0 @@
-{
-  "navigationBarTitleText": "知行益家",
-  "navigationBarBackgroundColor": "#FFE66D",
-  "navigationBarTextStyle": "black"
-}

+ 0 - 49
miniprogram/pages/child-home/child-home.wxml

@@ -1,49 +0,0 @@
-<!--pages/child-home/child-home.wxml-->
-<view class="container">
-  <view class="greeting">
-    <text class="greeting-text">你好,{{childName}}!</text>
-  </view>
-
-  <view class="streak-card">
-    <view class="streak-info">
-      <text class="streak-fire">🔥</text>
-      <text class="streak-text">已连续 {{streak}} 天</text>
-    </view>
-    <view class="progress-bar">
-      <view class="progress-fill" style="width: {{streak/14*100}}%"></view>
-    </view>
-    <text class="streak-tip">下个里程碑:连续14天 (+30分)</text>
-  </view>
-
-  <view class="points-card">
-    <text class="points-label">💰 我的积分</text>
-    <text class="points-value">{{points}}</text>
-    
-    <view class="wish-card" wx:if="{{currentWish}}">
-      <text class="wish-name">🎯 {{currentWish.name}}</text>
-      <view class="wish-progress">
-        <view class="wish-bar">
-          <view class="wish-fill" style="width: {{currentWish.current/currentWish.total*100}}%"></view>
-        </view>
-        <text class="wish-text">{{currentWish.current}}/{{currentWish.total}}</text>
-      </view>
-    </view>
-  </view>
-
-  <view class="tasks-section">
-    <text class="section-title">📋 今日任务</text>
-    <view class="task-item {{item.completed ? 'completed' : ''}}" 
-          wx:for="{{todayTasks}}" wx:key="id" 
-          bindtap="onTaskTap" data-id="{{item.id}}">
-      <view class="task-status">
-        <text wx:if="{{item.completed}}">✅</text>
-        <text wx:else>⏳</text>
-      </view>
-      <view class="task-info">
-        <text class="task-name">{{item.title}}</text>
-        <text class="task-deadline">截止 {{item.deadline}}</text>
-      </view>
-      <text class="task-points">+{{item.points}}分</text>
-    </view>
-  </view>
-</view>

+ 0 - 177
miniprogram/pages/child-home/child-home.wxss

@@ -1,177 +0,0 @@
-/* pages/child-home/child-home.wxss */
-.container {
-  min-height: 100vh;
-  background: linear-gradient(180deg, #FFE66D 0%, #f5f5f5 30%);
-  padding: 20rpx;
-  padding-bottom: 120rpx;
-  box-sizing: border-box;
-}
-
-.greeting {
-  padding: 30rpx;
-}
-
-.greeting-text {
-  font-size: 40rpx;
-  font-weight: bold;
-  color: #333;
-}
-
-.streak-card {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-}
-
-.streak-info {
-  display: flex;
-  align-items: center;
-  margin-bottom: 20rpx;
-}
-
-.streak-fire {
-  font-size: 48rpx;
-  margin-right: 15rpx;
-}
-
-.streak-text {
-  font-size: 36rpx;
-  font-weight: bold;
-  color: #FF6B6B;
-}
-
-.progress-bar {
-  height: 16rpx;
-  background: #eee;
-  border-radius: 8rpx;
-  overflow: hidden;
-  margin-bottom: 15rpx;
-}
-
-.progress-fill {
-  height: 100%;
-  background: linear-gradient(90deg, #FF6B6B, #FFE66D);
-  border-radius: 8rpx;
-}
-
-.streak-tip {
-  font-size: 22rpx;
-  color: #999;
-}
-
-.points-card {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  text-align: center;
-}
-
-.points-label {
-  font-size: 28rpx;
-  color: #666;
-  display: block;
-  margin-bottom: 15rpx;
-}
-
-.points-value {
-  font-size: 80rpx;
-  font-weight: bold;
-  color: #FFD700;
-  display: block;
-  margin-bottom: 20rpx;
-}
-
-.wish-card {
-  background: #f9f9f9;
-  border-radius: 16rpx;
-  padding: 20rpx;
-}
-
-.wish-name {
-  font-size: 28rpx;
-  color: #333;
-  display: block;
-  margin-bottom: 15rpx;
-}
-
-.wish-progress {
-  display: flex;
-  align-items: center;
-}
-
-.wish-bar {
-  flex: 1;
-  height: 16rpx;
-  background: #e0e0e0;
-  border-radius: 8rpx;
-  overflow: hidden;
-  margin-right: 15rpx;
-}
-
-.wish-fill {
-  height: 100%;
-  background: linear-gradient(90deg, #4CAF50, #8BC34A);
-  border-radius: 8rpx;
-}
-
-.wish-text {
-  font-size: 24rpx;
-  color: #666;
-}
-
-.tasks-section {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-}
-
-.section-title {
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 20rpx;
-}
-
-.task-item {
-  display: flex;
-  align-items: center;
-  padding: 25rpx;
-  background: #f9f9f9;
-  border-radius: 16rpx;
-  margin-bottom: 20rpx;
-}
-
-.task-item.completed {
-  opacity: 0.6;
-}
-
-.task-status {
-  font-size: 40rpx;
-  margin-right: 20rpx;
-}
-
-.task-info {
-  flex: 1;
-}
-
-.task-name {
-  font-size: 30rpx;
-  color: #333;
-  display: block;
-}
-
-.task-deadline {
-  font-size: 22rpx;
-  color: #999;
-  margin-top: 8rpx;
-  display: block;
-}
-
-.task-points {
-  font-size: 28rpx;
-  font-weight: bold;
-  color: #FFD700;
-}

+ 0 - 171
miniprogram/pages/family-manage/family-manage.js

@@ -1,171 +0,0 @@
-// pages/family-manage/family-manage.js
-Page({
-  data: {
-    family: null,
-    members: [],
-    loading: false,
-    isCreator: true
-  },
-
-  onLoad() {
-    this.loadFamilyInfo();
-  },
-
-  onShow() {
-    this.loadFamilyInfo();
-  },
-
-  loadFamilyInfo() {
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockFamily = {
-      id: 1,
-      name: '快乐家庭',
-      inviteCode: 'ABC123',
-      memberCount: 4,
-      createdAt: '2026-03-20 10:00'
-    };
-
-    const mockMembers = [
-      { id: 1, nickname: '爸爸', role: 'parent', avatar: '', isCreator: true },
-      { id: 2, nickname: '妈妈', role: 'parent', avatar: '', isCreator: false },
-      { id: 3, nickname: '小明', role: 'child', avatar: '', isCreator: false },
-      { id: 4, nickname: '小红', role: 'child', avatar: '', isCreator: false }
-    ];
-
-    setTimeout(() => {
-      this.setData({
-        family: mockFamily,
-        members: mockMembers,
-        loading: false
-      });
-    }, 500);
-  },
-
-  onEditFamilyName() {
-    wx.showModal({
-      title: '修改家庭名称',
-      editable: true,
-      placeholderText: '请输入新的家庭名称',
-      success: (res) => {
-        if (res.confirm && res.content) {
-          this.doUpdateFamilyName(res.content);
-        }
-      }
-    });
-  },
-
-  doUpdateFamilyName(name) {
-    wx.showLoading({ title: '修改中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      this.setData({ 'family.name': name });
-      wx.showToast({
-        title: '修改成功',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  onCopyInviteCode() {
-    wx.setClipboardData({
-      data: this.data.family.inviteCode,
-      success: () => {
-        wx.showToast({
-          title: '邀请码已复制',
-          icon: 'success'
-        });
-      }
-    });
-  },
-
-  onRefreshInviteCode() {
-    wx.showModal({
-      title: '刷新邀请码',
-      content: '确定要刷新邀请码吗?旧邀请码将失效。',
-      success: (res) => {
-        if (res.confirm) {
-          this.doRefreshInviteCode();
-        }
-      }
-    });
-  },
-
-  doRefreshInviteCode() {
-    wx.showLoading({ title: '刷新中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      const newCode = 'XYZ' + Math.floor(Math.random() * 1000);
-      this.setData({ 'family.inviteCode': newCode });
-      wx.showToast({
-        title: '刷新成功',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  onRemoveMember(e) {
-    const memberId = e.currentTarget.dataset.id;
-    const member = this.data.members.find(m => m.id === memberId);
-    
-    wx.showModal({
-      title: '移除成员',
-      content: `确定要移除成员「${member.nickname}」吗?`,
-      success: (res) => {
-        if (res.confirm) {
-          this.doRemoveMember(memberId);
-        }
-      }
-    });
-  },
-
-  doRemoveMember(memberId) {
-    wx.showLoading({ title: '移除中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      const members = this.data.members.filter(m => m.id !== memberId);
-      this.setData({ 
-        members,
-        'family.memberCount': members.length
-      });
-      wx.showToast({
-        title: '移除成功',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  onLeaveFamily() {
-    wx.showModal({
-      title: '确认退出',
-      content: '确定要退出这个家庭吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doLeaveFamily();
-        }
-      }
-    });
-  },
-
-  doLeaveFamily() {
-    wx.showLoading({ title: '退出中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      wx.showToast({
-        title: '已退出家庭',
-        icon: 'success'
-      });
-      
-      setTimeout(() => {
-        wx.reLaunch({
-          url: '/pages/login/login'
-        });
-      }, 1500);
-    }, 1000);
-  }
-});

+ 0 - 4
miniprogram/pages/family-manage/family-manage.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "家庭管理",
-  "enablePullDownRefresh": false
-}

+ 0 - 68
miniprogram/pages/family-manage/family-manage.wxml

@@ -1,68 +0,0 @@
-<!--pages/family-manage/family-manage.wxml-->
-<view class="container">
-  <view class="loading" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-
-  <view class="family-info" wx:else>
-    <!-- 家庭基本信息 -->
-    <view class="info-card">
-      <view class="info-header">
-        <text class="info-title">家庭信息</text>
-        <text class="edit-btn" wx:if="{{isCreator}}" bindtap="onEditFamilyName">编辑</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">家庭名称</text>
-        <text class="info-value">{{family.name}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">邀请码</text>
-        <view class="invite-code">
-          <text class="code-text">{{family.inviteCode}}</text>
-          <text class="copy-btn" bindtap="onCopyInviteCode">复制</text>
-          <text class="refresh-btn" wx:if="{{isCreator}}" bindtap="onRefreshInviteCode">刷新</text>
-        </view>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">成员数量</text>
-        <text class="info-value">{{family.memberCount}}人</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">创建时间</text>
-        <text class="info-value">{{family.createdAt}}</text>
-      </view>
-    </view>
-
-    <!-- 家庭成员 -->
-    <view class="members-card">
-      <text class="card-title">家庭成员</text>
-      
-      <view class="member-list">
-        <view class="member-item" wx:for="{{members}}" wx:key="id">
-          <view class="member-avatar">
-            <image class="avatar-image" src="{{item.avatar || '/images/default-avatar.svg'}}" mode="aspectFill"></image>
-            <view class="creator-badge" wx:if="{{item.isCreator}}">创建者</view>
-          </view>
-          
-          <view class="member-info">
-            <text class="member-name">{{item.nickname}}</text>
-            <text class="member-role">{{item.role === 'parent' ? '家长' : '孩子'}}</text>
-          </view>
-          
-          <view class="member-actions" wx:if="{{isCreator && !item.isCreator}}">
-            <text class="remove-btn" data-id="{{item.id}}" bindtap="onRemoveMember">移除</text>
-          </view>
-        </view>
-      </view>
-    </view>
-
-    <!-- 操作按钮 -->
-    <view class="action-buttons">
-      <button class="leave-btn" bindtap="onLeaveFamily">退出家庭</button>
-    </view>
-  </view>
-</view>

+ 0 - 176
miniprogram/pages/family-manage/family-manage.wxss

@@ -1,176 +0,0 @@
-/* pages/family-manage/family-manage.wxss */
-.container {
-  padding: 20rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 400rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-.info-card, .members-card {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.info-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 30rpx;
-}
-
-.info-title, .card-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-}
-
-.edit-btn {
-  font-size: 28rpx;
-  color: #FF6B6B;
-  padding: 10rpx 20rpx;
-  border: 2rpx solid #FF6B6B;
-  border-radius: 20rpx;
-}
-
-.info-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 20rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.info-item:last-child {
-  border-bottom: none;
-}
-
-.info-label {
-  font-size: 28rpx;
-  color: #666;
-}
-
-.info-value {
-  font-size: 28rpx;
-  color: #333;
-  font-weight: bold;
-}
-
-.invite-code {
-  display: flex;
-  align-items: center;
-}
-
-.code-text {
-  font-size: 28rpx;
-  color: #FF6B6B;
-  font-weight: bold;
-  margin-right: 20rpx;
-}
-
-.copy-btn, .refresh-btn {
-  font-size: 24rpx;
-  color: #2196F3;
-  padding: 4rpx 12rpx;
-  border: 2rpx solid #2196F3;
-  border-radius: 16rpx;
-  margin-left: 10rpx;
-}
-
-.refresh-btn {
-  color: #FF9800;
-  border-color: #FF9800;
-}
-
-.member-list {
-  margin-top: 20rpx;
-}
-
-.member-item {
-  display: flex;
-  align-items: center;
-  padding: 20rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.member-item:last-child {
-  border-bottom: none;
-}
-
-.member-avatar {
-  position: relative;
-  margin-right: 20rpx;
-}
-
-.avatar-image {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  border: 2rpx solid #eee;
-}
-
-.creator-badge {
-  position: absolute;
-  bottom: -10rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  background-color: #FF6B6B;
-  color: #fff;
-  font-size: 20rpx;
-  padding: 2rpx 10rpx;
-  border-radius: 10rpx;
-}
-
-.member-info {
-  flex: 1;
-}
-
-.member-name {
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 5rpx;
-}
-
-.member-role {
-  font-size: 24rpx;
-  color: #999;
-}
-
-.remove-btn {
-  font-size: 28rpx;
-  color: #F44336;
-  padding: 10rpx 20rpx;
-  border: 2rpx solid #F44336;
-  border-radius: 20rpx;
-}
-
-.action-buttons {
-  margin-top: 40rpx;
-  padding: 0 20rpx;
-}
-
-.leave-btn {
-  background-color: #fff;
-  color: #F44336;
-  border: 2rpx solid #F44336;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.leave-btn::after {
-  border: none;
-}

+ 0 - 28
miniprogram/pages/index/index.js

@@ -1,28 +0,0 @@
-// pages/index/index.js
-const app = getApp();
-
-Page({
-  data: {
-    loading: true
-  },
-
-  onLoad() {
-    this.checkLoginAndRedirect();
-  },
-
-  checkLoginAndRedirect() {
-    // 检查是否已登录
-    if (!app.globalData.token) {
-      wx.redirectTo({ url: '/pages/login/login' });
-      return;
-    }
-    
-    // 根据角色跳转
-    const role = app.globalData.role;
-    if (role === 'parent') {
-      wx.switchTab({ url: '/pages/parent-home/parent-home' });
-    } else {
-      wx.switchTab({ url: '/pages/child-home/child-home' });
-    }
-  }
-})

+ 0 - 4
miniprogram/pages/index/index.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "知行益家",
-  "navigationStyle": "custom"
-}

+ 0 - 9
miniprogram/pages/index/index.wxml

@@ -1,9 +0,0 @@
-<!--pages/index/index.wxml-->
-<view class="container">
-  <image class="logo" src="/images/logo.png" mode="aspectFit"/>
-  <text class="title">知行益家</text>
-  <text class="subtitle">用心了解,科学培养</text>
-  <view class="loading" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-</view>

+ 0 - 37
miniprogram/pages/index/index.wxss

@@ -1,37 +0,0 @@
-/* pages/index/index.wxss */
-.container {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  height: 100vh;
-  background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
-}
-
-.logo {
-  width: 200rpx;
-  height: 200rpx;
-  margin-bottom: 40rpx;
-  border-radius: 40rpx;
-}
-
-.title {
-  font-size: 48rpx;
-  font-weight: bold;
-  color: #fff;
-  margin-bottom: 20rpx;
-}
-
-.subtitle {
-  font-size: 28rpx;
-  color: rgba(255, 255, 255, 0.8);
-}
-
-.loading {
-  margin-top: 60rpx;
-}
-
-.loading text {
-  color: rgba(255, 255, 255, 0.6);
-  font-size: 24rpx;
-}

+ 0 - 79
miniprogram/pages/login/login.js

@@ -1,79 +0,0 @@
-// pages/login/login.js
-const app = getApp();
-const api = require('../../utils/api');
-
-Page({
-  data: {
-    role: 'parent', // parent 或 child
-    loading: false
-  },
-
-  onLoad() {
-    // 检查是否已登录
-    if (app.globalData.token) {
-      this.redirectByRole();
-    }
-  },
-
-  // 选择角色
-  onRoleSelect(e) {
-    this.setData({ role: e.currentTarget.dataset.role });
-  },
-
-  // 微信登录
-  async onWechatLogin() {
-    if (this.data.loading) return;
-    
-    this.setData({ loading: true });
-    
-    try {
-      // 获取微信登录code
-      const loginRes = await new Promise((resolve, reject) => {
-        wx.login({
-          success: resolve,
-          fail: reject
-        });
-      });
-
-      // 调用后端登录接口
-      const result = await api.login({
-        code: loginRes.code,
-        role: this.data.role
-      });
-
-      // 保存登录信息
-      app.globalData.token = result.token;
-      app.globalData.role = result.role;
-      wx.setStorageSync('token', result.token);
-      wx.setStorageSync('role', result.role);
-
-      wx.showToast({
-        title: '登录成功',
-        icon: 'success'
-      });
-
-      // 跳转到对应首页
-      setTimeout(() => {
-        this.redirectByRole();
-      }, 1000);
-
-    } catch (err) {
-      console.error('登录失败:', err);
-      wx.showToast({
-        title: '登录失败',
-        icon: 'none'
-      });
-    } finally {
-      this.setData({ loading: false });
-    }
-  },
-
-  // 根据角色跳转
-  redirectByRole() {
-    if (this.data.role === 'parent') {
-      wx.switchTab({ url: '/pages/parent-home/parent-home' });
-    } else {
-      wx.switchTab({ url: '/pages/child-home/child-home' });
-    }
-  }
-})

+ 0 - 4
miniprogram/pages/login/login.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "登录",
-  "navigationStyle": "custom"
-}

+ 0 - 32
miniprogram/pages/login/login.wxml

@@ -1,32 +0,0 @@
-<!--pages/login/login.wxml-->
-<view class="container">
-  <view class="header">
-    <image class="logo" src="/images/logo.png" mode="aspectFit"/>
-    <text class="title">知行益家</text>
-    <text class="subtitle">用心了解,科学培养</text>
-  </view>
-
-  <view class="role-select">
-    <text class="role-title">请选择您的身份</text>
-    <view class="role-options">
-      <view class="role-item {{role === 'parent' ? 'active' : ''}}" data-role="parent" bindtap="onRoleSelect">
-        <text class="role-icon">👨‍👩‍👧‍👦</text>
-        <text class="role-name">家长</text>
-        <text class="role-desc">管理任务、审批奖励</text>
-      </view>
-      <view class="role-item {{role === 'child' ? 'active' : ''}}" data-role="child" bindtap="onRoleSelect">
-        <text class="role-icon">🧒</text>
-        <text class="role-name">孩子</text>
-        <text class="role-desc">完成任务、获取积分</text>
-      </view>
-    </view>
-  </view>
-
-  <button class="login-btn" bindtap="onWechatLogin" loading="{{loading}}">
-    微信一键登录
-  </button>
-
-  <text class="agreement">
-    登录即表示同意《用户服务协议》和《隐私政策》
-  </text>
-</view>

+ 0 - 112
miniprogram/pages/login/login.wxss

@@ -1,112 +0,0 @@
-/* pages/login/login.wxss */
-.container {
-  min-height: 100vh;
-  background: linear-gradient(180deg, #FF6B6B 0%, #FFE66D 100%);
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 100rpx 40rpx;
-  box-sizing: border-box;
-}
-
-.header {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  margin-bottom: 80rpx;
-}
-
-.logo {
-  width: 180rpx;
-  height: 180rpx;
-  border-radius: 36rpx;
-  margin-bottom: 30rpx;
-}
-
-.title {
-  font-size: 52rpx;
-  font-weight: bold;
-  color: #fff;
-  margin-bottom: 15rpx;
-}
-
-.subtitle {
-  font-size: 28rpx;
-  color: rgba(255, 255, 255, 0.85);
-}
-
-.role-select {
-  width: 100%;
-  margin-bottom: 60rpx;
-}
-
-.role-title {
-  font-size: 32rpx;
-  color: #333;
-  text-align: center;
-  display: block;
-  margin-bottom: 30rpx;
-}
-
-.role-options {
-  display: flex;
-  justify-content: space-around;
-}
-
-.role-item {
-  width: 280rpx;
-  padding: 40rpx 20rpx;
-  background: #fff;
-  border-radius: 20rpx;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
-  transition: all 0.3s;
-}
-
-.role-item.active {
-  border: 4rpx solid #FF6B6B;
-  transform: scale(1.05);
-}
-
-.role-icon {
-  font-size: 60rpx;
-  margin-bottom: 15rpx;
-}
-
-.role-name {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  margin-bottom: 10rpx;
-}
-
-.role-desc {
-  font-size: 22rpx;
-  color: #999;
-  text-align: center;
-}
-
-.login-btn {
-  width: 80%;
-  height: 90rpx;
-  background: #FF6B6B;
-  color: #fff;
-  font-size: 32rpx;
-  font-weight: bold;
-  border-radius: 45rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-bottom: 30rpx;
-}
-
-.login-btn::after {
-  border: none;
-}
-
-.agreement {
-  font-size: 22rpx;
-  color: rgba(255, 255, 255, 0.7);
-}

+ 0 - 56
miniprogram/pages/parent-home/parent-home.js

@@ -1,56 +0,0 @@
-// pages/parent-home/parent-home.js
-const app = getApp();
-
-Page({
-  data: {
-    greeting: '你好',
-    children: [],
-    pendingReview: 0,
-    todayTasks: 0,
-    completedTasks: 0
-  },
-
-  onLoad() {
-    this.updateGreeting();
-  },
-
-  onShow() {
-    this.loadData();
-  },
-
-  updateGreeting() {
-    const hour = new Date().getHours();
-    let greeting = '你好';
-    if (hour < 6) greeting = '夜深了';
-    else if (hour < 9) greeting = '早上好';
-    else if (hour < 12) greeting = '上午好';
-    else if (hour < 14) greeting = '中午好';
-    else if (hour < 18) greeting = '下午好';
-    else greeting = '晚上好';
-    this.setData({ greeting });
-  },
-
-  loadData() {
-    // TODO: 加载孩子列表和任务统计
-    this.setData({
-      children: [
-        { id: 1, name: '小明', streak: 5, points: 120, completed: 3, total: 5 },
-        { id: 2, name: '小红', streak: 3, points: 85, completed: 2, total: 4 }
-      ],
-      pendingReview: 2,
-      todayTasks: 5,
-      completedTasks: 3
-    });
-  },
-
-  onPublishTask() {
-    wx.navigateTo({ url: '/pages/task-create/task-create' });
-  },
-
-  onChildTap(e) {
-    const childId = e.currentTarget.dataset.id;
-    wx.navigateTo({ 
-      url: `/pages/task-list/task-list?childId=${childId}` 
-    });
-  }
-})

+ 0 - 5
miniprogram/pages/parent-home/parent-home.json

@@ -1,5 +0,0 @@
-{
-  "navigationBarTitleText": "知行益家",
-  "navigationBarBackgroundColor": "#FF6B6B",
-  "navigationBarTextStyle": "white"
-}

+ 0 - 44
miniprogram/pages/parent-home/parent-home.wxml

@@ -1,44 +0,0 @@
-<!--pages/parent-home/parent-home.wxml-->
-<view class="container">
-  <view class="header">
-    <view class="greeting">
-      <text class="greeting-text">{{greeting}},爸爸</text>
-      <text class="greeting-sub" wx:if="{{pendingReview > 0}}">今天有 {{pendingReview}} 个待审核任务</text>
-    </view>
-    <view class="avatar">👤</view>
-  </view>
-
-  <view class="overview">
-    <text class="section-title">📊 今日概览</text>
-    <view class="overview-cards">
-      <view class="overview-card">
-        <text class="card-value">{{pendingReview}}</text>
-        <text class="card-label">待审核</text>
-      </view>
-      <view class="overview-card">
-        <text class="card-value">{{todayTasks - completedTasks}}</text>
-        <text class="card-label">待完成</text>
-      </view>
-      <view class="overview-card">
-        <text class="card-value">{{completedTasks}}</text>
-        <text class="card-label">已完成</text>
-      </view>
-    </view>
-  </view>
-
-  <view class="children-section">
-    <text class="section-title">👶 孩子状态</text>
-    <view class="child-card" wx:for="{{children}}" wx:key="id" bindtap="onChildTap" data-id="{{item.id}}">
-      <view class="child-info">
-        <text class="child-name">{{item.name}}</text>
-        <text class="child-stats">🔥 连续{{item.streak}}天 · 💰 {{item.points}}分</text>
-        <text class="child-progress">今日任务:{{item.completed}}/{{item.total}} 完成</text>
-      </view>
-      <text class="child-arrow">></text>
-    </view>
-  </view>
-
-  <view class="publish-btn" bindtap="onPublishTask">
-    <text>+ 发布新任务</text>
-  </view>
-</view>

+ 0 - 144
miniprogram/pages/parent-home/parent-home.wxss

@@ -1,144 +0,0 @@
-/* pages/parent-home/parent-home.wxss */
-.container {
-  min-height: 100vh;
-  background: #f5f5f5;
-  padding: 20rpx;
-  box-sizing: border-box;
-}
-
-.header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 30rpx;
-  background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
-  border-radius: 20rpx;
-  margin-bottom: 20rpx;
-}
-
-.greeting-text {
-  font-size: 36rpx;
-  font-weight: bold;
-  color: #fff;
-  display: block;
-}
-
-.greeting-sub {
-  font-size: 24rpx;
-  color: rgba(255, 255, 255, 0.8);
-  margin-top: 10rpx;
-}
-
-.avatar {
-  width: 80rpx;
-  height: 80rpx;
-  background: rgba(255, 255, 255, 0.3);
-  border-radius: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 40rpx;
-}
-
-.section-title {
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #333;
-  margin-bottom: 20rpx;
-  display: block;
-}
-
-.overview {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-}
-
-.overview-cards {
-  display: flex;
-  justify-content: space-around;
-}
-
-.overview-card {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-
-.card-value {
-  font-size: 48rpx;
-  font-weight: bold;
-  color: #FF6B6B;
-}
-
-.card-label {
-  font-size: 24rpx;
-  color: #999;
-  margin-top: 10rpx;
-}
-
-.children-section {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 30rpx;
-  margin-bottom: 120rpx;
-}
-
-.child-card {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 30rpx;
-  background: #f9f9f9;
-  border-radius: 16rpx;
-  margin-bottom: 20rpx;
-}
-
-.child-info {
-  flex: 1;
-}
-
-.child-name {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-}
-
-.child-stats {
-  font-size: 24rpx;
-  color: #FF6B6B;
-  margin-top: 10rpx;
-  display: block;
-}
-
-.child-progress {
-  font-size: 22rpx;
-  color: #999;
-  margin-top: 5rpx;
-  display: block;
-}
-
-.child-arrow {
-  font-size: 32rpx;
-  color: #ccc;
-}
-
-.publish-btn {
-  position: fixed;
-  bottom: 40rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  width: 80%;
-  height: 90rpx;
-  background: #FF6B6B;
-  color: #fff;
-  font-size: 32rpx;
-  font-weight: bold;
-  border-radius: 45rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  box-shadow: 0 8rpx 20rpx rgba(255, 107, 107, 0.4);
-}

+ 0 - 261
miniprogram/pages/points-log/points-log.js

@@ -1,261 +0,0 @@
-// pages/points-log/points-log.js
-const app = getApp();
-const api = require('../../utils/api.js');
-
-Page({
-  data: {
-    childId: 0,
-    childName: '',
-    totalPoints: 0,
-    monthPoints: 0,
-    logs: [],
-    filteredLogs: [],
-    dateType: 'month', // today, week, month, all
-    typeFilter: 'all', // all, earn, spend, bonus, penalty, adjust, reset, refund
-    loading: false,
-    hasMore: true,
-    page: 1
-  },
-
-  onLoad(options) {
-    const childId = options.childId || 0;
-    const childName = options.childName || '';
-    this.setData({ childId, childName });
-    wx.setNavigationBarTitle({ title: childName ? `${childName}的积分记录` : '积分记录' });
-  },
-
-  onShow() {
-    this.loadPointsLog();
-  },
-
-  // 加载积分记录
-  loadPointsLog(refresh = false) {
-    if (refresh) {
-      this.setData({ page: 1, hasMore: true });
-    }
-    
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockLogs = [
-      {
-        id: 1,
-        childId: 1,
-        amount: 2,
-        type: 'earn',
-        description: '完成任务:写作业',
-        taskTitle: '写作业',
-        createdAt: '2026-03-31 20:30'
-      },
-      {
-        id: 2,
-        childId: 1,
-        amount: 3,
-        type: 'earn',
-        description: '完成任务:练琴',
-        taskTitle: '练琴',
-        createdAt: '2026-03-31 19:30'
-      },
-      {
-        id: 3,
-        childId: 1,
-        amount: 1,
-        type: 'bonus',
-        description: '提前完成奖励',
-        taskTitle: '阅读20分钟',
-        createdAt: '2026-03-31 20:00'
-      },
-      {
-        id: 4,
-        childId: 1,
-        amount: -1,
-        type: 'penalty',
-        description: '任务超时扣分',
-        taskTitle: '整理房间',
-        createdAt: '2026-03-30 21:30'
-      },
-      {
-        id: 5,
-        childId: 1,
-        amount: -30,
-        type: 'spend',
-        description: '兑换奖励:看动画片30分钟',
-        rewardTitle: '看动画片30分钟',
-        createdAt: '2026-03-30 18:00'
-      },
-      {
-        id: 6,
-        childId: 1,
-        amount: 5,
-        type: 'earn',
-        description: '完成任务:背单词',
-        taskTitle: '背单词',
-        createdAt: '2026-03-29 19:00'
-      },
-      {
-        id: 7,
-        childId: 1,
-        amount: -100,
-        type: 'reset',
-        description: '月度积分清零',
-        createdAt: '2026-03-01 00:00'
-      }
-    ];
-
-    setTimeout(() => {
-      this.setData({
-        logs: mockLogs,
-        filteredLogs: mockLogs,
-        loading: false,
-        totalPoints: 120,
-        monthPoints: 45
-      });
-      this.applyFilters();
-    }, 500);
-  },
-
-  // 切换日期类型
-  onDateTypeChange(e) {
-    this.setData({ dateType: e.currentTarget.dataset.type });
-    this.applyFilters();
-  },
-
-  // 切换类型筛选
-  onTypeFilterChange(e) {
-    this.setData({ typeFilter: e.currentTarget.dataset.type });
-    this.applyFilters();
-  },
-
-  // 应用筛选
-  applyFilters() {
-    let filtered = this.data.logs;
-    
-    // 按类型筛选
-    if (this.data.typeFilter !== 'all') {
-      filtered = filtered.filter(log => log.type === this.data.typeFilter);
-    }
-    
-    // 按日期筛选
-    const now = new Date();
-    if (this.data.dateType === 'today') {
-      filtered = filtered.filter(log => {
-        const logDate = new Date(log.createdAt);
-        return logDate.toDateString() === now.toDateString();
-      });
-    } else if (this.data.dateType === 'week') {
-      const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
-      filtered = filtered.filter(log => {
-        const logDate = new Date(log.createdAt);
-        return logDate >= weekAgo;
-      });
-    } else if (this.data.dateType === 'month') {
-      const monthAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000);
-      filtered = filtered.filter(log => {
-        const logDate = new Date(log.createdAt);
-        return logDate >= monthAgo;
-      });
-    }
-    
-    this.setData({ filteredLogs: filtered });
-  },
-
-  // 获取类型图标
-  getTypeIcon(type) {
-    const icons = {
-      earn: '✅',
-      spend: '🎁',
-      bonus: '🌟',
-      penalty: '⚠️',
-      adjust: '🔧',
-      reset: '🔄',
-      refund: '↩️'
-    };
-    return icons[type] || '📝';
-  },
-
-  // 获取类型颜色
-  getTypeColor(type) {
-    const colors = {
-      earn: '#4CAF50',
-      spend: '#2196F3',
-      bonus: '#FF9800',
-      penalty: '#F44336',
-      adjust: '#9C27B0',
-      reset: '#607D8B',
-      refund: '#009688'
-    };
-    return colors[type] || '#999';
-  },
-
-  // 获取类型名称
-  getTypeName(type) {
-    const names = {
-      earn: '获得',
-      spend: '兑换',
-      bonus: '奖励',
-      penalty: '扣分',
-      adjust: '调整',
-      reset: '清零',
-      refund: '退还'
-    };
-    return names[type] || '其他';
-  },
-
-  // 下拉刷新
-  onPullDownRefresh() {
-    this.loadPointsLog(true);
-    wx.stopPullDownRefresh();
-  },
-
-  // 加载更多
-  onReachBottom() {
-    if (this.data.hasMore && !this.data.loading) {
-      this.loadMoreLogs();
-    }
-  },
-
-  loadMoreLogs() {
-    // 实现加载更多逻辑
-  },
-
-  // 导出记录
-  onExport() {
-    wx.showActionSheet({
-      itemList: ['导出为Excel', '导出为PDF', '分享记录'],
-      success: (res) => {
-        switch (res.tapIndex) {
-          case 0:
-            this.exportToExcel();
-            break;
-          case 1:
-            this.exportToPDF();
-            break;
-          case 2:
-            this.shareRecords();
-            break;
-        }
-      }
-    });
-  },
-
-  exportToExcel() {
-    wx.showToast({
-      title: '导出Excel功能开发中',
-      icon: 'none'
-    });
-  },
-
-  exportToPDF() {
-    wx.showToast({
-      title: '导出PDF功能开发中',
-      icon: 'none'
-    });
-  },
-
-  shareRecords() {
-    wx.showShareMenu({
-      withShareTicket: true,
-      menus: ['shareAppMessage', 'shareTimeline']
-    });
-  }
-});

+ 0 - 5
miniprogram/pages/points-log/points-log.json

@@ -1,5 +0,0 @@
-{
-  "navigationBarTitleText": "积分记录",
-  "enablePullDownRefresh": true,
-  "backgroundColor": "#f5f5f5"
-}

+ 0 - 117
miniprogram/pages/points-log/points-log.wxml

@@ -1,117 +0,0 @@
-<!--pages/points-log/points-log.wxml-->
-<view class="container">
-  <!-- 积分概览 -->
-  <view class="points-overview">
-    <view class="overview-item">
-      <text class="overview-label">总积分</text>
-      <text class="overview-value">{{totalPoints}}</text>
-    </view>
-    <view class="overview-divider"></view>
-    <view class="overview-item">
-      <text class="overview-label">本月积分</text>
-      <text class="overview-value month">{{monthPoints}}</text>
-    </view>
-  </view>
-
-  <!-- 筛选栏 -->
-  <view class="filter-bar">
-    <view class="date-filter">
-      <view 
-        class="filter-item {{dateType === 'today' ? 'active' : ''}}"
-        data-type="today"
-        bindtap="onDateTypeChange"
-      >今日</view>
-      <view 
-        class="filter-item {{dateType === 'week' ? 'active' : ''}}"
-        data-type="week"
-        bindtap="onDateTypeChange"
-      >本周</view>
-      <view 
-        class="filter-item {{dateType === 'month' ? 'active' : ''}}"
-        data-type="month"
-        bindtap="onDateTypeChange"
-      >本月</view>
-      <view 
-        class="filter-item {{dateType === 'all' ? 'active' : ''}}"
-        data-type="all"
-        bindtap="onDateTypeChange"
-      >全部</view>
-    </view>
-    
-    <view class="type-filter">
-      <view 
-        class="filter-item {{typeFilter === 'all' ? 'active' : ''}}"
-        data-type="all"
-        bindtap="onTypeFilterChange"
-      >全部</view>
-      <view 
-        class="filter-item {{typeFilter === 'earn' ? 'active' : ''}}"
-        data-type="earn"
-        bindtap="onTypeFilterChange"
-      >获得</view>
-      <view 
-        class="filter-item {{typeFilter === 'spend' ? 'active' : ''}}"
-        data-type="spend"
-        bindtap="onTypeFilterChange"
-      >兑换</view>
-      <view 
-        class="filter-item {{typeFilter === 'bonus' ? 'active' : ''}}"
-        data-type="bonus"
-        bindtap="onTypeFilterChange"
-      >奖励</view>
-      <view 
-        class="filter-item {{typeFilter === 'penalty' ? 'active' : ''}}"
-        data-type="penalty"
-        bindtap="onTypeFilterChange"
-      >扣分</view>
-    </view>
-  </view>
-
-  <!-- 积分记录列表 -->
-  <view class="log-list">
-    <!-- 加载状态 -->
-    <view class="loading" wx:if="{{loading}}">
-      <text>加载中...</text>
-    </view>
-    
-    <!-- 记录列表 -->
-    <block wx:else>
-      <block wx:if="{{filteredLogs.length > 0}}">
-        <view 
-          class="log-item"
-          wx:for="{{filteredLogs}}"
-          wx:key="id"
-        >
-          <view class="log-icon" style="background-color: {{getTypeColor(item.type)}}">
-            <text>{{getTypeIcon(item.type)}}</text>
-          </view>
-          
-          <view class="log-content">
-            <view class="log-header">
-              <text class="log-type">{{getTypeName(item.type)}}</text>
-              <text class="log-amount {{item.amount > 0 ? 'positive' : 'negative'}}">
-                {{item.amount > 0 ? '+' : ''}}{{item.amount}}
-              </text>
-            </view>
-            
-            <text class="log-description">{{item.description}}</text>
-            <text class="log-time">{{item.createdAt}}</text>
-          </view>
-        </view>
-      </block>
-      
-      <!-- 空状态 -->
-      <view class="empty-state" wx:else>
-        <image class="empty-icon" src="/images/empty-log.svg" mode="aspectFit"></image>
-        <text class="empty-text">暂无积分记录</text>
-        <text class="empty-desc">完成任务或兑换奖励后将在这里显示</text>
-      </view>
-    </block>
-  </view>
-
-  <!-- 导出按钮 -->
-  <view class="export-btn" bindtap="onExport">
-    <text class="export-icon">📊</text>
-    <text class="export-text">导出记录</text>
-  </view>
-</view>

+ 0 - 210
miniprogram/pages/points-log/points-log.wxss

@@ -1,210 +0,0 @@
-/* pages/points-log/points-log.wxss */
-.container {
-  padding: 20rpx;
-  padding-bottom: 120rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-/* 积分概览 */
-.points-overview {
-  display: flex;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.overview-item {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-
-.overview-label {
-  font-size: 28rpx;
-  color: #666;
-  margin-bottom: 10rpx;
-}
-
-.overview-value {
-  font-size: 48rpx;
-  font-weight: bold;
-  color: #FF6B6B;
-}
-
-.overview-value.month {
-  color: #4CAF50;
-}
-
-.overview-divider {
-  width: 1rpx;
-  background-color: #eee;
-  margin: 0 40rpx;
-}
-
-/* 筛选栏 */
-.filter-bar {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.date-filter, .type-filter {
-  display: flex;
-  margin-bottom: 20rpx;
-}
-
-.date-filter:last-child, .type-filter:last-child {
-  margin-bottom: 0;
-}
-
-.filter-item {
-  flex: 1;
-  text-align: center;
-  padding: 16rpx 0;
-  font-size: 28rpx;
-  color: #666;
-  border-radius: 8rpx;
-  margin-right: 10rpx;
-  background-color: #f5f5f5;
-}
-
-.filter-item:last-child {
-  margin-right: 0;
-}
-
-.filter-item.active {
-  background-color: #FF6B6B;
-  color: #fff;
-}
-
-/* 积分记录列表 */
-.log-list {
-  margin-bottom: 40rpx;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 200rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-.log-item {
-  display: flex;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.log-icon {
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-right: 20rpx;
-  font-size: 40rpx;
-}
-
-.log-content {
-  flex: 1;
-}
-
-.log-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 10rpx;
-}
-
-.log-type {
-  font-size: 30rpx;
-  font-weight: bold;
-  color: #333;
-}
-
-.log-amount {
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.log-amount.positive {
-  color: #4CAF50;
-}
-
-.log-amount.negative {
-  color: #F44336;
-}
-
-.log-description {
-  font-size: 28rpx;
-  color: #666;
-  margin-bottom: 10rpx;
-  display: block;
-}
-
-.log-time {
-  font-size: 24rpx;
-  color: #999;
-}
-
-/* 空状态 */
-.empty-state {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 100rpx 0;
-}
-
-.empty-icon {
-  width: 200rpx;
-  height: 200rpx;
-  margin-bottom: 30rpx;
-}
-
-.empty-text {
-  font-size: 32rpx;
-  color: #333;
-  margin-bottom: 10rpx;
-}
-
-.empty-desc {
-  font-size: 28rpx;
-  color: #999;
-}
-
-/* 导出按钮 */
-.export-btn {
-  position: fixed;
-  bottom: 40rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  background-color: #2196F3;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 20rpx 60rpx;
-  display: flex;
-  align-items: center;
-  box-shadow: 0 4rpx 20rpx rgba(33, 150, 243, 0.3);
-}
-
-.export-icon {
-  font-size: 40rpx;
-  margin-right: 10rpx;
-}
-
-.export-text {
-  font-size: 32rpx;
-  font-weight: bold;
-}

+ 0 - 288
miniprogram/pages/reward-list/reward-list.js

@@ -1,288 +0,0 @@
-// pages/reward-list/reward-list.js
-const app = getApp();
-const api = require('../../utils/api.js');
-
-Page({
-  data: {
-    role: 'parent', // parent 或 child
-    currentChild: null,
-    children: [],
-    rewards: [],
-    filteredRewards: [],
-    categories: [],
-    currentCategory: 'all',
-    loading: false,
-    pointsBalance: 0
-  },
-
-  onLoad() {
-    this.setData({ role: app.globalData.role });
-  },
-
-  onShow() {
-    this.loadData();
-  },
-
-  // 加载数据
-  loadData() {
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockChildren = [
-      { id: 1, name: '小明', points: 120 },
-      { id: 2, name: '小红', points: 85 }
-    ];
-    
-    const mockCategories = [
-      { id: 'all', name: '全部' },
-      { id: '物质类', name: '物质类' },
-      { id: '精神类', name: '精神类' },
-      { id: '特权类', name: '特权类' }
-    ];
-    
-    const mockRewards = [
-      {
-        id: 1,
-        title: '看动画片30分钟',
-        pointsRequired: 30,
-        category: '精神类',
-        status: 'available',
-        childId: 1,
-        childName: '小明',
-        isTemplate: false
-      },
-      {
-        id: 2,
-        title: '玩平板游戏30分钟',
-        pointsRequired: 40,
-        category: '特权类',
-        status: 'available',
-        childId: 1,
-        childName: '小明',
-        isTemplate: false
-      },
-      {
-        id: 3,
-        title: '去游乐场',
-        pointsRequired: 100,
-        category: '物质类',
-        status: 'pending',
-        childId: 1,
-        childName: '小明',
-        isTemplate: false
-      },
-      {
-        id: 4,
-        title: '买玩具',
-        pointsRequired: 150,
-        category: '物质类',
-        status: 'available',
-        childId: 2,
-        childName: '小红',
-        isTemplate: false
-      },
-      {
-        id: 5,
-        title: '吃冰淇淋',
-        pointsRequired: 20,
-        category: '物质类',
-        status: 'exchanged',
-        childId: 1,
-        childName: '小明',
-        isTemplate: false
-      }
-    ];
-
-    setTimeout(() => {
-      this.setData({
-        children: mockChildren,
-        currentChild: mockChildren[0],
-        categories: mockCategories,
-        rewards: mockRewards,
-        filteredRewards: mockRewards,
-        loading: false,
-        pointsBalance: mockChildren[0].points
-      });
-      this.applyFilter();
-    }, 500);
-  },
-
-  // 切换孩子
-  onChildChange(e) {
-    const childId = parseInt(e.detail.value);
-    const child = this.data.children.find(c => c.id === childId);
-    this.setData({ 
-      currentChild: child,
-      pointsBalance: child.points
-    });
-    this.applyFilter();
-  },
-
-  // 切换分类
-  onCategoryChange(e) {
-    this.setData({ currentCategory: e.currentTarget.dataset.category });
-    this.applyFilter();
-  },
-
-  // 应用筛选
-  applyFilter() {
-    let filtered = this.data.rewards;
-    
-    // 筛选当前孩子的奖励
-    if (this.data.currentChild) {
-      filtered = filtered.filter(r => r.childId === this.data.currentChild.id);
-    }
-    
-    // 按分类筛选
-    if (this.data.currentCategory !== 'all') {
-      filtered = filtered.filter(r => r.category === this.data.currentCategory);
-    }
-    
-    this.setData({ filteredRewards: filtered });
-  },
-
-  // 兑换奖励
-  onExchangeReward(e) {
-    const rewardId = e.currentTarget.dataset.id;
-    const reward = this.data.rewards.find(r => r.id === rewardId);
-    
-    if (!reward) return;
-    
-    if (reward.pointsRequired > this.data.pointsBalance) {
-      wx.showToast({
-        title: '积分不足',
-        icon: 'none'
-      });
-      return;
-    }
-    
-    wx.showModal({
-      title: '确认兑换',
-      content: `确定要花费${reward.pointsRequired}积分兑换「${reward.title}」吗?`,
-      success: (res) => {
-        if (res.confirm) {
-          this.doExchangeReward(rewardId);
-        }
-      }
-    });
-  },
-
-  doExchangeReward(rewardId) {
-    wx.showLoading({ title: '兑换中...' });
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      
-      // 更新奖励状态
-      const rewards = this.data.rewards.map(r => {
-        if (r.id === rewardId) {
-          return { ...r, status: 'pending' };
-        }
-        return r;
-      });
-      
-      // 更新积分
-      const reward = this.data.rewards.find(r => r.id === rewardId);
-      const pointsBalance = this.data.pointsBalance - reward.pointsRequired;
-      
-      this.setData({
-        rewards,
-        pointsBalance
-      });
-      this.applyFilter();
-      
-      wx.showToast({
-        title: '兑换成功',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  // 审核通过
-  onApproveReward(e) {
-    const rewardId = e.currentTarget.dataset.id;
-    
-    wx.showModal({
-      title: '确认通过',
-      content: '确定要通过这个奖励兑换吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doApproveReward(rewardId);
-        }
-      }
-    });
-  },
-
-  doApproveReward(rewardId) {
-    wx.showLoading({ title: '处理中...' });
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      
-      // 更新奖励状态
-      const rewards = this.data.rewards.map(r => {
-        if (r.id === rewardId) {
-          return { ...r, status: 'exchanged' };
-        }
-        return r;
-      });
-      
-      this.setData({ rewards });
-      this.applyFilter();
-      
-      wx.showToast({
-        title: '审核通过',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  // 拒绝奖励
-  onRejectReward(e) {
-    const rewardId = e.currentTarget.dataset.id;
-    
-    wx.showModal({
-      title: '确认拒绝',
-      content: '确定要拒绝这个奖励兑换吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doRejectReward(rewardId);
-        }
-      }
-    });
-  },
-
-  doRejectReward(rewardId) {
-    wx.showLoading({ title: '处理中...' });
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      
-      // 更新奖励状态
-      const rewards = this.data.rewards.map(r => {
-        if (r.id === rewardId) {
-          return { ...r, status: 'available' };
-        }
-        return r;
-      });
-      
-      this.setData({ rewards });
-      this.applyFilter();
-      
-      wx.showToast({
-        title: '已拒绝',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  // 创建奖励
-  onCreateReward() {
-    wx.navigateTo({
-      url: '/pages/reward-create/reward-create'
-    });
-  }
-});

+ 0 - 5
miniprogram/pages/reward-list/reward-list.json

@@ -1,5 +0,0 @@
-{
-  "navigationBarTitleText": "奖励管理",
-  "enablePullDownRefresh": true,
-  "backgroundColor": "#f5f5f5"
-}

+ 0 - 106
miniprogram/pages/reward-list/reward-list.wxml

@@ -1,106 +0,0 @@
-<!--pages/reward-list/reward-list.wxml-->
-<view class="container">
-  <!-- 头部信息 -->
-  <view class="header">
-    <view class="balance-card">
-      <text class="balance-label">当前积分</text>
-      <text class="balance-value">{{pointsBalance}}</text>
-      <text class="balance-child" wx:if="{{currentChild}}">{{currentChild.name}}</text>
-    </view>
-    
-    <!-- 孩子选择器 -->
-    <view class="child-selector" wx:if="{{role === 'parent'}}">
-      <picker mode="selector" range="{{children}}" range-key="name" bindchange="onChildChange">
-        <view class="picker-value">切换孩子: {{currentChild?.name || '请选择'}}</view>
-      </picker>
-    </view>
-  </view>
-
-  <!-- 分类筛选 -->
-  <view class="category-filter">
-    <view 
-      class="category-item {{currentCategory === item.id ? 'active' : ''}}"
-      wx:for="{{categories}}"
-      wx:key="id"
-      data-category="{{item.id}}"
-      bindtap="onCategoryChange"
-    >{{item.name}}</view>
-  </view>
-
-  <!-- 奖励列表 -->
-  <view class="reward-list">
-    <!-- 加载状态 -->
-    <view class="loading" wx:if="{{loading}}">
-      <text>加载中...</text>
-    </view>
-    
-    <!-- 奖励列表 -->
-    <block wx:else>
-      <block wx:if="{{filteredRewards.length > 0}}">
-        <view 
-          class="reward-item {{item.status}}"
-          wx:for="{{filteredRewards}}"
-          wx:key="id"
-        >
-          <view class="reward-info">
-            <text class="reward-title">{{item.title}}</text>
-            <text class="reward-category">{{item.category}}</text>
-            <text class="reward-points">{{item.pointsRequired}}积分</text>
-          </view>
-          
-          <view class="reward-status">
-            <!-- 可兑换 -->
-            <view wx:if="{{item.status === 'available'}}" class="status-available">
-              <text class="status-text">可兑换</text>
-              <button 
-                class="exchange-btn"
-                data-id="{{item.id}}"
-                bindtap="onExchangeReward"
-              >兑换</button>
-            </view>
-            
-            <!-- 待审核 -->
-            <view wx:elif="{{item.status === 'pending'}}" class="status-pending">
-              <text class="status-text">待审核</text>
-              <view wx:if="{{role === 'parent'}}" class="review-buttons">
-                <button 
-                  class="approve-btn"
-                  data-id="{{item.id}}"
-                  bindtap="onApproveReward"
-                >通过</button>
-                <button 
-                  class="reject-btn"
-                  data-id="{{item.id}}"
-                  bindtap="onRejectReward"
-                >拒绝</button>
-              </view>
-            </view>
-            
-            <!-- 已兑换 -->
-            <view wx:elif="{{item.status === 'exchanged'}}" class="status-exchanged">
-              <text class="status-text">已兑换</text>
-            </view>
-            
-            <!-- 已拒绝 -->
-            <view wx:elif="{{item.status === 'rejected'}}" class="status-rejected">
-              <text class="status-text">已拒绝</text>
-            </view>
-          </view>
-        </view>
-      </block>
-      
-      <!-- 空状态 -->
-      <view class="empty-state" wx:else>
-        <image class="empty-icon" src="/images/empty-reward.svg" mode="aspectFit"></image>
-        <text class="empty-text">暂无奖励</text>
-        <text class="empty-desc">点击下方按钮创建第一个奖励</text>
-      </view>
-    </block>
-  </view>
-
-  <!-- 创建奖励按钮 -->
-  <view class="create-btn" bindtap="onCreateReward" wx:if="{{role === 'parent'}}">
-    <text class="create-icon">+</text>
-    <text class="create-text">创建奖励</text>
-  </view>
-</view>

+ 0 - 259
miniprogram/pages/reward-list/reward-list.wxss

@@ -1,259 +0,0 @@
-/* pages/reward-list/reward-list.wxss */
-.container {
-  padding: 20rpx;
-  padding-bottom: 120rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-/* 头部 */
-.header {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.balance-card {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  margin-bottom: 30rpx;
-}
-
-.balance-label {
-  font-size: 28rpx;
-  color: #666;
-  margin-bottom: 10rpx;
-}
-
-.balance-value {
-  font-size: 64rpx;
-  font-weight: bold;
-  color: #FF6B6B;
-  margin-bottom: 10rpx;
-}
-
-.balance-child {
-  font-size: 28rpx;
-  color: #999;
-}
-
-.child-selector {
-  margin-top: 20rpx;
-}
-
-.picker-value {
-  padding: 20rpx;
-  border: 2rpx solid #eee;
-  border-radius: 12rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-/* 分类筛选 */
-.category-filter {
-  display: flex;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.category-item {
-  flex: 1;
-  text-align: center;
-  padding: 16rpx 0;
-  font-size: 28rpx;
-  color: #666;
-  border-radius: 8rpx;
-  margin-right: 10rpx;
-  background-color: #f5f5f5;
-}
-
-.category-item:last-child {
-  margin-right: 0;
-}
-
-.category-item.active {
-  background-color: #FF6B6B;
-  color: #fff;
-}
-
-/* 奖励列表 */
-.reward-list {
-  margin-bottom: 40rpx;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 200rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-.reward-item {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-}
-
-.reward-info {
-  flex: 1;
-}
-
-.reward-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 10rpx;
-}
-
-.reward-category {
-  font-size: 26rpx;
-  color: #666;
-  background-color: #f0f0f0;
-  padding: 4rpx 12rpx;
-  border-radius: 12rpx;
-  margin-right: 10rpx;
-  display: inline-block;
-}
-
-.reward-points {
-  font-size: 28rpx;
-  color: #FF6B6B;
-  font-weight: bold;
-  display: inline-block;
-}
-
-.reward-status {
-  margin-left: 20rpx;
-}
-
-.status-available, .status-pending, .status-exchanged, .status-rejected {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-
-.status-text {
-  font-size: 24rpx;
-  color: #999;
-  margin-bottom: 10rpx;
-}
-
-.status-available .status-text {
-  color: #4CAF50;
-}
-
-.status-pending .status-text {
-  color: #FFD700;
-}
-
-.status-exchanged .status-text {
-  color: #999;
-}
-
-.status-rejected .status-text {
-  color: #F44336;
-}
-
-.exchange-btn {
-  background-color: #4CAF50;
-  color: #fff;
-  border-radius: 30rpx;
-  padding: 12rpx 30rpx;
-  font-size: 28rpx;
-  margin: 0;
-}
-
-.exchange-btn::after {
-  border: none;
-}
-
-.review-buttons {
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-}
-
-.approve-btn, .reject-btn {
-  border-radius: 30rpx;
-  padding: 12rpx 20rpx;
-  font-size: 24rpx;
-  margin: 5rpx 0;
-  color: #fff;
-}
-
-.approve-btn {
-  background-color: #4CAF50;
-}
-
-.reject-btn {
-  background-color: #F44336;
-}
-
-.approve-btn::after, .reject-btn::after {
-  border: none;
-}
-
-/* 空状态 */
-.empty-state {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 100rpx 0;
-}
-
-.empty-icon {
-  width: 200rpx;
-  height: 200rpx;
-  margin-bottom: 30rpx;
-}
-
-.empty-text {
-  font-size: 32rpx;
-  color: #333;
-  margin-bottom: 10rpx;
-}
-
-.empty-desc {
-  font-size: 28rpx;
-  color: #999;
-}
-
-/* 创建按钮 */
-.create-btn {
-  position: fixed;
-  bottom: 40rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  background-color: #FF6B6B;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 20rpx 60rpx;
-  display: flex;
-  align-items: center;
-  box-shadow: 0 4rpx 20rpx rgba(255, 107, 107, 0.3);
-}
-
-.create-icon {
-  font-size: 40rpx;
-  margin-right: 10rpx;
-}
-
-.create-text {
-  font-size: 32rpx;
-  font-weight: bold;
-}

+ 0 - 247
miniprogram/pages/settings/settings.js

@@ -1,247 +0,0 @@
-// pages/settings/settings.js
-const app = getApp();
-
-Page({
-  data: {
-    role: 'parent', // parent 或 child
-    userInfo: null,
-    familyInfo: null,
-    children: [],
-    currentChild: null,
-    settings: {
-      notification: true,
-      sound: true,
-      darkMode: false,
-      language: 'zh_CN'
-    },
-   danLevels: [
-      { value: 'A1', label: 'A1 - 幼儿园小班' },
-      { value: 'A2', label: 'A2 - 幼儿园中班' },
-      { value: 'A3', label: 'A3 - 幼儿园大班' },
-      { value: 'B1', label: 'B1 - 小学一年级' },
-      { value: 'B2', label: 'B2 - 小学二年级' },
-      { value: 'B3', label: 'B3 - 小学三年级' },
-      { value: 'B4', label: 'B4 - 小学四年级' },
-      { value: 'B5', label: 'B5 - 小学五年级' },
-      { value: 'B6', label: 'B6 - 小学六年级' }
-    ],
-    loading: false
-  },
-
-  onLoad() {
-    this.setData({ role: app.globalData.role });
-    this.loadUserInfo();
-    this.loadSettings();
-  },
-
-  onShow() {
-    this.loadUserInfo();
-  },
-
-  // 加载用户信息
-  loadUserInfo() {
-    this.setData({ 
-      userInfo: app.globalData.userInfo,
-      loading: true
-    });
-    
-    // 模拟数据
-    const mockFamily = {
-      id: 1,
-      name: '快乐家庭',
-      inviteCode: 'ABC123',
-      memberCount: 4
-    };
-    
-    const mockChildren = [
-      { id: 1, name: '小明', age: 8, danLevel: 'B2', penaltyEnabled: true, points: 120 },
-      { id: 2, name: '小红', age: 6, danLevel: 'A3', penaltyEnabled: false, points: 85 }
-    ];
-
-    setTimeout(() => {
-      this.setData({
-        familyInfo: mockFamily,
-        children: mockChildren,
-        currentChild: mockChildren[0],
-        loading: false
-      });
-    }, 500);
-  },
-
-  // 加载设置
-  loadSettings() {
-    const settings = wx.getStorageSync('appSettings');
-    if (settings) {
-      this.setData({ settings });
-    }
-  },
-
-  // 保存设置
-  saveSettings() {
-    wx.setStorageSync('appSettings', this.data.settings);
-  },
-
-  // 切换通知
-  onNotificationChange(e) {
-    this.setData({ 'settings.notification': e.detail.value });
-    this.saveSettings();
-  },
-
-  // 切换声音
-  onSoundChange(e) {
-    this.setData({ 'settings.sound': e.detail.value });
-    this.saveSettings();
-  },
-
-  // 切换暗黑模式
-  onDarkModeChange(e) {
-    this.setData({ 'settings.darkMode': e.detail.value });
-    this.saveSettings();
-    
-    // 实际应用中这里需要切换主题
-    wx.showToast({
-      title: '暗黑模式功能开发中',
-      icon: 'none'
-    });
-  },
-
-  // 切换语言
-  onLanguageChange(e) {
-    this.setData({ 'settings.language': e.detail.value });
-    this.saveSettings();
-  },
-
-  // 切换孩子
-  onChildChange(e) {
-    const childId = parseInt(e.detail.value);
-    const child = this.data.children.find(c => c.id === childId);
-    this.setData({ currentChild: child });
-  },
-
-  // 编辑孩子信息
-  onEditChild() {
-    wx.navigateTo({
-      url: `/pages/child-edit/child-edit?id=${this.data.currentChild.id}`
-    });
-  },
-
-  // 管理家庭
-  onManageFamily() {
-    wx.navigateTo({
-      url: '/pages/family-manage/family-manage'
-    });
-  },
-
-  // 邀请成员
-  onInviteMember() {
-    wx.showModal({
-      title: '邀请家庭成员',
-      content: `家庭邀请码:${this.data.familyInfo?.inviteCode || ''}`,
-      showCancel: false,
-      confirmText: '复制邀请码',
-      success: (res) => {
-        if (res.confirm) {
-          wx.setClipboardData({
-            data: this.data.familyInfo?.inviteCode || '',
-            success: () => {
-              wx.showToast({
-                title: '邀请码已复制',
-                icon: 'success'
-              });
-            }
-          });
-        }
-      }
-    });
-  },
-
-  // 查看积分记录
-  onViewPointsLog() {
-    wx.navigateTo({
-      url: `/pages/points-log/points-log?childId=${this.data.currentChild?.id || 0}&childName=${this.data.currentChild?.name || ''}`
-    });
-  },
-
-  // 查看成就
-  onViewAchievements() {
-    wx.navigateTo({
-      url: '/pages/achievements/achievements'
-    });
-  },
-
-  // DAN测评
-  onDanAssessment() {
-    wx.navigateTo({
-      url: `/pages/dan-assessment/dan-assessment?childId=${this.data.currentChild?.id || 0}`
-    });
-  },
-
-  // 关于我们
-  onAbout() {
-    wx.showModal({
-      title: '关于知行益家',
-      content: '版本:V1.0.0\n\n知行益家是一款家庭教育任务管理小程序,通过积分奖励机制激励孩子自主完成任务,培养时间管理和延迟满足能力。',
-      showCancel: false
-    });
-  },
-
-  // 帮助中心
-  onHelp() {
-    wx.navigateTo({
-      url: '/pages/help/help'
-    });
-  },
-
-  // 反馈建议
-  onFeedback() {
-    wx.navigateTo({
-      url: '/pages/feedback/feedback'
-    });
-  },
-
-  // 退出登录
-  onLogout() {
-    wx.showModal({
-      title: '确认退出',
-      content: '确定要退出登录吗?',
-      success: (res) => {
-        if (res.confirm) {
-          app.logout();
-          wx.reLaunch({
-            url: '/pages/login/login'
-          });
-        }
-      }
-    });
-  },
-
-  // 清除缓存
-  onClearCache() {
-    wx.showModal({
-      title: '确认清除',
-      content: '确定要清除本地缓存吗?这可能会影响应用性能。',
-      success: (res) => {
-        if (res.confirm) {
-          wx.clearStorageSync();
-          wx.showToast({
-            title: '缓存已清除',
-            icon: 'success'
-          });
-        }
-      }
-    });
-  },
-
-  // 检查更新
-  onCheckUpdate() {
-    wx.showLoading({ title: '检查更新中...' });
-    
-    setTimeout(() => {
-      wx.hideLoading();
-      wx.showToast({
-        title: '已是最新版本',
-        icon: 'success'
-      });
-    }, 1000);
-  }
-});

+ 0 - 4
miniprogram/pages/settings/settings.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "我的",
-  "enablePullDownRefresh": false
-}

+ 0 - 167
miniprogram/pages/settings/settings.wxml

@@ -1,167 +0,0 @@
-<!--pages/settings/settings.wxml-->
-<view class="container">
-  <!-- 用户信息 -->
-  <view class="user-header">
-    <view class="avatar">
-      <image class="avatar-image" src="{{userInfo?.avatarUrl || '/images/default-avatar.svg'}}" mode="aspectFill"></image>
-    </view>
-    <view class="user-info">
-      <text class="user-name">{{userInfo?.nickName || '用户'}}</text>
-      <text class="user-role">{{role === 'parent' ? '家长' : '孩子'}}</text>
-      <text class="user-family" wx:if="{{familyInfo}}">{{familyInfo.name}}</text>
-    </view>
-  </view>
-
-  <!-- 家庭信息 -->
-  <view class="section" wx:if="{{role === 'parent'}}">
-    <view class="section-header">
-      <text class="section-title">家庭管理</text>
-    </view>
-    <view class="section-content">
-      <view class="menu-item" bindtap="onManageFamily">
-        <text class="menu-icon">👨‍👩‍👧‍👦</text>
-        <text class="menu-text">家庭设置</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onInviteMember">
-        <text class="menu-icon">📧</text>
-        <text class="menu-text">邀请成员</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item">
-        <text class="menu-icon">👥</text>
-        <text class="menu-text">家庭成员</text>
-        <text class="menu-value">{{familyInfo?.memberCount || 0}}人</text>
-      </view>
-    </view>
-  </view>
-
-  <!-- 孩子管理 -->
-  <view class="section" wx:if="{{role === 'parent'}}">
-    <view class="section-header">
-      <text class="section-title">孩子管理</text>
-    </view>
-    <view class="section-content">
-      <view class="child-selector">
-        <picker mode="selector" range="{{children}}" range-key="name" bindchange="onChildChange">
-          <view class="picker-value">当前孩子:{{currentChild?.name || '请选择'}}</view>
-        </picker>
-      </view>
-      
-      <view class="child-info" wx:if="{{currentChild}}">
-        <view class="child-info-item">
-          <text class="info-label">年龄</text>
-          <text class="info-value">{{currentChild.age}}岁</text>
-        </view>
-        <view class="child-info-item">
-          <text class="info-label">DAN等级</text>
-          <text class="info-value">{{currentChild.danLevel}}</text>
-        </view>
-        <view class="child-info-item">
-          <text class="info-label">积分</text>
-          <text class="info-value points">{{currentChild.points}}</text>
-        </view>
-        <view class="child-info-item">
-          <text class="info-label">扣分机制</text>
-          <text class="info-value">{{currentChild.penaltyEnabled ? '已开启' : '已关闭'}}</text>
-        </view>
-      </view>
-      
-      <view class="menu-item" bindtap="onEditChild">
-        <text class="menu-icon">✏️</text>
-        <text class="menu-text">编辑孩子信息</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onDanAssessment">
-        <text class="menu-icon">📊</text>
-        <text class="menu-text">DAN测评</text>
-        <text class="menu-arrow">></text>
-      </view>
-    </view>
-  </view>
-
-  <!-- 数据查看 -->
-  <view class="section">
-    <view class="section-header">
-      <text class="section-title">数据查看</text>
-    </view>
-    <view class="section-content">
-      <view class="menu-item" bindtap="onViewPointsLog">
-        <text class="menu-icon">📈</text>
-        <text class="menu-text">积分记录</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onViewAchievements">
-        <text class="menu-icon">🏆</text>
-        <text class="menu-text">成就徽章</text>
-        <text class="menu-arrow">></text>
-      </view>
-    </view>
-  </view>
-
-  <!-- 应用设置 -->
-  <view class="section">
-    <view class="section-header">
-      <text class="section-title">应用设置</text>
-    </view>
-    <view class="section-content">
-      <view class="setting-item">
-        <text class="setting-label">消息通知</text>
-        <switch checked="{{settings.notification}}" bindchange="onNotificationChange" color="#FF6B6B"/>
-      </view>
-      <view class="setting-item">
-        <text class="setting-label">声音提醒</text>
-        <switch checked="{{settings.sound}}" bindchange="onSoundChange" color="#FF6B6B"/>
-      </view>
-      <view class="setting-item">
-        <text class="setting-label">暗黑模式</text>
-        <switch checked="{{settings.darkMode}}" bindchange="onDarkModeChange" color="#FF6B6B"/>
-      </view>
-      <view class="setting-item">
-        <text class="setting-label">语言</text>
-        <picker mode="selector" range="{{['简体中文', 'English']}}" value="{{settings.language === 'zh_CN' ? 0 : 1}}" bindchange="onLanguageChange">
-          <view class="picker-value">{{settings.language === 'zh_CN' ? '简体中文' : 'English'}}</view>
-        </picker>
-      </view>
-    </view>
-  </view>
-
-  <!-- 其他 -->
-  <view class="section">
-    <view class="section-header">
-      <text class="section-title">其他</text>
-    </view>
-    <view class="section-content">
-      <view class="menu-item" bindtap="onHelp">
-        <text class="menu-icon">❓</text>
-        <text class="menu-text">帮助中心</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onFeedback">
-        <text class="menu-icon">💬</text>
-        <text class="menu-text">反馈建议</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onAbout">
-        <text class="menu-icon">ℹ️</text>
-        <text class="menu-text">关于我们</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onClearCache">
-        <text class="menu-icon">🗑️</text>
-        <text class="menu-text">清除缓存</text>
-        <text class="menu-arrow">></text>
-      </view>
-      <view class="menu-item" bindtap="onCheckUpdate">
-        <text class="menu-icon">🔄</text>
-        <text class="menu-text">检查更新</text>
-        <text class="menu-value">V1.0.0</text>
-      </view>
-    </view>
-  </view>
-
-  <!-- 退出登录 -->
-  <view class="logout-section">
-    <button class="logout-btn" bindtap="onLogout">退出登录</button>
-  </view>
-</view>

+ 0 - 196
miniprogram/pages/settings/settings.wxss

@@ -1,196 +0,0 @@
-/* pages/settings/settings.wxss */
-.container {
-  padding: 20rpx;
-  padding-bottom: 40rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-/* 用户信息 */
-.user-header {
-  display: flex;
-  align-items: center;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.avatar {
-  margin-right: 30rpx;
-}
-
-.avatar-image {
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  border: 4rpx solid #FF6B6B;
-}
-
-.user-info {
-  flex: 1;
-}
-
-.user-name {
-  font-size: 36rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 10rpx;
-}
-
-.user-role {
-  font-size: 28rpx;
-  color: #FF6B6B;
-  background-color: rgba(255, 107, 107, 0.1);
-  padding: 4rpx 16rpx;
-  border-radius: 20rpx;
-  display: inline-block;
-  margin-right: 10rpx;
-}
-
-.user-family {
-  font-size: 28rpx;
-  color: #666;
-  display: inline-block;
-}
-
-/* 区块 */
-.section {
-  background-color: #fff;
-  border-radius: 16rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-  overflow: hidden;
-}
-
-.section-header {
-  padding: 30rpx;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.section-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-}
-
-.section-content {
-  padding: 0 30rpx;
-}
-
-/* 菜单项 */
-.menu-item {
-  display: flex;
-  align-items: center;
-  padding: 30rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.menu-item:last-child {
-  border-bottom: none;
-}
-
-.menu-icon {
-  font-size: 40rpx;
-  margin-right: 20rpx;
-}
-
-.menu-text {
-  flex: 1;
-  font-size: 30rpx;
-  color: #333;
-}
-
-.menu-arrow {
-  font-size: 28rpx;
-  color: #ccc;
-}
-
-.menu-value {
-  font-size: 28rpx;
-  color: #999;
-  margin-right: 10rpx;
-}
-
-/* 孩子选择器 */
-.child-selector {
-  padding: 30rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.picker-value {
-  padding: 20rpx;
-  border: 2rpx solid #eee;
-  border-radius: 12rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-/* 孩子信息 */
-.child-info {
-  padding: 30rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.child-info-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 10rpx 0;
-}
-
-.info-label {
-  font-size: 28rpx;
-  color: #666;
-}
-
-.info-value {
-  font-size: 28rpx;
-  color: #333;
-  font-weight: bold;
-}
-
-.info-value.points {
-  color: #FF6B6B;
-}
-
-/* 设置项 */
-.setting-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 30rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.setting-item:last-child {
-  border-bottom: none;
-}
-
-.setting-label {
-  font-size: 30rpx;
-  color: #333;
-}
-
-/* 退出登录 */
-.logout-section {
-  margin-top: 40rpx;
-  padding: 0 20rpx;
-}
-
-.logout-btn {
-  background-color: #fff;
-  color: #F44336;
-  border: 2rpx solid #F44336;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.logout-btn::after {
-  border: none;
-}

+ 0 - 186
miniprogram/pages/task-create/task-create.js

@@ -1,186 +0,0 @@
-// pages/task-create/task-create.js
-const app = getApp();
-const api = require('../../utils/api.js');
-
-Page({
-  data: {
-    childId: 0,
-    childName: '',
-    title: '',
-    description: '',
-    points: 2,
-    deadline: '',
-    deadlineTime: '',
-    category: '学习',
-    repeatType: 'none',
-    needReview: false,
-    reviewByCategory: false,
-    categories: ['学习', '生活', '运动', '艺术', '社交'],
-    repeatTypes: [
-      { value: 'none', label: '不重复' },
-      { value: 'daily', label: '每天' },
-      { value: 'weekly', label: '每周' }
-    ],
-    loading: false
-  },
-
-  onLoad(options) {
-    const childId = options.childId || 0;
-    const childName = options.childName || '';
-    this.setData({ childId, childName });
-    
-    // 设置默认截止时间为今天20:00
-    const today = new Date();
-    const deadline = today.toISOString().split('T')[0];
-    this.setData({ 
-      deadline,
-      deadlineTime: '20:00'
-    });
-  },
-
-  // 输入标题
-  onTitleInput(e) {
-    this.setData({ title: e.detail.value });
-  },
-
-  // 输入描述
-  onDescriptionInput(e) {
-    this.setData({ description: e.detail.value });
-  },
-
-  // 选择积分
-  onPointsChange(e) {
-    this.setData({ points: parseInt(e.detail.value) });
-  },
-
-  // 选择分类
-  onCategoryChange(e) {
-    this.setData({ category: e.detail.value });
-  },
-
-  // 选择截止日期
-  onDeadlineChange(e) {
-    this.setData({ deadline: e.detail.value });
-  },
-
-  // 选择截止时间
-  onDeadlineTimeChange(e) {
-    this.setData({ deadlineTime: e.detail.value });
-  },
-
-  // 选择重复类型
-  onRepeatTypeChange(e) {
-    this.setData({ repeatType: e.detail.value });
-  },
-
-  // 切换需要审核
-  onNeedReviewChange(e) {
-    this.setData({ needReview: e.detail.value });
-  },
-
-  // 切换按分类审核
-  onReviewByCategoryChange(e) {
-    this.setData({ reviewByCategory: e.detail.value });
-  },
-
-  // 表单验证
-  validateForm() {
-    if (!this.data.title.trim()) {
-      wx.showToast({ title: '请输入任务标题', icon: 'none' });
-      return false;
-    }
-    
-    if (this.data.title.length > 20) {
-      wx.showToast({ title: '标题不能超过20个字', icon: 'none' });
-      return false;
-    }
-    
-    if (this.data.description.length > 200) {
-      wx.showToast({ title: '描述不能超过200个字', icon: 'none' });
-      return false;
-    }
-    
-    if (!this.data.deadline || !this.data.deadlineTime) {
-      wx.showToast({ title: '请设置截止时间', icon: 'none' });
-      return false;
-    }
-    
-    // 检查截止时间是否在未来
-    const deadline = new Date(`${this.data.deadline} ${this.data.deadlineTime}`);
-    if (deadline <= new Date()) {
-      wx.showToast({ title: '截止时间必须在未来', icon: 'none' });
-      return false;
-    }
-    
-    return true;
-  },
-
-  // 提交表单
-  onSubmit() {
-    if (!this.validateForm()) return;
-    
-    wx.showModal({
-      title: '确认创建',
-      content: `确定要创建任务「${this.data.title}」吗?`,
-      success: (res) => {
-        if (res.confirm) {
-          this.doCreateTask();
-        }
-      }
-    });
-  },
-
-  doCreateTask() {
-    this.setData({ loading: true });
-    wx.showLoading({ title: '创建中...' });
-    
-    const taskData = {
-      childId: this.data.childId,
-      title: this.data.title,
-      description: this.data.description,
-      points: this.data.points,
-      deadline: `${this.data.deadline} ${this.data.deadlineTime}`,
-      category: this.data.category,
-      repeatType: this.data.repeatType,
-      needReview: this.data.needReview,
-      reviewByCategory: this.data.reviewByCategory
-    };
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      this.setData({ loading: false });
-      
-      wx.showToast({
-        title: '创建成功',
-        icon: 'success'
-      });
-      
-      // 返回上一页
-      setTimeout(() => {
-        wx.navigateBack();
-      }, 1500);
-    }, 1000);
-  },
-
-  // 预览任务
-  onPreview() {
-    if (!this.validateForm()) return;
-    
-    const content = `
-任务标题:${this.data.title}
-任务描述:${this.data.description || '无'}
-任务积分:${this.data.points}分
-截止时间:${this.data.deadline} ${this.data.deadlineTime}
-任务分类:${this.data.category}
-重复类型:${this.data.repeatTypes.find(t => t.value === this.data.repeatType)?.label}
-需要审核:${this.data.needReview ? '是' : '否'}
-    `.trim();
-    
-    wx.showModal({
-      title: '任务预览',
-      content,
-      showCancel: false
-    });
-  }
-});

+ 0 - 4
miniprogram/pages/task-create/task-create.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "创建任务",
-  "enablePullDownRefresh": false
-}

+ 0 - 101
miniprogram/pages/task-create/task-create.wxml

@@ -1,101 +0,0 @@
-<!--pages/task-create/task-create.wxml-->
-<view class="container">
-  <form bindsubmit="onSubmit">
-    <!-- 任务标题 -->
-    <view class="form-item">
-      <text class="form-label">任务标题 <text class="required">*</text></text>
-      <input 
-        class="form-input"
-        placeholder="请输入任务标题(最多20字)"
-        maxlength="20"
-        value="{{title}}"
-        bindinput="onTitleInput"
-      />
-    </view>
-
-    <!-- 任务描述 -->
-    <view class="form-item">
-      <text class="form-label">任务描述</text>
-      <textarea 
-        class="form-textarea"
-        placeholder="请输入任务描述(最多200字)"
-        maxlength="200"
-        value="{{description}}"
-        bindinput="onDescriptionInput"
-      />
-    </view>
-
-    <!-- 任务积分 -->
-    <view class="form-item">
-      <text class="form-label">任务积分 <text class="required">*</text></text>
-      <view class="points-selector">
-        <view class="points-options">
-          <view 
-            class="points-option {{points === item ? 'active' : ''}}"
-            wx:for="{{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}}"
-            wx:key="*this"
-            data-value="{{item}}"
-            bindtap="onPointsChange"
-          >{{item}}</view>
-        </view>
-        <text class="points-tip">选择1-10分,建议复杂任务设置更高积分</text>
-      </view>
-    </view>
-
-    <!-- 截止时间 -->
-    <view class="form-item">
-      <text class="form-label">截止时间 <text class="required">*</text></text>
-      <view class="datetime-picker">
-        <picker mode="date" value="{{deadline}}" bindchange="onDeadlineChange">
-          <view class="picker-value">{{deadline || '请选择日期'}}</view>
-        </picker>
-        <picker mode="time" value="{{deadlineTime}}" bindchange="onDeadlineTimeChange">
-          <view class="picker-value">{{deadlineTime || '请选择时间'}}</view>
-        </picker>
-      </view>
-    </view>
-
-    <!-- 任务分类 -->
-    <view class="form-item">
-      <text class="form-label">任务分类</text>
-      <picker mode="selector" range="{{categories}}" value="{{category}}" bindchange="onCategoryChange">
-        <view class="picker-value">{{category}}</view>
-      </picker>
-    </view>
-
-    <!-- 重复类型 -->
-    <view class="form-item">
-      <text class="form-label">重复类型</text>
-      <view class="repeat-selector">
-        <view 
-          class="repeat-option {{repeatType === item.value ? 'active' : ''}}"
-          wx:for="{{repeatTypes}}"
-          wx:key="value"
-          data-value="{{item.value}}"
-          bindtap="onRepeatTypeChange"
-        >{{item.label}}</view>
-      </view>
-    </view>
-
-    <!-- 需要审核 -->
-    <view class="form-item">
-      <text class="form-label">需要审核</text>
-      <switch checked="{{needReview}}" bindchange="onNeedReviewChange" color="#FF6B6B"/>
-    </view>
-
-    <!-- 按分类审核 -->
-    <view class="form-item sub-item" wx:if="{{needReview}}">
-      <text class="form-label">按分类审核</text>
-      <switch checked="{{reviewByCategory}}" bindchange="onReviewByCategoryChange" color="#FF6B6B"/>
-      <text class="form-tip">开启后,只有指定分类的任务才需要审核</text>
-    </view>
-
-    <!-- 提交按钮 -->
-    <view class="button-group">
-      <button class="preview-btn" bindtap="onPreview" disabled="{{loading}}">预览</button>
-      <button class="submit-btn" formType="submit" disabled="{{loading}}">
-        {{loading ? '创建中...' : '创建任务'}}
-      </button>
-    </view>
-  </form>
-</view>

+ 0 - 189
miniprogram/pages/task-create/task-create.wxss

@@ -1,189 +0,0 @@
-/* pages/task-create/task-create.wxss */
-.container {
-  padding: 20rpx;
-  padding-bottom: 40rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.form-item {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.form-item.sub-item {
-  margin-left: 40rpx;
-  background-color: #f9f9f9;
-}
-
-.form-label {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 20rpx;
-}
-
-.required {
-  color: #F44336;
-  margin-left: 10rpx;
-}
-
-.form-input {
-  font-size: 30rpx;
-  color: #333;
-  padding: 20rpx;
-  border: 2rpx solid #eee;
-  border-radius: 12rpx;
-  background-color: #fafafa;
-}
-
-.form-textarea {
-  font-size: 30rpx;
-  color: #333;
-  padding: 20rpx;
-  border: 2rpx solid #eee;
-  border-radius: 12rpx;
-  background-color: #fafafa;
-  min-height: 200rpx;
-  width: 100%;
-  box-sizing: border-box;
-}
-
-/* 积分选择器 */
-.points-selector {
-  margin-top: 20rpx;
-}
-
-.points-options {
-  display: flex;
-  flex-wrap: wrap;
-  margin-bottom: 10rpx;
-}
-
-.points-option {
-  width: 80rpx;
-  height: 80rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: 2rpx solid #ddd;
-  border-radius: 12rpx;
-  margin-right: 10rpx;
-  margin-bottom: 10rpx;
-  font-size: 32rpx;
-  color: #666;
-}
-
-.points-option.active {
-  background-color: #FF6B6B;
-  color: #fff;
-  border-color: #FF6B6B;
-}
-
-.points-tip {
-  font-size: 24rpx;
-  color: #999;
-}
-
-/* 时间选择器 */
-.datetime-picker {
-  display: flex;
-  justify-content: space-between;
-}
-
-.picker-value {
-  flex: 1;
-  margin-right: 20rpx;
-  padding: 20rpx;
-  border: 2rpx solid #eee;
-  border-radius: 12rpx;
-  background-color: #fafafa;
-  font-size: 30rpx;
-  color: #333;
-  text-align: center;
-}
-
-.picker-value:last-child {
-  margin-right: 0;
-}
-
-/* 重复类型 */
-.repeat-selector {
-  display: flex;
-  justify-content: space-between;
-}
-
-.repeat-option {
-  flex: 1;
-  margin-right: 10rpx;
-  padding: 20rpx;
-  border: 2rpx solid #ddd;
-  border-radius: 12rpx;
-  text-align: center;
-  font-size: 28rpx;
-  color: #666;
-}
-
-.repeat-option:last-child {
-  margin-right: 0;
-}
-
-.repeat-option.active {
-  background-color: #FF6B6B;
-  color: #fff;
-  border-color: #FF6B6B;
-}
-
-/* 提示文本 */
-.form-tip {
-  font-size: 24rpx;
-  color: #999;
-  margin-left: 20rpx;
-  display: block;
-  margin-top: 10rpx;
-}
-
-/* 按钮组 */
-.button-group {
-  display: flex;
-  margin-top: 40rpx;
-  padding: 0 20rpx;
-}
-
-.preview-btn {
-  flex: 1;
-  margin-right: 20rpx;
-  background-color: #fff;
-  color: #FF6B6B;
-  border: 2rpx solid #FF6B6B;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.preview-btn::after {
-  border: none;
-}
-
-.submit-btn {
-  flex: 2;
-  background-color: #FF6B6B;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-}
-
-.submit-btn::after {
-  border: none;
-}
-
-button[disabled] {
-  opacity: 0.6;
-}

+ 0 - 218
miniprogram/pages/task-detail/task-detail.js

@@ -1,218 +0,0 @@
-// pages/task-detail/task-detail.js
-const app = getApp();
-const api = require('../../utils/api.js');
-
-Page({
-  data: {
-    taskId: 0,
-    task: null,
-    loading: true,
-    canComplete: false,
-    canReview: false,
-    remainingTime: '',
-    photoUrl: '',
-    voiceUrl: ''
-  },
-
-  onLoad(options) {
-    const taskId = options.id || 0;
-    this.setData({ taskId });
-    this.loadTaskDetail();
-  },
-
-  onShow() {
-    this.loadTaskDetail();
-  },
-
-  // 加载任务详情
-  loadTaskDetail() {
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockTask = {
-      id: this.data.taskId,
-      title: '写作业',
-      description: '完成数学和语文作业,认真书写,仔细检查',
-      points: 2,
-      deadline: '2026-03-31 20:00',
-      status: 'pending',
-      category: '学习',
-      needReview: true,
-      reviewByCategory: false,
-      createdAt: '2026-03-31 08:00',
-      creatorName: '妈妈',
-      childName: '小明',
-      completedAt: null,
-      reviewedAt: null
-    };
-
-    setTimeout(() => {
-      this.setData({
-        task: mockTask,
-        loading: false,
-        canComplete: mockTask.status === 'pending',
-        canReview: mockTask.status === 'completed' && mockTask.needReview
-      });
-      this.updateRemainingTime();
-      wx.setNavigationBarTitle({ title: mockTask.title });
-    }, 500);
-  },
-
-  // 更新剩余时间
-  updateRemainingTime() {
-    if (!this.data.task) return;
-    
-    const now = new Date();
-    const deadline = new Date(this.data.task.deadline);
-    const diff = deadline - now;
-    
-    if (diff <= 0) {
-      this.setData({ remainingTime: '已逾期' });
-      return;
-    }
-    
-    const hours = Math.floor(diff / (1000 * 60 * 60));
-    const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
-    
-    this.setData({ 
-      remainingTime: `${hours}小时${minutes}分钟` 
-    });
-  },
-
-  // 选择照片
-  onChoosePhoto() {
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success: (res) => {
-        const tempFilePath = res.tempFilePaths[0];
-        this.setData({ photoUrl: tempFilePath });
-        // 这里应该上传到服务器
-      }
-    });
-  },
-
-  // 选择语音
-  onChooseVoice() {
-    wx.chooseMessageFile({
-      count: 1,
-      type: 'file',
-      extension: ['mp3', 'wav', 'm4a'],
-      success: (res) => {
-        const tempFilePath = res.tempFilePaths[0];
-        this.setData({ voiceUrl: tempFilePath });
-        // 这里应该上传到服务器
-      }
-    });
-  },
-
-  // 完成任务
-  onCompleteTask() {
-    wx.showModal({
-      title: '确认完成',
-      content: '确定要完成这个任务吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doCompleteTask();
-        }
-      }
-    });
-  },
-
-  doCompleteTask() {
-    wx.showLoading({ title: '提交中...' });
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      
-      // 更新任务状态
-      const task = this.data.task;
-      task.status = 'completed';
-      task.completedAt = new Date().toLocaleString();
-      
-      this.setData({
-        task,
-        canComplete: false,
-        canReview: task.needReview
-      });
-      
-      // 显示积分动画
-      this.showPointsAnimation();
-      
-      wx.showToast({
-        title: '任务完成',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  // 显示积分动画
-  showPointsAnimation() {
-    wx.showModal({
-      title: '🎉 恭喜完成任务',
-      content: `获得 ${this.data.task.points} 积分`,
-      showCancel: false,
-      confirmText: '太棒了'
-    });
-  },
-
-  // 审核通过
-  onReviewPass() {
-    wx.showModal({
-      title: '审核确认',
-      content: '确定通过这个任务吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doReviewTask('pass');
-        }
-      }
-    });
-  },
-
-  // 审核拒绝
-  onReviewReject() {
-    wx.showModal({
-      title: '审核确认',
-      content: '确定拒绝这个任务吗?',
-      success: (res) => {
-        if (res.confirm) {
-          this.doReviewTask('reject');
-        }
-      }
-    });
-  },
-
-  doReviewTask(result) {
-    wx.showLoading({ title: '提交中...' });
-    
-    // 模拟API调用
-    setTimeout(() => {
-      wx.hideLoading();
-      
-      // 更新任务状态
-      const task = this.data.task;
-      task.status = result === 'pass' ? 'completed' : 'pending';
-      task.reviewedAt = new Date().toLocaleString();
-      
-      this.setData({
-        task,
-        canReview: false
-      });
-      
-      wx.showToast({
-        title: result === 'pass' ? '审核通过' : '已拒绝',
-        icon: 'success'
-      });
-    }, 1000);
-  },
-
-  // 分享
-  onShareAppMessage() {
-    return {
-      title: `${this.data.task?.childName}完成了任务「${this.data.task?.title}」`,
-      path: `/pages/task-detail/task-detail?id=${this.data.taskId}`
-    };
-  }
-});

+ 0 - 4
miniprogram/pages/task-detail/task-detail.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "任务详情",
-  "enablePullDownRefresh": false
-}

+ 0 - 105
miniprogram/pages/task-detail/task-detail.wxml

@@ -1,105 +0,0 @@
-<!--pages/task-detail/task-detail.wxml-->
-<view class="container">
-  <!-- 加载状态 -->
-  <view class="loading" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-
-  <!-- 任务详情 -->
-  <view class="task-detail" wx:else>
-    <!-- 任务头部 -->
-    <view class="task-header">
-      <view class="status-badge {{task.status}}">
-        <text>{{task.status === 'pending' ? '进行中' : task.status === 'completed' ? '已完成' : '已逾期'}}</text>
-      </view>
-      <text class="task-title">{{task.title}}</text>
-      <view class="task-meta">
-        <text class="task-points">+{{task.points}}分</text>
-        <text class="task-category">{{task.category}}</text>
-      </view>
-    </view>
-
-    <!-- 任务信息 -->
-    <view class="task-info">
-      <view class="info-item">
-        <text class="info-label">任务描述</text>
-        <text class="info-value">{{task.description}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">截止时间</text>
-        <text class="info-value">{{task.deadline}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">剩余时间</text>
-        <text class="info-value time-urgent">{{remainingTime}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">发布者</text>
-        <text class="info-value">{{task.creatorName}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">执行者</text>
-        <text class="info-value">{{task.childName}}</text>
-      </view>
-      
-      <view class="info-item">
-        <text class="info-label">需要审核</text>
-        <text class="info-value">{{task.needReview ? '是' : '否'}}</text>
-      </view>
-      
-      <view class="info-item" wx:if="{{task.completedAt}}">
-        <text class="info-label">完成时间</text>
-        <text class="info-value">{{task.completedAt}}</text>
-      </view>
-      
-      <view class="info-item" wx:if="{{task.reviewedAt}}">
-        <text class="info-label">审核时间</text>
-        <text class="info-value">{{task.reviewedAt}}</text>
-      </view>
-    </view>
-
-    <!-- 完成区域 -->
-    <view class="complete-section" wx:if="{{canComplete}}">
-      <text class="section-title">完成证明</text>
-      <view class="proof-upload">
-        <view class="proof-item" bindtap="onChoosePhoto">
-          <view class="proof-icon" wx:if="{{!photoUrl}}">📷</view>
-          <image class="proof-image" wx:else src="{{photoUrl}}" mode="aspectFill"></image>
-          <text class="proof-text">上传照片</text>
-        </view>
-        
-        <view class="proof-item" bindtap="onChooseVoice">
-          <view class="proof-icon" wx:if="{{!voiceUrl}}">🎤</view>
-          <view class="proof-icon" wx:else>✅</view>
-          <text class="proof-text">上传语音</text>
-        </view>
-      </view>
-      
-      <button class="complete-btn" bindtap="onCompleteTask">完成任务</button>
-    </view>
-
-    <!-- 审核区域 -->
-    <view class="review-section" wx:if="{{canReview}}">
-      <text class="section-title">任务审核</text>
-      <view class="review-buttons">
-        <button class="review-btn pass" bindtap="onReviewPass">通过</button>
-        <button class="review-btn reject" bindtap="onReviewReject">拒绝</button>
-      </view>
-    </view>
-
-    <!-- 任务状态提示 -->
-    <view class="status-tip" wx:if="{{task.status === 'completed' && !task.needReview}}">
-      <text class="tip-icon">✅</text>
-      <text class="tip-text">任务已完成,无需审核</text>
-    </view>
-    
-    <view class="status-tip" wx:if="{{task.status === 'completed' && task.needReview && !canReview}}">
-      <text class="tip-icon">⏳</text>
-      <text class="tip-text">任务已完成,等待审核</text>
-    </view>
-  </view>
-</view>

+ 0 - 224
miniprogram/pages/task-detail/task-detail.wxss

@@ -1,224 +0,0 @@
-/* pages/task-detail/task-detail.wxss */
-.container {
-  padding: 20rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-.loading {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 400rpx;
-  color: #999;
-  font-size: 28rpx;
-}
-
-/* 任务头部 */
-.task-header {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.status-badge {
-  display: inline-block;
-  padding: 8rpx 20rpx;
-  border-radius: 20rpx;
-  font-size: 24rpx;
-  color: #fff;
-  margin-bottom: 20rpx;
-}
-
-.status-badge.pending {
-  background-color: #FFD700;
-}
-
-.status-badge.completed {
-  background-color: #4CAF50;
-}
-
-.status-badge.overdue {
-  background-color: #F44336;
-}
-
-.task-title {
-  font-size: 40rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 20rpx;
-}
-
-.task-meta {
-  display: flex;
-  align-items: center;
-}
-
-.task-points {
-  font-size: 32rpx;
-  color: #FF6B6B;
-  font-weight: bold;
-  margin-right: 20rpx;
-}
-
-.task-category {
-  font-size: 26rpx;
-  color: #666;
-  background-color: #f0f0f0;
-  padding: 8rpx 16rpx;
-  border-radius: 16rpx;
-}
-
-/* 任务信息 */
-.task-info {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.info-item {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding: 20rpx 0;
-  border-bottom: 1rpx solid #f0f0f0;
-}
-
-.info-item:last-child {
-  border-bottom: none;
-}
-
-.info-label {
-  font-size: 28rpx;
-  color: #999;
-}
-
-.info-value {
-  font-size: 28rpx;
-  color: #333;
-  max-width: 60%;
-  text-align: right;
-}
-
-.time-urgent {
-  color: #F44336;
-  font-weight: bold;
-}
-
-/* 完成区域 */
-.complete-section, .review-section {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.section-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  display: block;
-  margin-bottom: 30rpx;
-}
-
-.proof-upload {
-  display: flex;
-  justify-content: space-around;
-  margin-bottom: 30rpx;
-}
-
-.proof-item {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  width: 200rpx;
-  height: 200rpx;
-  border: 2rpx dashed #ddd;
-  border-radius: 16rpx;
-  justify-content: center;
-}
-
-.proof-icon {
-  font-size: 60rpx;
-  margin-bottom: 10rpx;
-}
-
-.proof-image {
-  width: 200rpx;
-  height: 200rpx;
-  border-radius: 16rpx;
-}
-
-.proof-text {
-  font-size: 24rpx;
-  color: #666;
-}
-
-.complete-btn {
-  background-color: #4CAF50;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-  margin: 0;
-}
-
-.complete-btn::after {
-  border: none;
-}
-
-/* 审核按钮 */
-.review-buttons {
-  display: flex;
-  justify-content: space-around;
-}
-
-.review-btn {
-  flex: 1;
-  margin: 0 10rpx;
-  border-radius: 50rpx;
-  padding: 24rpx;
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #fff;
-}
-
-.review-btn.pass {
-  background-color: #4CAF50;
-}
-
-.review-btn.reject {
-  background-color: #F44336;
-}
-
-.review-btn::after {
-  border: none;
-}
-
-/* 状态提示 */
-.status-tip {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.tip-icon {
-  font-size: 40rpx;
-  margin-right: 20rpx;
-}
-
-.tip-text {
-  font-size: 28rpx;
-  color: #666;
-}

+ 0 - 151
miniprogram/pages/task-list/task-list.js

@@ -1,151 +0,0 @@
-// pages/task-list/task-list.js
-const app = getApp();
-const api = require('../../utils/api.js');
-
-Page({
-  data: {
-    childId: 0,
-    childName: '',
-    dateType: 'today', // today, week, month
-    statusFilter: 'all', // all, pending, completed, overdue
-    tasks: [],
-    filteredTasks: [],
-    loading: false,
-    page: 1,
-    hasMore: true
-  },
-
-  onLoad(options) {
-    const childId = options.childId || 0;
-    const childName = options.childName || '';
-    this.setData({ childId, childName });
-    wx.setNavigationBarTitle({ title: childName ? `${childName}的任务` : '任务列表' });
-  },
-
-  onShow() {
-    this.loadTasks();
-  },
-
-  // 加载任务列表
-  loadTasks(refresh = false) {
-    if (refresh) {
-      this.setData({ page: 1, hasMore: true });
-    }
-    
-    this.setData({ loading: true });
-    
-    // 模拟数据
-    const mockTasks = [
-      {
-        id: 1,
-        title: '写作业',
-        description: '完成数学和语文作业',
-        points: 2,
-        deadline: '2026-03-31 20:00',
-        status: 'pending',
-        category: '学习',
-        needReview: true
-      },
-      {
-        id: 2,
-        title: '练琴',
-        description: '练习钢琴30分钟',
-        points: 3,
-        deadline: '2026-03-31 19:00',
-        status: 'completed',
-        category: '艺术',
-        needReview: false
-      },
-      {
-        id: 3,
-        title: '阅读20分钟',
-        description: '阅读课外书籍',
-        points: 2,
-        deadline: '2026-03-31 21:00',
-        status: 'overdue',
-        category: '学习',
-        needReview: true
-      }
-    ];
-
-    setTimeout(() => {
-      this.setData({
-        tasks: mockTasks,
-        filteredTasks: mockTasks,
-        loading: false
-      });
-      this.applyFilters();
-    }, 500);
-  },
-
-  // 应用筛选
-  applyFilters() {
-    let filtered = this.data.tasks;
-    
-    // 按状态筛选
-    if (this.data.statusFilter !== 'all') {
-      filtered = filtered.filter(task => task.status === this.data.statusFilter);
-    }
-    
-    // 按日期筛选
-    const now = new Date();
-    if (this.data.dateType === 'today') {
-      filtered = filtered.filter(task => {
-        const deadline = new Date(task.deadline);
-        return deadline.toDateString() === now.toDateString();
-      });
-    } else if (this.data.dateType === 'week') {
-      const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
-      filtered = filtered.filter(task => {
-        const deadline = new Date(task.deadline);
-        return deadline >= weekAgo;
-      });
-    }
-    
-    this.setData({ filteredTasks: filtered });
-  },
-
-  // 切换日期类型
-  onDateTypeChange(e) {
-    this.setData({ dateType: e.currentTarget.dataset.type });
-    this.applyFilters();
-  },
-
-  // 切换状态筛选
-  onStatusFilterChange(e) {
-    this.setData({ statusFilter: e.currentTarget.dataset.status });
-    this.applyFilters();
-  },
-
-  // 任务点击
-  onTaskTap(e) {
-    const taskId = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: `/pages/task-detail/task-detail?id=${taskId}`
-    });
-  },
-
-  // 创建任务
-  onCreateTask() {
-    wx.navigateTo({
-      url: `/pages/task-create/task-create?childId=${this.data.childId}`
-    });
-  },
-
-  // 下拉刷新
-  onPullDownRefresh() {
-    this.loadTasks(true);
-    wx.stopPullDownRefresh();
-  },
-
-  // 加载更多
-  onReachBottom() {
-    if (this.data.hasMore && !this.data.loading) {
-      this.loadMoreTasks();
-    }
-  },
-
-  loadMoreTasks() {
-    // 实现加载更多逻辑
-  }
-});

+ 0 - 5
miniprogram/pages/task-list/task-list.json

@@ -1,5 +0,0 @@
-{
-  "navigationBarTitleText": "任务列表",
-  "enablePullDownRefresh": true,
-  "backgroundColor": "#f5f5f5"
-}

+ 0 - 100
miniprogram/pages/task-list/task-list.wxml

@@ -1,100 +0,0 @@
-<!--pages/task-list/task-list.wxml-->
-<view class="container">
-  <!-- 筛选栏 -->
-  <view class="filter-bar">
-    <view class="date-filter">
-      <view 
-        class="filter-item {{dateType === 'today' ? 'active' : ''}}"
-        data-type="today"
-        bindtap="onDateTypeChange"
-      >今日</view>
-      <view 
-        class="filter-item {{dateType === 'week' ? 'active' : ''}}"
-        data-type="week"
-        bindtap="onDateTypeChange"
-      >本周</view>
-      <view 
-        class="filter-item {{dateType === 'month' ? 'active' : ''}}"
-        data-type="month"
-        bindtap="onDateTypeChange"
-      >本月</view>
-    </view>
-    
-    <view class="status-filter">
-      <view 
-        class="filter-item {{statusFilter === 'all' ? 'active' : ''}}"
-        data-status="all"
-        bindtap="onStatusFilterChange"
-      >全部</view>
-      <view 
-        class="filter-item {{statusFilter === 'pending' ? 'active' : ''}}"
-        data-status="pending"
-        bindtap="onStatusFilterChange"
-      >进行中</view>
-      <view 
-        class="filter-item {{statusFilter === 'completed' ? 'active' : ''}}"
-        data-status="completed"
-        bindtap="onStatusFilterChange"
-      >已完成</view>
-      <view 
-        class="filter-item {{statusFilter === 'overdue' ? 'active' : ''}}"
-        data-status="overdue"
-        bindtap="onStatusFilterChange"
-      >已逾期</view>
-    </view>
-  </view>
-
-  <!-- 任务列表 -->
-  <view class="task-list">
-    <block wx:if="{{filteredTasks.length > 0}}">
-      <view 
-        class="task-item {{item.status}}"
-        wx:for="{{filteredTasks}}"
-        wx:key="id"
-        data-id="{{item.id}}"
-        bindtap="onTaskTap"
-      >
-        <view class="task-status-indicator">
-          <view class="status-dot {{item.status}}"></view>
-        </view>
-        
-        <view class="task-content">
-          <view class="task-header">
-            <text class="task-title">{{item.title}}</text>
-            <text class="task-points">+{{item.points}}分</text>
-          </view>
-          
-          <text class="task-desc">{{item.description}}</text>
-          
-          <view class="task-footer">
-            <text class="task-category">{{item.category}}</text>
-            <text class="task-deadline">截止: {{item.deadline}}</text>
-            <text class="task-review" wx:if="{{item.needReview}}">需要审核</text>
-          </view>
-        </view>
-        
-        <view class="task-arrow">
-          <text class="arrow-icon">></text>
-        </view>
-      </view>
-    </block>
-    
-    <!-- 空状态 -->
-    <view class="empty-state" wx:else>
-      <image class="empty-icon" src="/images/empty-task.svg" mode="aspectFit"></image>
-      <text class="empty-text">暂无任务</text>
-      <text class="empty-desc">点击下方按钮创建第一个任务</text>
-    </view>
-  </view>
-
-  <!-- 加载状态 -->
-  <view class="loading-state" wx:if="{{loading}}">
-    <text>加载中...</text>
-  </view>
-
-  <!-- 创建任务按钮 -->
-  <view class="create-btn" bindtap="onCreateTask">
-    <text class="create-icon">+</text>
-    <text class="create-text">创建任务</text>
-  </view>
-</view>

+ 0 - 203
miniprogram/pages/task-list/task-list.wxss

@@ -1,203 +0,0 @@
-/* pages/task-list/task-list.wxss */
-.container {
-  padding: 20rpx;
-  padding-bottom: 120rpx;
-  background-color: #f5f5f5;
-  min-height: 100vh;
-}
-
-/* 筛选栏 */
-.filter-bar {
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.date-filter, .status-filter {
-  display: flex;
-  margin-bottom: 20rpx;
-}
-
-.date-filter:last-child, .status-filter:last-child {
-  margin-bottom: 0;
-}
-
-.filter-item {
-  flex: 1;
-  text-align: center;
-  padding: 16rpx 0;
-  font-size: 28rpx;
-  color: #666;
-  border-radius: 8rpx;
-  margin-right: 10rpx;
-  background-color: #f5f5f5;
-}
-
-.filter-item:last-child {
-  margin-right: 0;
-}
-
-.filter-item.active {
-  background-color: #FF6B6B;
-  color: #fff;
-}
-
-/* 任务列表 */
-.task-list {
-  margin-bottom: 40rpx;
-}
-
-.task-item {
-  display: flex;
-  align-items: center;
-  background-color: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  margin-bottom: 20rpx;
-  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
-}
-
-.task-status-indicator {
-  margin-right: 20rpx;
-}
-
-.status-dot {
-  width: 20rpx;
-  height: 20rpx;
-  border-radius: 50%;
-  background-color: #ddd;
-}
-
-.status-dot.pending {
-  background-color: #FFD700;
-}
-
-.status-dot.completed {
-  background-color: #4CAF50;
-}
-
-.status-dot.overdue {
-  background-color: #F44336;
-}
-
-.task-content {
-  flex: 1;
-}
-
-.task-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 10rpx;
-}
-
-.task-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-}
-
-.task-points {
-  font-size: 28rpx;
-  color: #FF6B6B;
-  font-weight: bold;
-}
-
-.task-desc {
-  font-size: 26rpx;
-  color: #666;
-  margin-bottom: 10rpx;
-  display: block;
-}
-
-.task-footer {
-  display: flex;
-  align-items: center;
-  font-size: 24rpx;
-  color: #999;
-}
-
-.task-category {
-  background-color: #f0f0f0;
-  padding: 4rpx 12rpx;
-  border-radius: 12rpx;
-  margin-right: 10rpx;
-}
-
-.task-deadline {
-  margin-right: 10rpx;
-}
-
-.task-review {
-  color: #FF6B6B;
-  font-size: 22rpx;
-}
-
-.task-arrow {
-  margin-left: 20rpx;
-}
-
-.arrow-icon {
-  color: #ccc;
-  font-size: 28rpx;
-}
-
-/* 空状态 */
-.empty-state {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 100rpx 0;
-}
-
-.empty-icon {
-  width: 200rpx;
-  height: 200rpx;
-  margin-bottom: 30rpx;
-}
-
-.empty-text {
-  font-size: 32rpx;
-  color: #333;
-  margin-bottom: 10rpx;
-}
-
-.empty-desc {
-  font-size: 28rpx;
-  color: #999;
-}
-
-/* 加载状态 */
-.loading-state {
-  text-align: center;
-  padding: 40rpx 0;
-  color: #999;
-  font-size: 28rpx;
-}
-
-/* 创建按钮 */
-.create-btn {
-  position: fixed;
-  bottom: 40rpx;
-  left: 50%;
-  transform: translateX(-50%);
-  background-color: #FF6B6B;
-  color: #fff;
-  border-radius: 50rpx;
-  padding: 20rpx 60rpx;
-  display: flex;
-  align-items: center;
-  box-shadow: 0 4rpx 20rpx rgba(255, 107, 107, 0.3);
-}
-
-.create-icon {
-  font-size: 40rpx;
-  margin-right: 10rpx;
-}
-
-.create-text {
-  font-size: 32rpx;
-  font-weight: bold;
-}

+ 0 - 9
miniprogram/sitemap.json

@@ -1,9 +0,0 @@
-{
-  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
-  "rules": [
-    {
-      "action": "allow",
-      "page": "*"
-    }
-  ]
-}

+ 0 - 71
miniprogram/utils/api.js

@@ -1,71 +0,0 @@
-// api.js - 网络请求封装
-const app = getApp();
-
-const request = (url, method = 'GET', data = {}) => {
-  return new Promise((resolve, reject) => {
-    wx.request({
-      url: app.globalData.baseUrl + url,
-      method,
-      data,
-      header: {
-        'Authorization': 'Bearer ' + app.globalData.token,
-        'Content-Type': 'application/json'
-      },
-      success(res) {
-        if (res.statusCode === 200 && res.data.code === 200) {
-          resolve(res.data.data);
-        } else {
-          reject(res.data || { code: 500, message: '请求失败' });
-        }
-      },
-      fail(err) {
-        reject({ code: 500, message: '网络请求失败' });
-      }
-    });
-  });
-};
-
-// ============ 认证接口 ============
-const login = (data) => request('/auth/login', 'POST', data);
-const getUserInfo = () => request('/auth/info');
-
-// ============ 任务接口 ============
-const getTodayTasks = (childId) => request(`/tasks/today/${childId}`);
-const getTaskDetail = (taskId) => request(`/tasks/${taskId}`);
-const createTask = (data) => request('/tasks', 'POST', data);
-const completeTask = (taskId, data) => request(`/tasks/${taskId}/complete`, 'POST', data);
-const reviewTask = (taskId, data) => request(`/tasks/${taskId}/review`, 'POST', data);
-const getFamilyTasks = (familyId) => request(`/tasks/family/${familyId}`);
-
-// ============ 奖励接口 ============
-const getRewards = (familyId) => request(`/rewards/family/${familyId}`);
-const getRewardDetail = (rewardId) => request(`/rewards/${rewardId}`);
-const createReward = (data) => request('/rewards', 'POST', data);
-const updateReward = (rewardId, data) => request(`/rewards/${rewardId}`, 'PUT', data);
-const getDefaultRewards = () => request('/rewards/defaults');
-
-// ============ 积分接口 ============
-const getPointsBalance = (childId) => request(`/points/balance/${childId}`);
-const getPointsLog = (childId) => request(`/points/log/${childId}`);
-
-module.exports = {
-  // 认证
-  login,
-  getUserInfo,
-  // 任务
-  getTodayTasks,
-  getTaskDetail,
-  createTask,
-  completeTask,
-  reviewTask,
-  getFamilyTasks,
-  // 奖励
-  getRewards,
-  getRewardDetail,
-  createReward,
-  updateReward,
-  getDefaultRewards,
-  // 积分
-  getPointsBalance,
-  getPointsLog
-};

+ 0 - 76
miniprogram/utils/util.js

@@ -1,76 +0,0 @@
-// util.js - 工具函数
-
-/**
- * 格式化日期
- */
-const formatDate = (date, format = 'YYYY-MM-DD HH:mm') => {
-  const d = new Date(date);
-  const year = d.getFullYear();
-  const month = String(d.getMonth() + 1).padStart(2, '0');
-  const day = String(d.getDate()).padStart(2, '0');
-  const hour = String(d.getHours()).padStart(2, '0');
-  const minute = String(d.getMinutes()).padStart(2, '0');
-  
-  return format
-    .replace('YYYY', year)
-    .replace('MM', month)
-    .replace('DD', day)
-    .replace('HH', hour)
-    .replace('mm', minute);
-};
-
-/**
- * 格式化时间显示(如:3小时前、刚刚)
- */
-const formatTimeAgo = (date) => {
-  const now = new Date();
-  const d = new Date(date);
-  const diff = Math.floor((now - d) / 1000);
-  
-  if (diff < 60) return '刚刚';
-  if (diff < 3600) return Math.floor(diff / 60) + '分钟前';
-  if (diff < 86400) return Math.floor(diff / 3600) + '小时前';
-  if (diff < 604800) return Math.floor(diff / 86400) + '天前';
-  return formatDate(date, 'MM-DD');
-};
-
-/**
- * 计算剩余时间
- */
-const calcRemainingTime = (deadline) => {
-  const now = new Date();
-  const end = new Date(deadline);
-  const diff = end - now;
-  
-  if (diff <= 0) return { text: '已截止', isOverdue: true };
-  
-  const hours = Math.floor(diff / 3600000);
-  const minutes = Math.floor((diff % 3600000) / 60000);
-  const seconds = Math.floor((diff % 60000) / 1000);
-  
-  return {
-    hours,
-    minutes,
-    seconds,
-    text: `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`,
-    isOverdue: false
-  };
-};
-
-/**
- * 防抖函数
- */
-const debounce = (fn, delay = 500) => {
-  let timer = null;
-  return function (...args) {
-    if (timer) clearTimeout(timer);
-    timer = setTimeout(() => fn.apply(this, args), delay);
-  };
-};
-
-module.exports = {
-  formatDate,
-  formatTimeAgo,
-  calcRemainingTime,
-  debounce
-};