Procházet zdrojové kódy

修复程序报错

jiapu před 4 měsíci
rodič
revize
efea6860e7
32 změnil soubory, kde provedl 70 přidání a 59 odebrání
  1. 1 1
      cfc-frontend/components/ActionArticleRecommend.vue
  2. 28 26
      cfc-frontend/components/ContactCard.vue
  3. 1 1
      cfc-frontend/components/DimensionActivities.vue
  4. 1 1
      cfc-frontend/components/DimensionArticles.vue
  5. 1 1
      cfc-frontend/components/DimensionProducts.vue
  6. 1 1
      cfc-frontend/components/HealthDimensionsSection.vue
  7. 1 1
      cfc-frontend/components/member-detail-sections/mind-section.vue
  8. 1 1
      cfc-frontend/config.js
  9. 2 2
      cfc-frontend/pages.json
  10. 1 1
      cfc-frontend/pages/butler/apply/index.vue
  11. 3 3
      cfc-frontend/pages/health/report-confirm.vue
  12. 1 1
      cfc-frontend/pages/index/index.vue
  13. 1 1
      cfc-frontend/pages/index/parent-index.vue
  14. 1 1
      cfc-frontend/pages/shop/address-edit/address-edit.vue
  15. 1 1
      cfc-web/.env.development
  16. 1 0
      cfc-web/src/views/Dashboard.vue
  17. 3 3
      cfc-web/src/views/GuideFamilyTask.vue
  18. 1 1
      cfc-web/src/views/Rewards.vue
  19. 6 5
      cfc-web/src/views/TaskTemplates.vue
  20. 1 2
      cfc-web/src/views/Users.vue
  21. 1 1
      cfc-web/src/views/Wishes.vue
  22. 2 2
      cfc-web/src/views/admin/ArticleManage.vue
  23. 1 0
      cfc-web/src/views/admin/EmotionAlertManage.vue
  24. 1 0
      cfc-web/src/views/admin/EnergyRuleManagement.vue
  25. 1 0
      cfc-web/src/views/admin/GrowthTaskManagement.vue
  26. 1 0
      cfc-web/src/views/admin/KnowledgeTag.vue
  27. 1 0
      cfc-web/src/views/admin/MembershipCenter.vue
  28. 1 0
      cfc-web/src/views/admin/ProductProfitRate.vue
  29. 1 0
      cfc-web/src/views/admin/VirtualTeamDetail.vue
  30. 0 1
      cfc-web/src/views/admin/data-source-config.vue
  31. 1 0
      cfc-web/src/views/nutritionist/NutritionMappings.vue
  32. 2 1
      cfc-web/src/views/teacher/TeacherTeam.vue

+ 1 - 1
cfc-frontend/components/ActionArticleRecommend.vue

@@ -18,7 +18,7 @@
       <view
         class="rec-card"
         v-for="(article, idx) in displayArticles"
-        :key="article.id || idx"
+        :key="idx"
         @click="$emit('articleClick', article)"
       >
         <!-- 封面图(可选) -->

+ 28 - 26
cfc-frontend/components/ContactCard.vue

@@ -1,31 +1,32 @@
 <template>
-  <view class="contact-card" @click="$emit('click', contact)">
-    <view class="card-avatar" :style="{ background: avatarColor }">
-      <text class="avatar-text">{{ initial }}</text>
-    </view>
-    <text class="card-name">{{ contact.name }}</text>
-    <view class="card-type-tag" :style="{ background: typeColor + '20', color: typeColor }">
-      {{ typeLabel }}
-    </view>
-    <text class="card-known" v-if="contact.knownSince">
-      认识 {{ knownYears }} 年
-    </text>
-    <text class="card-phone" v-if="contact.phone">{{ contact.phone }}</text>
-    <view class="card-intimacy">
-      <text class="intimacy-heart">❤️</text>
-      <text class="intimacy-value">{{ contact.intimacyLevel }}</text>
-    </view>
-    <text class="card-birthday" v-if="contact.birthdayCountdown">
-      🎂 {{ contact.birthdayLabel }} · {{ contact.birthdayCountdown }}
-    </text>
-    <view class="card-family-status" v-if="contact.familyMemberId">
-      <text class="family-badge">已是家庭成员</text>
-    </view>
-    <view class="card-invite" v-else @click.stop="handleInvite">
-      <text class="invite-text">邀请加入家庭</text>
+  <view>
+    <view class="contact-card" @click="$emit('click', contact)">
+      <view class="card-avatar" :style="{ background: avatarColor }">
+        <text class="avatar-text">{{ initial }}</text>
+      </view>
+      <text class="card-name">{{ contact.name }}</text>
+      <view class="card-type-tag" :style="{ background: typeColor + '20', color: typeColor }">
+        {{ typeLabel }}
+      </view>
+      <text class="card-known" v-if="contact.knownSince">
+        认识 {{ knownYears }} 年
+      </text>
+      <text class="card-phone" v-if="contact.phone">{{ contact.phone }}</text>
+      <view class="card-intimacy">
+        <text class="intimacy-heart">❤️</text>
+        <text class="intimacy-value">{{ contact.intimacyLevel }}</text>
+      </view>
+      <text class="card-birthday" v-if="contact.birthdayCountdown">
+        🎂 {{ contact.birthdayLabel }} · {{ contact.birthdayCountdown }}
+      </text>
+      <view class="card-family-status" v-if="contact.familyMemberId">
+        <text class="family-badge">已是家庭成员</text>
+      </view>
+      <view class="card-invite" v-else @click.stop="handleInvite">
+        <text class="invite-text">邀请加入家庭</text>
+      </view>
     </view>
