浏览代码

fix: 修复 pages.json tabBar 富页面注册缺失 + 维度权重前端修改

User 3 月之前
父节点
当前提交
0b391ffa61

+ 12 - 13
cfc-frontend/components/DimensionActivities.vue

@@ -19,20 +19,19 @@
         </view>
       </template>
       <!-- 有数据时显示活动卡片(垂直布局) -->
-      <template v-else>
-        <view class="activity-card" v-for="act in displayActivities" :key="act.id" @click.stop="$emit('activityClick', act)">
-          <view class="activity-color-bar" :style="{ background: gradientColors[act.id % gradientColors.length] }">
-            <text class="activity-color-text">{{ statusText(act.status) }}</text>
-          </view>
-          <text class="article-title">{{ act.title }}</text>
-          <text class="article-summary" v-if="act.startTime">{{ act.startTime }}</text>
-          <view class="article-meta">
-            <text class="activity-fee" v-if="act.priceLabel">{{ act.priceLabel }}</text>
-            <text class="activity-fee" v-else-if="act.price && act.price > 0">{{ formatPriceWithSymbol(act.price) }}</text>
-            <text class="activity-fee fee-free" v-else>免费</text>
-          </view>
+      <template v-else><view class="activity-card" v-for="act in displayActivities" :key="act.id" @click.stop="$emit('activityClick', act)">
+        <view class="activity-color-bar" :style="{ background: gradientColors[act.id % gradientColors.length] }">
+          <text class="activity-color-text">{{ statusText(act.status) }}</text>
         </view>
-      </template>
+        <text class="article-title">{{ act.title }}</text>
+        <text class="article-summary" v-if="act.startTime">{{ act.startTime }}</text>
+        <view class="article-meta">
+          <text class="activity-fee" v-if="act.priceLabel">{{ act.priceLabel }}</text>
+          <text class="activity-fee" v-else-if="act.price && act.price > 0">{{ formatPriceWithSymbol(act.price) }}</text>
+          <text class="activity-fee fee-free" v-else>免费</text>
+        </view>
+      </view>
+    </template>
     </view>
   </view>
 </template>

+ 0 - 323
cfc-frontend/components/FamilyRelationshipSection.vue

