Kaynağa Gözat

chore: auto bump version and changelog [skip ci]

iwt 8 saat önce
ebeveyn
işleme
48693ec44b

+ 28 - 0
cfc-frontend/pages/promotion/team.vue

@@ -129,6 +129,11 @@ export default {
     this.loadTeamStats()
     this.loadList()
   },
+  onShow() {
+    this.loadCurveData()
+    this.loadTeamStats()
+    this.loadList()
+  },
   onReachBottom() {
     if (this.hasMore && !this.loading) {
       this.page++
@@ -175,6 +180,29 @@ export default {
       var d = parseDate(time)
       if (!d) return ''
       return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0')
+    },
+    async loadCurveData() {
+      try {
+        // 获取团队成长曲线数据(12个月)
+        var growthRes = await getTeamGrowthCurve(12)
+        if (growthRes && growthRes.data) {
+          this.drawGrowthCurve(growthRes.data)
+        }
+        // 获取所有成员消费曲线数据
+        var consumptionRes = await getTeamAllMembersConsumptionCurve(12)
+        if (consumptionRes && consumptionRes.data) {
+          this.drawMembersConsumptionCurve(consumptionRes.data)
+        }
+        // 获取L1直推团队消费曲线数据
+        var l1Res = await getTeamL1ConsumptionCurve(12)
+        if (l1Res && l1Res.data) {
+          this.drawL1ConsumptionCurve(l1Res.data)
+        }
+        this.curveDataReady = true
+      } catch (e) {
+        console.error('获取曲线数据失败', e)
+        uni.showToast({ title: '获取数据失败', icon: 'none' })
+      }
     }
   }
 }

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-e41c00c59b5e672d4ace7f4d0cfd52207eba73cd
+2543f88db5262ac79cd57506dfb2199826a9cc18