-  </view>
-  <view class="invite-modal" v-if="showInviteModal" @click.stop>
+    <view class="invite-modal" v-if="showInviteModal" @click.stop>
     <view class="modal-mask" @click="showInviteModal = false"></view>
     <view class="modal-content">
       <text class="modal-title">邀请加入家庭</text>
@@ -47,6 +48,7 @@
       </view>
     </view>
   </view>
+  </view>
 </template>
 
 <script>

+ 1 - 1
cfc-frontend/components/DimensionActivities.vue

@@ -7,7 +7,7 @@
     <view class="activity-list">
       <!-- 无数据时显示占位卡片 -->
       <template v-if="!displayActivities || displayActivities.length === 0">
-        <view class="activity-card" v-for="i in 3" :key="'ph-' + i">
+        <view class="activity-card" v-for="i in 3" :key="i">
           <view class="article-category" :style="{ background: gradientColors[(i-1) % gradientColors.length] }">
             <text class="article-category-text">推荐活动</text>
           </view>

+ 1 - 1
cfc-frontend/components/DimensionArticles.vue

@@ -7,7 +7,7 @@
     <view class="article-list">
       <!-- 无数据时显示占位卡片 -->
       <template v-if="!displayArticles || displayArticles.length === 0">
-        <view class="article-card" v-for="i in 3" :key="'ph-' + i">
+        <view class="article-card" v-for="i in 3" :key="i">
           <view class="article-category" :style="{ background: colors[(i-1) % colors.length] }">
             <text class="article-category-text">推荐文章</text>
           </view>

+ 1 - 1
cfc-frontend/components/DimensionProducts.vue

@@ -7,7 +7,7 @@
     <view class="product-list">
       <!-- 无数据时显示占位卡片 -->
       <template v-if="!displayProducts || displayProducts.length === 0">
-        <view class="product-card" v-for="i in 2" :key="'ph-' + i">
+        <view class="product-card" v-for="i in 2" :key="i">
           <view class="product-img-placeholder"></view>
           <text class="product-name line-clamp-2">暂无推荐商品</text>
           <text class="product-price">--</text>

+ 1 - 1
cfc-frontend/components/HealthDimensionsSection.vue

@@ -15,7 +15,7 @@
       <view
         class="dimension-item"
         v-for="dim in displayDimensions"
-        :key="dim.dimension || dim.key"
+        :key="dim.dimension"
         @click="goDimensionDetail(dim)">
         <text class="dimension-icon">{{ getDimIcon(dim.dimension || dim.key) }}</text>
         <text class="dimension-name">{{ dim.label }}</text>

+ 1 - 1
cfc-frontend/components/member-detail-sections/mind-section.vue

@@ -42,7 +42,7 @@
       <view class="section-header">
         <text class="section-title">🎯 即将到来的里程碑</text>
       </view>
-      <view class="milestone-item" v-for="ms in milestones" :key="ms.id || ms.title">
+      <view class="milestone-item" v-for="ms in milestones" :key="ms.id">
         <text class="milestone-title">{{ ms.title }}</text>
         <text class="milestone-date">{{ ms.date }}</text>
       </view>

+ 1 - 1
cfc-frontend/config.js