@@ -1,323 +0,0 @@
-<template>
-  <view class="family-relationship-wrapper">
-    <!-- ===== 重要关系维护 ===== -->
-    <view class="contact-section" v-if="isLoggedIn">
-    <view class="contact-header">
-      <text class="contact-section-title">重要关系</text>
-      <view class="contact-header-right">
-        <text class="contact-more" @click="$emit('refresh')">刷新</text>
-        <text class="contact-import-btn" @click="$emit('import')">+ 导入</text>
-        <text class="contact-manage-btn" @click="$emit('manage')">⚙️</text>
-      </view>
-    </view>
-    <scroll-view class="contact-scroll" scroll-x enable-flex>
-      <view class="contact-scroll-inner">
-        <view class="contact-card-wrap" v-for="item in contactList" :key="item.id" @click="$emit('contactClick', item)">
-          <ContactCard :contact="item" />
-        </view>
-        <view class="contact-card-wrap contact-add-card" @click="$emit('import')">
-          <view class="add-card-inner">
-            <text class="add-card-icon">+</text>
-            <text class="add-card-label">导入通讯录</text>
-          </view>
-        </view>
-      </view>
-    </scroll-view>
-    <view class="contact-empty" v-if="contactList.length === 0">
-      <text class="contact-empty-text">暂无重要联系人,点击导入添加</text>
-    </view>
-  </view>
-
-  <!-- ===== 关系健康概览 ===== -->
-  <view class="rq-section" v-if="isLoggedIn && (healthAlerts.length > 0 || milestones.length > 0)">
-    <view class="rq-header">
-      <text class="rq-title">关系健康</text>
-      <text class="rq-more" @click="$emit('questionnaire')">去做问卷</text>
-    </view>
-    <!-- 健康预警列表 -->
-    <view class="rq-alerts" v-if="healthAlerts.length > 0">
-      <view class="rq-alert-card" v-for="alert in healthAlerts" :key="alert.memberId" @click="$emit('interactionLog', alert.memberId)">
-        <view class="rq-alert-icon">
-          <text class="rq-alert-emoji">⚠️</text>
-        </view>
-        <view class="rq-alert-info">
-          <text class="rq-alert-name">{{ alert.memberName }}</text>
-          <text class="rq-alert-desc">已{{ alert.daysSinceInteraction }}天无互动</text>
-        </view>
-        <view class="rq-alert-action">
-          <text class="rq-alert-btn">去互动</text>
-        </view>
-      </view>
-    </view>
-    <!-- 里程碑列表 -->
-    <view class="rq-milestones" v-if="milestones.length > 0">
-      <view class="rq-milestone-card" v-for="m in milestones" :key="m.memberId">
-        <view class="rq-milestone-icon">
-          <text class="rq-milestone-emoji">🎂</text>
-        </view>
-        <view class="rq-milestone-info">
-          <text class="rq-milestone-name">{{ m.memberName }}</text>
-          <text class="rq-milestone-desc">{{ m.daysUntil > 0 ? m.daysUntil + '天后生日' : '今天生日' }}</text>
-        </view>
-      </view>
-    </view>
-    <!-- 快捷操作 -->
-    <view class="rq-quick-actions">
-      <view class="rq-action-btn" @click="$emit('interactionLog')">
-        <text class="rq-action-icon">📝</text>
-        <text class="rq-action-label">记录互动</text>
-      </view>
-      <view class="rq-action-btn" @click="$emit('questionnaire')">
-        <text class="rq-action-icon">🤝</text>
-        <text class="rq-action-label">做关系问卷</text>
-      </view>
-    </view>
-  </view>
-  </view>
-</template>
-
-<script>
-export default {
-  props: {
-    contactList: { type: Array, default: function() { return [] } },
-    healthAlerts: { type: Array, default: function() { return [] } },
-    milestones: { type: Array, default: function() { return [] } },
-    isLoggedIn: { type: Boolean, default: false }
-  }
-}
-</script>
-
-<style scoped>
-/* ===== 重要关系 ===== */
-.contact-section {
-  margin: 20rpx 20rpx 0;
-}
-.contact-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 16rpx;
-}
-.contact-section-title {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #333;
-}
-.contact-header-right {
-  display: flex;
-  gap: 16rpx;
-  align-items: center;
-}
-.contact-more {
-  font-size: 24rpx;
-  color: #999;
-}
-.contact-import-btn {
-  font-size: 24rpx;
-  color: #F97316;
-  font-weight: 500;
-}
-.contact-manage-btn {
-  font-size: 30rpx;
-  color: #999;
-  padding: 4rpx;
-}
-.contact-scroll {
-  white-space: nowrap;
-  overflow: hidden;
-}
-.contact-scroll-inner {
-  display: flex;
-  flex-direction: row;
-  gap: 16rpx;
-  padding: 8rpx 0 16rpx;
-}
-.contact-card-wrap {
-  flex-shrink: 0;
-  width: 220rpx;
-}
-.contact-card-wrap:active {
-  opacity: 0.8;
-}
-.contact-add-card {
-  width: 160rpx;
-}
-.add-card-inner {
-  width: 160rpx;
-  height: 280rpx;
-  background: #fff;
-  border-radius: 16rpx;
-  border: 2rpx dashed #ddd;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  gap: 12rpx;
-}
-.add-card-icon {
-  font-size: 48rpx;
-  color: #ccc;
-}
-.add-card-label {
-  font-size: 22rpx;
-  color: #999;
-}
-.contact-empty {
-  padding: 40rpx 0;
-  text-align: center;
-}
-.contact-empty-text {
-  font-size: 26rpx;
-  color: #ccc;
-}
-
-/* ===== 关系健康概览 ===== */
-.rq-section {
-  margin: 20rpx 20rpx 0;
-}
-.rq-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  margin-bottom: 16rpx;
-}
-.rq-title {
-  font-size: 30rpx;
-  font-weight: 600;
-  color: #333;
-}
-.rq-more {
-  font-size: 24rpx;
-  color: #F97316;
-  font-weight: 500;
-}
-/* 健康预警卡片 */
-.rq-alerts {
-  display: flex;
-  flex-direction: column;
-  gap: 12rpx;
-  margin-bottom: 16rpx;
-}
-.rq-alert-card {
-  background: #FFF7ED;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  display: flex;
-  align-items: center;
-  gap: 16rpx;
-  border: 1rpx solid #FED7AA;
-}
-.rq-alert-card:active {
-  opacity: 0.8;
-}
-.rq-alert-icon {
-  width: 64rpx;
-  height: 64rpx;
-  border-radius: 50%;
-  background: #fff;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-shrink: 0;
-}
-.rq-alert-emoji {
-  font-size: 32rpx;
-}
-.rq-alert-info {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-  gap: 4rpx;
-}
-.rq-alert-name {
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #333;
-}
-.rq-alert-desc {
-  font-size: 24rpx;
-  color: #F97316;
-}
-.rq-alert-action {
-  flex-shrink: 0;
-}
-.rq-alert-btn {
-  font-size: 24rpx;
-  color: #fff;
-  background: #F97316;
-  padding: 8rpx 20rpx;
-  border-radius: 20rpx;
-}
-/* 里程碑卡片 */
-.rq-milestones {
-  display: flex;
-  flex-direction: column;
-  gap: 12rpx;
-  margin-bottom: 16rpx;
-}
-.rq-milestone-card {
-  background: #F0F9FF;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  display: flex;
-  align-items: center;
-  gap: 16rpx;
-  border: 1rpx solid #BAE6FD;
-}
-.rq-milestone-icon {
-  width: 64rpx;
-  height: 64rpx;
-  border-radius: 50%;
-  background: #fff;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-shrink: 0;
-}
-.rq-milestone-emoji {
-  font-size: 32rpx;
-}
-.rq-milestone-info {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-  gap: 4rpx;
-}
-.rq-milestone-name {
-  font-size: 28rpx;
-  font-weight: 600;
-  color: #333;
-}
-.rq-milestone-desc {
-  font-size: 24rpx;
-  color: #0EA5E9;
-}
-/* 快捷操作 */
-.rq-quick-actions {
-  display: flex;
-  gap: 16rpx;
-  margin-top: 8rpx;
-}
-.rq-action-btn {
-  flex: 1;
-  background: #fff;
-  border-radius: 16rpx;
-  padding: 20rpx;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  gap: 10rpx;
-  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
-}
-.rq-action-btn:active {
-  opacity: 0.8;
-}
-.rq-action-icon {
-  font-size: 36rpx;
-}
-.rq-action-label {
-  font-size: 26rpx;
-  color: #333;
-  font-weight: 500;
-}
-</style>

