瀏覽代碼

fix:统计数据字段更换

DaMoWang 2 年之前
父節點
當前提交
53f22fcd5f
共有 1 個文件被更改,包括 64 次插入15 次删除
  1. 64 15
      src/pages/my-tea-list/index.vue

+ 64 - 15
src/pages/my-tea-list/index.vue

@@ -45,25 +45,33 @@
     <view class="tea_con mar_t30">
       <view class="tea_total flex_r flex_ac flex_jc">
         <view class="total_con flex_c flex_ac flex_jc">
-          <view class="total_num"
-            >{{ myQuanTeaFriendNum || 0 }}<text>人</text></view
-          >
+          <view class="total_num">{{ myQuanTeaFriendNum || 0 }}<text>人</text></view>
           <view class="total_text">社区总数</view>
         </view>
+        <div class="total_info">
+          本日新增:{{ myChayoyTotal.day }}<br />
+          本周新增:{{ myChayoyTotal.week }}<br />
+          本月新增:{{ myChayoyTotal.month }}<br />
+        </div>
       </view>
       <view class="tea_info flex_r flex_ac">
-        <view
-          class="info_list flex_c flex_ac flex_jc borRight"
-          @tap="getToTeaList"
-        >
+        <view class="info_list flex_c flex_ac flex_jc borRight" @tap="getToTeaList">
           <view class="list_num">{{ myTeaFriendNum || 0 }}<text>人</text></view>
           <view class="list_text">推广用户</view>
+        <div class="untotal_info">
+          本日新增:{{ myChayoyDirect.day }}<br />
+          本周新增:{{ myChayoyDirect.week }}<br />
+          本月新增:{{ myChayoyDirect.month }}<br />
+        </div>
         </view>
         <view class="info_list flex_c flex_ac flex_jc">
-          <view class="list_num"
-            >{{ myZhuanTeaFriendNum || 0 }}<text>人</text></view
-          >
+          <view class="list_num">{{ myZhuanTeaFriendNum || 0 }}<text>人</text></view>
           <view class="list_text">转介绍用户</view>
+        <div class="untotal_info">
+          本日新增:{{ myChayoyIndirect.day }}<br />
+          本周新增:{{ myChayoyIndirect.week }}<br />
+          本月新增:{{ myChayoyIndirect.month }}<br />
+        </div>
         </view>
       </view>
     </view>
@@ -120,10 +128,18 @@ export default {
       myQuanTeaFriendNum: "",
       wxcode: "",
       mobile: "",
+
+      myChayoyTotal: {},
+      myChayoyDirect: {},
+      myChayoyIndirect: {},
     };
   },
   onLoad: function () {
     this.loadData();
+
+    this.getmyChayoyTotal()
+    this.getmyChayoyDirect()
+    this.getmyChayoyIndirect()
   },
   methods: {
     loadData() {
@@ -137,6 +153,29 @@ export default {
         }
       });
     },
+
+    getmyChayoyTotal() {
+      post("/my/myChayoyTotal").then((res) => {
+        if (res.code === 0) {
+          this.myChayoyTotal = res.data.data;
+        }
+      });
+    },
+    getmyChayoyDirect() {
+      post("/my/myChayoyDirect").then((res) => {
+        if (res.code === 0) {
+          this.myChayoyDirect = res.data.data;
+        }
+      });
+    },
+    getmyChayoyIndirect() {
+      post("/my/myChayoyIndirect").then((res) => {
+        if (res.code === 0) {
+          this.myChayoyIndirect = res.data.data;
+        }
+      });
+    },
+
     // 填写我的信息
     setUserInfo: function () {
       let that = this;
@@ -300,15 +339,15 @@ page {
   color: #232323;
 }
 .list_text {
-  font-size: 22rpx;
+  font-size: 26rpx;
   color: #606060;
 }
 .list_num text {
-  font-size: 24rpx;
+  font-size: 26rpx;
   color: #1cbe8c;
 }
 .total_num text {
-  font-size: 24rpx;
+  font-size: 26rpx;
   color: #232323;
 }
 .borRight {
@@ -320,10 +359,20 @@ page {
   box-sizing: border-box;
 }
 .total_text {
-  font-size: 22rpx;
+  font-size: 26rpx;
   color: #606060;
   margin-top: 12rpx;
 }
+.total_info{
+  font-size: 22rpx;
+  color: #333;
+  margin-left: 32rpx;
+}
+.untotal_info{
+  font-size: 22rpx;
+  color: #333;
+  margin-top: 32rpx;
+}
 .tea_con {
   width: 100%;
   overflow: hidden;
@@ -332,7 +381,7 @@ page {
 }
 .tea_info {
   width: 100%;
-  height: 156rpx;
+  // height: 156rpx;s
   padding: 16rpx 0;
   box-sizing: border-box;
 }