@@ -19,7 +19,7 @@ try {
   if (env) {
     switch (env) {
       case 'develop':
-        API_BASE_URL = 'https://cf-club.iwintrue.com'
+        API_BASE_URL = 'http://localhost:9082'
         break
       case 'trial':
         API_BASE_URL = 'https://cfc.iwintrue.com'

+ 2 - 2
cfc-frontend/pages.json

@@ -725,7 +725,7 @@
       "root": "pages/nutritionist",
       "pages": [
         {
-          "path": "apply",
+          "path": "apply/index",
           "style": {
             "navigationBarTitleText": "营养师入驻"
           }
@@ -736,7 +736,7 @@
       "root": "pages/butler",
       "pages": [
         {
-          "path": "apply",
+          "path": "apply/index",
           "style": {
             "navigationBarTitleText": "管家入驻"
           }

+ 1 - 1
cfc-frontend/pages/butler/apply/index.vue

@@ -41,7 +41,7 @@
 </template>
 
 <script>
-import { butlerApply } from '../../utils/api'
+import { butlerApply } from '../../../utils/api'
 
 export default {
   data() {

+ 3 - 3
cfc-frontend/pages/health/report-confirm.vue

@@ -64,7 +64,7 @@
           <view
             class="candidate-item"
             v-for="(cand, idx) in candidates"
-            :key="cand.id || idx"
+            :key="idx"
             :class="{ 'candidate-selected': selectedMemberId === (cand.id || cand.userId) }"
             @click="selectCandidate(cand)"
           >
@@ -89,8 +89,8 @@
         <view class="member-list" v-if="familyMembers.length > 0 && (candidates.length === 0 || !showCandidatesOnly)">
           <view
             class="member-item"
-            v-for="member in familyMembers"
-            :key="member.userId || member.id"
+            v-for="(member, idx) in familyMembers"
+            :key="idx"
             :class="{ 'member-selected': selectedMemberId === (member.userId || member.id) }"
             @click="selectMember(member)"
           >

+ 1 - 1
cfc-frontend/pages/index/index.vue

@@ -137,7 +137,7 @@
         </view>
         <!-- 无数据时显示占位卡片 -->
         <template v-else-if="indexArticles.length === 0">
-          <view class="article-card" v-for="i in 3" :key="'ph-' + i">
+          <view class="article-card" v-for="i in 3" :key="i">
             <view class="article-category" :style="{ background: gradientColors[(i-1) % gradientColors.length] }">
               <text class="article-category-text">推荐文章</text>
             </view>

+ 1 - 1
cfc-frontend/pages/index/parent-index.vue

@@ -261,7 +261,7 @@
           </view>
           <!-- 无数据时显示占位卡片 -->
           <template v-else-if="indexArticles.length === 0">
-            <view class="article-card" v-for="i in 3" :key="'ph-' + i">
+            <view class="article-card" v-for="i in 3" :key="i">
               <view class="article-category" :style="{ background: gradientColors[(i-1) % gradientColors.length] }">
                 <text class="article-category-text">推荐文章</text>
               </view>

+ 1 - 1
cfc-frontend/pages/shop/address-edit/address-edit.vue

@@ -77,7 +77,7 @@
           <scroll-view class="region-list" scroll-y>
             <view
               v-for="item in currentRegionItems"
-              :key="item.id || item.code"
+              :key="item.id"
               :class="['region-item', isRegionSelected(item) ? 'region-item-selected' : '']"
               @click="selectRegionItem(item)"
             >

+ 1 - 1
cfc-web/.env.development

@@ -1,2 +1,2 @@
-VUE_APP_BASE_API=http://192.168.16.18:9082
+VUE_APP_BASE_API=http://localhost:9082
 VUE_APP_SKIP_CAPTCHA=true

+ 1 - 0
cfc-web/src/views/Dashboard.vue

@@ -319,6 +319,7 @@
     >
       <div v-loading="changelogLoading" class="changelog-body" v-html="changelogContent"></div>
     </el-dialog>
+    </div>
   </div>
 </template>
 

+ 3 - 3
cfc-web/src/views/GuideFamilyTask.vue

@@ -132,10 +132,10 @@
             </el-dropdown>
           </template>
         </el-table-column>
-    </el-table></div>
+      </el-table>
 
-    <!-- 分页 -->
-    <el-pagination
+      <!-- 分页 -->
+      <el-pagination
         v-if="searchForm.childId && total > 0"
         style="margin-top: 20px; text-align: right"
         :current-page="pagination.page"

+ 1 - 1
cfc-web/src/views/Rewards.vue

@@ -53,7 +53,7 @@
           <!-- 家庭选择对话框 -->
           <el-dialog title="选择家庭" :visible.sync="familyDialogVisible" width="600px">
             <div style="overflow:auto;max-height:calc(100vh - 300px);">
-<el-table style="max-height:calc(100vh - 300px);" :data="familyList" border v-loading="familyLoading" @row-click="selectFamily" style="cursor: pointer">
+<el-table style="max-height:calc(100vh - 300px);cursor: pointer" :data="familyList" border v-loading="familyLoading" @row-click="selectFamily">
               <el-table-column prop="id" label="ID" width="80"></el-table-column>
               <el-table-column prop="name" label="家庭名称" min-width="150"></el-table-column>
               <el-table-column prop="inviteCode" label="邀请码" width="120"></el-table-column>

+ 6 - 5
cfc-web/src/views/TaskTemplates.vue

@@ -54,15 +54,15 @@
       </el-form>
 
       <!-- 模板列表 -->
-      <el-table
+      <div style="overflow:auto;max-height:calc(100vh - 300px);">
+      <el-table 
         :data="tableData"
         border
         v-loading="loading"
-        style="width: 100%"
+        style="max-height:calc(100vh - 300px);width: 100%"
       >
         <el-table-column prop="id" label="ID" width="80"></el-table-column>
-        <div style="overflow:auto;max-height:calc(100vh - 300px);">
-<el-table style="max-height:calc(100vh - 300px);"-column prop="title" label="模板名称" min-width="200"></el-table-column>
+        <el-table-column prop="title" label="模板名称" min-width="200"></el-table-column>
         <el-table-column prop="category" label="分类" width="100">
           <template slot-scope="scope">
             <el-tag :type="getCategoryType(scope.row.category)" size="small">
@@ -140,7 +140,8 @@
             </el-button>
           </template>
         </el-table-column>
-        </el-table></div>
+      </el-table>
+      </div>
 
       <!-- 分页 -->
       <el-pagination

+ 1 - 2
cfc-web/src/views/Users.vue

@@ -51,11 +51,10 @@
 
       <!-- 用户列表 -->
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
-<el-table style="max-height:calc(100vh - 300px);" 
+<el-table style="max-height:calc(100vh - 300px);width: 100%" 
         :data="tableData" 
         border 
         v-loading="loading"
-        style="width: 100%"
       >
         <el-table-column prop="id" label="ID" width="80"></el-table-column>
         <el-table-column prop="nickname" label="昵称" width="150"></el-table-column>

+ 1 - 1
cfc-web/src/views/Wishes.vue

@@ -49,7 +49,7 @@
           <div v-if="draftWishes.length > 0" class="wish-section">
             <div class="section-title">📝 待定价</div>
             <div style="overflow:auto;max-height:calc(100vh - 300px);">
-<el-table style="max-height:calc(100vh - 300px);" :data="draftWishes" border v-loading="loading" style="width: 100%">
+<el-table style="max-height:calc(100vh - 300px);width: 100%" :data="draftWishes" border v-loading="loading">
               <el-table-column prop="id" label="ID" width="80"></el-table-column>
               <el-table-column prop="childName" label="孩子" width="100"></el-table-column>
               <el-table-column prop="title" label="心愿名称" min-width="200"></el-table-column>

+ 2 - 2
cfc-web/src/views/admin/ArticleManage.vue

@@ -201,9 +201,9 @@
               </el-dropdown>
             </template>
           </template>
+        </el-table-column>
         </el-table>
         </div>
-      </div>
 
       <div class="pagination-wrap">
         <el-pagination
@@ -217,7 +217,7 @@
         />
       </div>
     </el-card>
-  </div>
+    </div>
 
   <!-- 驳回弹窗 -->
   <el-dialog title="驳回原因" :visible.sync="rejectDialogVisible" width="400px">

+ 1 - 0
cfc-web/src/views/admin/EmotionAlertManage.vue

@@ -8,6 +8,7 @@
         <el-radio-button label="false">未处理</el-radio-button>
         <el-radio-button label="true">已处理</el-radio-button>
       </el-radio-group>
+      </div>
     <div style="overflow:auto;max-height:calc(100vh - 300px);">
     <el-table style="max-height:calc(100vh - 300px);" :data="list" v-loading="loading" border stripe>
       <el-table-column prop="id" label="ID" width="70" />

+ 1 - 0
cfc-web/src/views/admin/EnergyRuleManagement.vue

@@ -10,6 +10,7 @@
         </el-select>
         <el-button type="primary" icon="el-icon-plus" @click="showDialog(null)">新增规则</el-button>
       </div>
+      </div>
     <div style="overflow:auto;max-height:calc(100vh - 300px);">
     <el-table style="max-height:calc(100vh - 300px);" :data="list" v-loading="loading" border stripe>
       <el-table-column prop="id" label="ID" width="60" />

+ 1 - 0
cfc-web/src/views/admin/GrowthTaskManagement.vue

@@ -19,6 +19,7 @@
           </el-select>
           <el-button type="primary" size="mini" @click="openCreate">创建任务</el-button>
         </div>
+      </div>
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table style="max-height:calc(100vh - 300px);" :data="tasks" v-loading="loading" border stripe>
         <el-table-column prop="id" label="ID" width="80" />

+ 1 - 0
cfc-web/src/views/admin/KnowledgeTag.vue

@@ -7,6 +7,7 @@
           <el-input v-model="keyword" placeholder="搜索标签名称..." prefix-icon="el-icon-search" size="small" clearable style="width: 200px;" />
           <el-button type="primary" size="small" @click="handleCreate">+ 新增标签</el-button>
         </div>
+      </div>
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table style="max-height:calc(100vh - 300px);" :data="filteredTags" v-loading="loading" border stripe>
         <el-table-column prop="id" label="ID" width="70" />

+ 1 - 0
cfc-web/src/views/admin/MembershipCenter.vue

@@ -32,6 +32,7 @@
     <el-card style="margin-bottom:20px;">
       <div slot="header">
         <span>会员等级配置</span>
+      </div>
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table style="max-height:calc(100vh - 300px);" :data="levels" v-loading="levelsLoading" border stripe>
         <el-table-column prop="levelCode" label="等级编码" width="120">

+ 1 - 0
cfc-web/src/views/admin/ProductProfitRate.vue

@@ -12,6 +12,7 @@
         </el-select>
         <el-button type="primary" @click="loadList">查询</el-button>
       </div>
+      </div>
     <div style="overflow:auto;max-height:calc(100vh - 300px);">
     <el-table style="max-height:calc(100vh - 300px);" :data="list" v-loading="loading" border stripe>
       <el-table-column prop="id" label="ID" width="70" />

+ 1 - 0
cfc-web/src/views/admin/VirtualTeamDetail.vue

@@ -19,6 +19,7 @@
     <el-card style="margin-top: 16px">
       <div slot="header">
         <span>成员列表</span>
+      </div>
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table style="max-height:calc(100vh - 300px);" :data="members" stripe v-loading="membersLoading">
         <el-table-column prop="id" label="关系ID" width="80"></el-table-column>

+ 0 - 1
cfc-web/src/views/admin/data-source-config.vue

@@ -49,7 +49,6 @@
       <el-pagination
         v-if="total > 0"
         class="pagination-wrap"
-        :total="total"
         style="margin-top:16px;text-align:right"
         :total="total"
         :page.sync="page"

+ 1 - 0
cfc-web/src/views/nutritionist/NutritionMappings.vue

@@ -4,6 +4,7 @@
       <div slot="header">
         <span>营养素映射管理</span>
         <el-button type="primary" size="mini" style="float:right" @click="openCreateDialog">新增映射</el-button>
+      </div>
       <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table style="max-height:calc(100vh - 300px);" :data="mappings" v-loading="loading" border stripe>
         <el-table-column prop="id" label="ID" width="60" />

+ 2 - 1
cfc-web/src/views/teacher/TeacherTeam.vue

@@ -82,7 +82,7 @@
         <span class="card-title">团队成员</span>
         <el-input v-model="keyword" placeholder="搜索成员..." prefix-icon="el-icon-search" style="width:200px" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" />
         <span class="card-count">共 {{ filteredMembers.length }} 人</span>
-    </div>
+      </div>
     <div style="overflow:auto;max-height:calc(100vh - 300px);">
       <el-table :data="filteredMembers" stripe style="width: 100%; max-height:calc(100vh - 300px);" v-loading="loading">
         <el-table-column label="成员信息" min-width="200">
@@ -145,6 +145,7 @@
           </template>
         </el-table-column>
       </el-table>
+      </div>
     </el-card>
 
     <!-- 成员详情抽屉 -->