+ 2 - 2
cfc-frontend/config.js

@@ -10,7 +10,7 @@
  * 无需手动修改任何变量,发布到对应环境自动生效。
  */
 
-let API_BASE_URL = 'http://cfc.iwintrue.com:9082'
+let API_BASE_URL = 'http://cfc.iwintrue.com'
 
 try {
   const accountInfo = uni.getAccountInfoSync()
@@ -19,7 +19,7 @@ try {
   if (env) {
     switch (env) {
       case 'develop':
-        API_BASE_URL = 'http://localhost:9082'
+        API_BASE_URL = 'https://cf-club.iwintrue.com'
         break
       case 'trial':
         API_BASE_URL = 'https://cfc.iwintrue.com'

+ 6 - 6
cfc-frontend/pages.json

@@ -43,6 +43,12 @@
         "navigationBarTitleText": "智"
       }
     },
+    {
+      "path": "pages/wealth/index",
+      "style": {
+        "navigationBarTitleText": "富"
+      }
+    },
     {
       "path": "pages/profile/profile",
       "style": {
@@ -947,12 +953,6 @@
           "style": {
             "navigationBarTitleText": "菌群"
           }
-        },
-        {
-          "path": "gut-flora-detail-expired",
-          "style": {
-            "navigationBarTitleText": "菌群报告详情"
-          }
         }
       ]
     },

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

@@ -257,6 +257,7 @@ export default {
         { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '/pages/health/meditation-index' },
         { icon: '\u{1F4CA}', label: '舌诊', needLogin: true, page: '/pages/health/report-upload?reportType=tongue' }
       ]
+    }
   },
   computed: {
     reportTypeLabel: function() {