Browse Source

接口对接

caiyuqin 2 months ago
parent
commit
0aeedb2d2e

+ 57 - 0
src/api/income.ts

@@ -101,3 +101,60 @@ export function queryByUserId(params = {}) {
     })
     })
 }
 }
 
 
+//收益-列表
+export function pageMap(params = {}) {
+    return http.Post('/couponCenter/salesman/payout/income/pageMap', params)
+}
+
+
+//团员收益明细
+export function getMemberIncome(params = {}) {
+    return http.Get('/couponCenter/salesman/payout/income/getMemberIncome', {
+        params,
+    })
+}
+
+//获取团员收益金额统计
+export function getTeamAmountStatistics(params = {}) {
+    return http.Get('/couponCenter/APP/mine/getTeamAmountStatistics', {
+        params,
+    })
+}
+
+
+
+//拉新明细
+export function getInvitationRewardList(params = {}) {
+    return http.Get('/couponCenter/salesman/payout/income/getInvitationRewardList', {
+        params,
+    })
+}
+
+//分享明细
+export function getPushCouponDetail(params = {}) {
+    return http.Get('/couponCenter/salesman/payout/income/getPushCouponDetail', {
+        params,
+    })
+}
+
+//核销明细
+export function getWriteOffIncome(params = {}) {
+    return http.Get('/couponCenter/salesman/payout/income/getWriteOffIncome', {
+        params,
+    })
+}
+
+
+//获取团队收益列表
+export function getTeamMembers(params = {}) {
+    return http.Get('/couponCenter/APP/mine/getTeamMembers', {
+        params,
+    })
+}
+
+//获取指定团员收益列表
+export function getMemberIncomeList(params = {}) {
+    return http.Get('/couponCenter/APP/mine/getMemberIncomeList', {
+        params,
+    })
+}

+ 3 - 2
src/components/filter/filter.vue

@@ -85,8 +85,9 @@ const tabListFilter = ref({
 
 
 //结算状态
 //结算状态
 const tabListSettlement = ref([
 const tabListSettlement = ref([
-  { label: "待结算", type: "1", isSelected: false },
-  { label: "已结算", type: "2", isSelected: false },
+  { label: "待结算", type: "0", isSelected: false },
+  { label: "已结算", type: "1", isSelected: false },
+  { label: "已退款", type: "2", isSelected: false },
 ]);
 ]);
 
 
 // 分组配置
 // 分组配置

+ 14 - 9
src/components/listScrollView/index.vue

@@ -127,21 +127,23 @@ const upCallback = (e: any) => {
         let response = res;
         let response = res;
         // 无分页处理,用于那些需要下拉和空列表的地方
         // 无分页处理,用于那些需要下拉和空列表的地方
         if (props.noPage) {
         if (props.noPage) {
-          response = {
-            ...res,
-            result: {
-              records: res.result,
-              total: res.result.length,
-            },
-          };
+          if (isObject(res)) {
+            response = {
+              records: [res],
+              total: 1,
+            };
+          } else {
+            response = {
+              records: res,
+              total: res.length,
+            };
+          }
         }
         }
         const result = response || {};
         const result = response || {};
         const records = result[props.keyName]
         const records = result[props.keyName]
           ? result[props.keyName].records || result[props.keyName]
           ? result[props.keyName].records || result[props.keyName]
           : [];
           : [];
-
         emit("afterFetch", result);
         emit("afterFetch", result);
-
         // 数据
         // 数据
         dataList.value = dataList.value.concat(records);
         dataList.value = dataList.value.concat(records);
         mescroll.value?.endBySize(
         mescroll.value?.endBySize(
@@ -164,6 +166,9 @@ const upCallback = (e: any) => {
     });
     });
 };
 };
 
 
+const isObject = (value) => {
+  return Object.prototype.toString.call(value) === "[object Object]";
+};
 // 重新加载列表
 // 重新加载列表
 const reloadList = (p: Record<string, any>) => {
 const reloadList = (p: Record<string, any>) => {
   params.value = p;
   params.value = p;

+ 2 - 2
src/pages-C/home/browse.vue

@@ -103,11 +103,11 @@ const reloadListRef = (extraParams = {}) => {
                   {{ statusTypeMap[item.type] }}</view>
                   {{ statusTypeMap[item.type] }}</view>
               </view>
               </view>
               <view class="send-number-box">
               <view class="send-number-box">
-                <template v-if="item.type === '2'">
+                <template v-if="item.type == '2'">
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-unit">折</text>
                   <text class="send-unit">折</text>
                 </template>
                 </template>
-                <template v-else-if="item.type === '3'">
+                <template v-else-if="item.type == '3'">
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <view class="send-number-box">
                   <view class="send-number-box">
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>

+ 3 - 3
src/pages-C/home/ranking.vue

@@ -137,13 +137,13 @@ function selectValue(selected) {
           </u--image>
           </u--image>
           <view class="ranking-list">
           <view class="ranking-list">
             <view class="ranking-item" v-for="(item, index) in (rankingList || [])" :key="item.templateId || index">
             <view class="ranking-item" v-for="(item, index) in (rankingList || [])" :key="item.templateId || index">
-              <u--image v-if="item.serialNumber === 1" class='selected-icon' :src="getImageUrl('@img/me/rank1.png')"
+              <u--image v-if="item.serialNumber == 1" class='selected-icon' :src="getImageUrl('@img/me/rank1.png')"
                 mode="aspectFit" width="48rpx" height="48rpx">
                 mode="aspectFit" width="48rpx" height="48rpx">
               </u--image>
               </u--image>
-              <u--image v-else-if="item.serialNumber === 2" class='selected-icon'
+              <u--image v-else-if="item.serialNumber == 2" class='selected-icon'
                 :src="getImageUrl('@img/me/rank2.png')" mode="aspectFit" width="48rpx" height="48rpx">
                 :src="getImageUrl('@img/me/rank2.png')" mode="aspectFit" width="48rpx" height="48rpx">
               </u--image>
               </u--image>
-              <u--image v-else-if="item.serialNumber === 3" class='selected-icon'
+              <u--image v-else-if="item.serialNumber == 3" class='selected-icon'
                 :src="getImageUrl('@img/me/rank3.png')" mode="aspectFit" width="48rpx" height="48rpx">
                 :src="getImageUrl('@img/me/rank3.png')" mode="aspectFit" width="48rpx" height="48rpx">
               </u--image>
               </u--image>
               <text v-else class="ranking-value rank-num">{{ item.serialNumber }}</text>
               <text v-else class="ranking-value rank-num">{{ item.serialNumber }}</text>

+ 2 - 2
src/pages-C/home/sendCancelWriteOff.vue

@@ -88,11 +88,11 @@ const filterObj = ref({ type: "", date: "1", dataFilter: null });
                 <!-- <view class="coupon-tag">{{ couponTypeMap[item.couponType] }}</view> -->
                 <!-- <view class="coupon-tag">{{ couponTypeMap[item.couponType] }}</view> -->
               </view>
               </view>
               <view class="send-number-box">
               <view class="send-number-box">
-                <template v-if="item.couponType === '2'">
+                <template v-if="item.couponType == '2'">
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-unit">折</text>
                   <text class="send-unit">折</text>
                 </template>
                 </template>
-                <template v-else-if="item.couponType === '3'">
+                <template v-else-if="item.couponType == '3'">
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <view class="send-number-box">
                   <view class="send-number-box">
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>

+ 2 - 2
src/pages-C/home/sendCoupon.vue

@@ -101,11 +101,11 @@ const couponTypeMap = {
                 <view class="coupon-tag">{{ couponTypeMap[item.type] || '优惠券' }}</view>
                 <view class="coupon-tag">{{ couponTypeMap[item.type] || '优惠券' }}</view>
               </view>
               </view>
               <view class="send-number-box">
               <view class="send-number-box">
-                <template v-if="item.type === '2'">
+                <template v-if="item.type == '2'">
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-unit">折</text>
                   <text class="send-unit">折</text>
                 </template>
                 </template>
-                <template v-else-if="item.type === '3'">
+                <template v-else-if="item.type == '3'">
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <view class="send-number-box">
                   <view class="send-number-box">
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>

+ 2 - 2
src/pages-C/home/sendWriteOff.vue

@@ -129,11 +129,11 @@ const filterObj = ref({ type: "", date: "1", dataFilter: null });
                 <!-- <view class="coupon-tag">{{ couponTypeMap[item.couponType] }}</view> -->
                 <!-- <view class="coupon-tag">{{ couponTypeMap[item.couponType] }}</view> -->
               </view>
               </view>
               <view class="send-number-box">
               <view class="send-number-box">
-                <template v-if="item.couponType === '2'">
+                <template v-if="item.couponType == '2'">
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-number">{{ item.ruleDiscountRate }}</text>
                   <text class="send-unit">折</text>
                   <text class="send-unit">折</text>
                 </template>
                 </template>
-                <template v-else-if="item.couponType === '3'">
+                <template v-else-if="item.couponType == '3'">
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <text class='add-title'>满{{ item.ruleMinSpendAmount }}减</text>
                   <view class="send-number-box">
                   <view class="send-number-box">
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>
                     <text class="send-number">{{ item.ruleReductionAmount }}</text>

+ 44 - 51
src/pages-C/income/list/invitation.vue

@@ -1,6 +1,9 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { ref } from "vue";
 import { ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import { getImageUrl } from "@/utils/imageUtil";
+import { getInvitationRewardList } from "@/api/income";
+import LsvList from "@/components/listScrollView/index.vue";
+
 definePage({
 definePage({
   style: {
   style: {
     navigationBarTitleText: "邀新奖励",
     navigationBarTitleText: "邀新奖励",
@@ -8,34 +11,20 @@ definePage({
   },
   },
 });
 });
 
 
-const totalIncome = ref("38.00");
+const listRef = ref();
+const totalAmount = ref();
+const id = ref();
 
 
-const invitationList = ref([
-  {
-    id: 1,
-    userName: "吴磊",
-    invitationTime: "2026-05-18 19:00:00",
-    commission: "38.00",
-  },
-  {
-    id: 2,
-    userName: "吴磊",
-    invitationTime: "2026-05-18 19:00:00",
-    commission: "38.00",
-  },
-  {
-    id: 3,
-    userName: "吴磊",
-    invitationTime: "2026-05-18 19:00:00",
-    commission: "38.00",
-  },
-  {
-    id: 4,
-    userName: "吴磊",
-    invitationTime: "2026-05-18 19:00:00",
-    commission: "38.00",
-  },
-]);
+const getShareListApi = (params: any) => {
+  return getInvitationRewardList({
+    batchId: id.value,
+  });
+};
+
+onLoad((options) => {
+  totalAmount.value = options.money;
+  id.value = options.batchId;
+});
 </script>
 </script>
 
 
 <template>
 <template>
@@ -54,7 +43,7 @@ const invitationList = ref([
             <text class="total-label">总收益</text>
             <text class="total-label">总收益</text>
             <view>
             <view>
               <text class="total-symbol">¥</text>
               <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalIncome }}</text>
+              <text class="total-amount">{{ totalAmount }}</text>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
@@ -62,30 +51,34 @@ const invitationList = ref([
         <view class="header-divider"></view>
         <view class="header-divider"></view>
 
 
         <view class="records-list">
         <view class="records-list">
-          <view v-for="(item, index) in invitationList" :key="item.id" class="record-item">
-            <view class="info-row">
-              <text class="info-label">用户名称</text>
-              <view class="income-person">
-                <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                  shape="circle">
-                </u--image>
-                <view>林雨欣</view>
+          <LsvList ref="listRef" :api="getShareListApi" :noPage='true'>
+            <template #list="{ data }">
+              <view v-for="(item, index) in data" :key="item.id" class="record-item">
+                <view class="info-row">
+                  <text class="info-label">用户名称</text>
+                  <view class="income-person">
+                    <u--image class='income-phone' :src="item.avatar || getImageUrl('@img/me/head.png')" width="42rpx"
+                      height="42rpx" shape="circle">
+                    </u--image>
+                    <view>{{item.nickName}}</view>
+                  </view>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">获得佣金</text>
+                  <text class="info-value highlight">¥{{ item.commission }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">联系方式</text>
+                  <text class="info-value">{{ item.phone }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">邀请时间</text>
+                  <text class="info-value">{{ item.createTime }}</text>
+                </view>
+                <view v-if="index < data.length - 1" class="record-divider"></view>
               </view>
               </view>
-            </view>
-            <view class="info-row">
-              <text class="info-label">获得佣金</text>
-              <text class="info-value highlight">¥{{ item.commission }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">联系方式</text>
-              <text class="info-value">{{ item.invitationTime }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">邀请时间</text>
-              <text class="info-value">{{ item.invitationTime }}</text>
-            </view>
-            <view v-if="index < invitationList.length - 1" class="record-divider"></view>
-          </view>
+            </template>
+          </LsvList>
 
 
         </view>
         </view>
       </view>
       </view>

+ 179 - 201
src/pages-C/income/list/shareInfo.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { ref } from "vue";
 import { ref } from "vue";
-import { safeAreaInsets, menuButtonInfo } from "@/utils";
-import CustomNavigationBar from "@/components/CustomNavigationBar.vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import { getImageUrl } from "@/utils/imageUtil";
+import { getPushCouponDetail } from "@/api/income";
+import LsvList from "@/components/listScrollView/index.vue";
 
 
 definePage({
 definePage({
   style: {
   style: {
@@ -11,57 +11,20 @@ definePage({
   },
   },
 });
 });
 
 
-const navigationBarHeight = ref(0);
+const listRef = ref();
+const totalAmount = ref();
+const id = ref();
 
 
-function getNavigationBarHeight() {
-  const menuButtonHeight = menuButtonInfo?.height || 32;
-  const statusBarHeight = safeAreaInsets?.top || 0;
-  navigationBarHeight.value = statusBarHeight + menuButtonHeight + 12;
-}
+const getShareListApi = (params: any) => {
+  return getPushCouponDetail({
+    batchId: id.value,
+  });
+};
 
 
-onMounted(() => {
-  getNavigationBarHeight();
+onLoad((options) => {
+  totalAmount.value = options.money;
+  id.value = options.batchId;
 });
 });
-
-const totalIncome = ref("38.00");
-
-const shareList = ref([
-  {
-    id: 1,
-    couponName: "某某某某某优惠券",
-    income: "2.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "林雨欣",
-  },
-  {
-    id: 2,
-    couponName: "某某某某某优惠券",
-    income: "17.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "吴雨桐",
-  },
-  {
-    id: 3,
-    couponName: "某某某某某优惠券",
-    income: "18.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "周昭宁",
-  },
-  {
-    id: 4,
-    couponName: "某某某某某优惠券",
-    income: "8.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "周宇轩",
-  },
-]);
-
-function handleViewDetail(item) {
-  uni.showToast({
-    title: `查看 ${item.couponName} 详情`,
-    icon: "none",
-  });
-}
 </script>
 </script>
 
 
 <template>
 <template>
@@ -70,55 +33,59 @@ function handleViewDetail(item) {
       :title-style="{ fontWeight: 'bold',color:'#000' }" leftIconColor='#000'></u-navbar>
       :title-style="{ fontWeight: 'bold',color:'#000' }" leftIconColor='#000'></u-navbar>
 
 
     <view class="share-info-content">
     <view class="share-info-content">
-      <view class="share-card">
-        <view class="card-header">
-          <view class="title-section">
-            <view class="title-line"></view>
-            <text class="title-text">分享奖励</text>
-          </view>
-          <view class="total-income">
-            <text class="total-label">总收益</text>
-            <view>
-              <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalIncome }}</text>
-            </view>
+      <view class="card-header">
+        <view class="title-section">
+          <view class="title-line"></view>
+          <text class="title-text">分享奖励</text>
+        </view>
+        <view class="total-income">
+          <text class="total-label">总收益</text>
+          <view>
+            <text class="total-symbol">¥</text>
+            <text class="total-amount">{{ totalAmount || 0 }}</text>
           </view>
           </view>
         </view>
         </view>
+      </view>
 
 
-        <view class="records-list">
-          <view v-for="(item, index) in shareList" :key="item.id" class="record-item">
-            <view class="record-top">
-              <text class="coupon-name">{{ item.couponName }}</text>
-              <view class="income-amount">
-                <text class="income-label">收益</text>
-                <text class="income-value">¥{{ item.income }}</text>
+      <view class="header-divider"></view>
+
+      <view class="records-list">
+        <LsvList ref="listRef" :api="getShareListApi" :noPage='true'>
+          <template #list="{ data }">
+            <view v-for="(item, index) in data" :key="index" class="record-item">
+              <view class="record-top">
+                <text class="coupon-name">{{ item.couponName || '--' }}</text>
+                <view class="income-amount">
+                  <text class="income-label">收益</text>
+                  <text class="income-value">¥{{ item.commission || '0.00' }}</text>
+                </view>
               </view>
               </view>
-            </view>
 
 
-            <view class="record-bottom">
-              <view class="info-row">
-                <text class="info-label">领取人</text>
-                <view class="income-person">
-                  <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                    shape="circle">
-                  </u--image>
-                  <view>林雨欣</view>
+              <view class="record-bottom">
+                <view class="info-row">
+                  <text class="info-label">领取人</text>
+                  <view class="income-person">
+                    <u--image class='income-phone' :src="item.avatar || getImageUrl('@img/me/head.png')" width="42rpx"
+                      height="42rpx" shape="circle">
+                    </u--image>
+                    <view>{{ item.nickName || '--' }}</view>
+                  </view>
                 </view>
                 </view>
-              </view>
 
 
-              <view class="info-row">
-                <text class="info-label">联系方式</text>
-                <text class="info-value">{{ item.receiver }}</text>
-              </view>
-              <view class="info-row">
-                <text class="info-label">领取时间</text>
-                <text class="info-value">{{ item.receiveTime }}</text>
+                <view class="info-row">
+                  <text class="info-label">联系方式</text>
+                  <text class="info-value">{{ item.phone || '--' }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">领取时间</text>
+                  <text class="info-value">{{ item.createTime || '--' }}</text>
+                </view>
               </view>
               </view>
-            </view>
 
 
-            <view v-if="index < shareList.length - 1" class="record-divider"></view>
-          </view>
-        </view>
+              <view v-if="index < data.length - 1" class="record-divider"></view>
+            </view>
+          </template>
+        </LsvList>
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
@@ -126,153 +93,164 @@ function handleViewDetail(item) {
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .share-info-container {
 .share-info-container {
-  min-height: 100vh;
+  height: 100vh;
   background: #f8f8fa;
   background: #f8f8fa;
+  display: flex;
+  flex-direction: column;
 
 
   .share-info-content {
   .share-info-content {
-    padding: 32rpx;
-  }
-
-  .share-card {
+    // flex: 1;
     background: #ffffff;
     background: #ffffff;
     border-radius: 32rpx;
     border-radius: 32rpx;
     padding: 32rpx;
     padding: 32rpx;
+    margin: 32rpx;
+    display: flex;
+    flex-direction: column;
+  }
+
+  .card-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-start;
 
 
-    .card-header {
+    .title-section {
       display: flex;
       display: flex;
-      justify-content: space-between;
-      align-items: flex-start;
-      padding-bottom: 32rpx;
-      border-bottom: 1rpx solid #eaeaea;
+      align-items: center;
+      gap: 18rpx;
 
 
-      .title-section {
-        display: flex;
-        align-items: center;
-        gap: 18rpx;
+      .title-line {
+        width: 6rpx;
+        height: 32rpx;
+        background: #ff5365;
+      }
 
 
-        .title-line {
-          width: 6rpx;
-          height: 32rpx;
-          background: #ff5365;
-        }
+      .title-text {
+        font-weight: 600;
+        font-size: 32rpx;
+        color: #333333;
+        line-height: 32rpx;
+      }
+    }
 
 
-        .title-text {
-          font-weight: 600;
-          font-size: 32rpx;
-          color: #333333;
-          line-height: 32rpx;
-        }
+    .total-income {
+      display: flex;
+      align-items: baseline;
+      gap: 8rpx;
+
+      .total-label {
+        font-weight: 400;
+        font-size: 26rpx;
+        color: #2c2c2c;
+        line-height: 26rpx;
+        margin-right: 4rpx;
       }
       }
 
 
-      .total-income {
+      .total-symbol {
+        font-weight: 600;
+        font-size: 26rpx;
+        color: #ff5365;
+        line-height: 26rpx;
+      }
+
+      .total-amount {
+        font-weight: 600;
+        font-size: 40rpx;
+        color: #ff5365;
+        line-height: 40rpx;
+      }
+    }
+  }
+
+  .header-divider {
+    width: 100%;
+    height: 1rpx;
+    background: #eaeaea;
+    margin-top: 32rpx;
+    margin-bottom: 32rpx;
+  }
+
+  .records-list {
+    flex: 1;
+    overflow: hidden;
+    .record-item {
+      padding: 0;
+
+      .record-top {
         display: flex;
         display: flex;
-        align-items: baseline;
-        gap: 8rpx;
+        justify-content: space-between;
+        align-items: center;
+        margin-bottom: 40rpx;
 
 
-        .total-label {
-          font-weight: 400;
-          font-size: 26rpx;
+        .coupon-name {
+          font-weight: 500;
+          font-size: 28rpx;
           color: #2c2c2c;
           color: #2c2c2c;
-          line-height: 26rpx;
-          margin-right: 4rpx;
+          line-height: 28rpx;
         }
         }
 
 
-        .total-symbol {
-          font-weight: 600;
-          font-size: 26rpx;
-          color: #ff5365;
-          line-height: 26rpx;
-        }
+        .income-amount {
+          display: flex;
+          align-items: center;
+          gap: 12rpx;
+
+          .income-label {
+            font-weight: 400;
+            font-size: 30rpx;
+            color: #333333;
+            line-height: 30rpx;
+          }
 
 
-        .total-amount {
-          font-weight: 600;
-          font-size: 40rpx;
-          color: #ff5365;
-          line-height: 40rpx;
+          .income-value {
+            font-weight: 500;
+            font-size: 30rpx;
+            color: #ff5365;
+            line-height: 30rpx;
+          }
         }
         }
       }
       }
-    }
-
-    .records-list {
-      .record-item {
-        padding: 32rpx 0;
 
 
-        .record-top {
+      .record-bottom {
+        .info-row {
           display: flex;
           display: flex;
           justify-content: space-between;
           justify-content: space-between;
+          margin-bottom: 30rpx;
           align-items: center;
           align-items: center;
-          margin-bottom: 40rpx;
+          height: 30rpx;
+          line-height: 30rpx;
 
 
-          .coupon-name {
-            font-weight: 500;
-            font-size: 28rpx;
-            color: #2c2c2c;
-            line-height: 28rpx;
+          .info-label {
+            font-weight: 400;
+            font-size: 30rpx;
+            color: #666666;
           }
           }
 
 
-          .income-amount {
-            display: flex;
-            align-items: center;
-            gap: 12rpx;
-
-            .income-label {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #333333;
-              line-height: 30rpx;
-            }
-
-            .income-value {
-              font-weight: 500;
-              font-size: 30rpx;
-              color: #ff5365;
-              line-height: 30rpx;
-            }
+          .info-value {
+            font-weight: 400;
+            font-size: 30rpx;
+            color: #333333;
           }
           }
-        }
-
-        .record-bottom {
-          .info-row {
+          .income-person {
             display: flex;
             display: flex;
-            justify-content: space-between;
-            margin-bottom: 30rpx;
             align-items: center;
             align-items: center;
-            height: 30rpx;
-            line-height: 30rpx;
-
-            .info-label {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #666666;
-            }
-
-            .info-value {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #333333;
-            }
-            .income-person {
-              display: flex;
-              align-items: center;
-            }
-            .income-phone {
-              margin-right: 12rpx;
-            }
+          }
+          .income-phone {
+            margin-right: 12rpx;
           }
           }
         }
         }
+      }
 
 
-        .record-divider {
-          width: 100%;
-          height: 1rpx;
-          background: #eaeaea;
-          margin-top: 32rpx;
-        }
+      .record-divider {
+        width: 100%;
+        height: 1rpx;
+        background: #eaeaea;
+        margin-top: 32rpx;
+        margin-bottom: 32rpx;
       }
       }
     }
     }
-    .record-item:last-child {
-      .info-row:last-child {
-        margin-bottom: 0;
-      }
+  }
+  .record-item:last-child {
+    .info-row:last-child {
+      margin-bottom: 0;
     }
     }
   }
   }
 }
 }

+ 87 - 89
src/pages-C/income/list/teamWriteOff.vue

@@ -1,6 +1,8 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { ref } from "vue";
 import { ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import { getImageUrl } from "@/utils/imageUtil";
+import { getMemberIncome } from "@/api/income";
+import LsvList from "@/components/listScrollView/index.vue";
 
 
 definePage({
 definePage({
   style: {
   style: {
@@ -9,30 +11,25 @@ definePage({
   },
   },
 });
 });
 
 
-const totalIncome = ref("38.00");
+const listRef = ref();
+const id = ref();
+const getListApi = (params: any) => {
+  return getMemberIncome({
+    couponId: id.value,
+  });
+};
 
 
-const writeOffList = ref([
-  {
-    id: 1,
-    couponName: "精品洗车优惠券",
-    writeOffTime: "2026-05-15 15:00:00",
-    user: "吴磊",
-    productName: "精品洗车",
-    storeName: "京东养车",
-    payAmount: "48.00",
-    commission: "48.00",
-  },
-  {
-    id: 2,
-    couponName: "精品洗车优惠券",
-    writeOffTime: "2026-05-15 15:00:00",
-    user: "吴磊",
-    productName: "精品洗车",
-    storeName: "京东养车",
-    payAmount: "48.00",
-    commission: "48.00",
-  },
-]);
+const totalAmount = ref();
+onLoad((options) => {
+  totalAmount.value = options.money;
+  id.value = options.couponId;
+});
+
+const statusTypeMap: Record<string, string> = {
+  "1": "一级团员",
+  "2": "二级团员",
+  "3": "三级团员",
+};
 </script>
 </script>
 
 
 <template>
 <template>
@@ -51,7 +48,7 @@ const writeOffList = ref([
             <text class="total-label">总收益</text>
             <text class="total-label">总收益</text>
             <view>
             <view>
               <text class="total-symbol">¥</text>
               <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalIncome }}</text>
+              <text class="total-amount">{{ totalAmount }}</text>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
@@ -59,72 +56,73 @@ const writeOffList = ref([
         <view class="header-divider"></view>
         <view class="header-divider"></view>
 
 
         <view class="records-list">
         <view class="records-list">
-          <view v-for="(item, index) in writeOffList" :key="item.id" class="record-item">
-            <view class="info-row">
-              <text class="info-label">团员层级</text>
-              <text class="info-value">{{ item.couponName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">优惠券名称</text>
-              <text class="info-value">{{ item.writeOffTime }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销时间</text>
-              <text class="info-value">{{ item.writeOffTime }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">发券团员</text>
-              <view class="income-person">
-                <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                  shape="circle">
-                </u--image>
-                <view>林雨欣</view>
-              </view>
-            </view>
-            <view class="info-row">
-              <text class="info-label">团员联系方式</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销用户</text>
-              <view class="income-person">
-                <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                  shape="circle">
-                </u--image>
-                <view>林雨欣</view>
-              </view>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销类型</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">用户联系方式</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销类型</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">商品名称</text>
-              <text class="info-value">{{ item.productName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销商家</text>
-              <text class="info-value">{{ item.storeName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">实付金额</text>
-              <text class="info-value">¥{{ item.payAmount }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">获得佣金</text>
-              <text class="info-value highlight">¥{{ item.commission }}</text>
-            </view>
+          <LsvList ref="listRef" :api="getListApi" :noPage='true'>
+            <template #list="{ data }">
+              <view v-for="(item, index) in data" :key="item.id" class="record-item">
+                <view class="info-row">
+                  <text class="info-label">团员层级</text>
+                  <text class="info-value">{{ statusTypeMap[item.memberLevel] }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">优惠券名称</text>
+                  <text class="info-value">{{ item.couponName }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">核销时间</text>
+                  <text class="info-value">{{ item.writeOffTime }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">发券团员</text>
+                  <view class="income-person">
+                    <u--image class='income-phone'
+                      :src="item.membersReceiveCouponsUrl || getImageUrl('@img/me/head.png')" width="42rpx"
+                      height="42rpx" shape="circle">
+                    </u--image>
+                    <view>{{item.membersReceiveCouponsNickName}}</view>
+                  </view>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">团员联系方式</text>
+                  <text class="info-value">{{ item.membersReceiveCouponsPhone }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">核销用户</text>
+                  <view class="income-person">
+                    <u--image class='income-phone' :src="item.writeOffUserUrl || getImageUrl('@img/me/head.png')"
+                      width="42rpx" height="42rpx" shape="circle">
+                    </u--image>
+                    <view>{{item.writeOffUserNickName}}</view>
+                  </view>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">用户联系方式</text>
+                  <text class="info-value">{{ item.writeOffUserPhone }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">核销类型</text>
+                  <text class="info-value">{{ item.commodityCategory }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">商品名称</text>
+                  <text class="info-value">{{ item.productName }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">核销商家</text>
+                  <text class="info-value">{{ item.writeOffMerchant }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">实付金额</text>
+                  <text class="info-value">¥{{ item.actualPaymentAmount }}</text>
+                </view>
+                <view class="info-row">
+                  <text class="info-label">获得佣金</text>
+                  <text class="info-value highlight">¥{{ item.commission }}</text>
+                </view>
 
 
-            <view v-if="index < writeOffList.length - 1" class="record-divider"></view>
-          </view>
+                <view v-if="index < data.length - 1" class="record-divider"></view>
+              </view>
+            </template>
+          </LsvList>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>

+ 177 - 178
src/pages-C/income/list/writeOff.vue

@@ -1,6 +1,8 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { ref } from "vue";
 import { ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import { getImageUrl } from "@/utils/imageUtil";
+import { getWriteOffIncome } from "@/api/income";
+import LsvList from "@/components/listScrollView/index.vue";
 
 
 definePage({
 definePage({
   style: {
   style: {
@@ -9,30 +11,19 @@ definePage({
   },
   },
 });
 });
 
 
-const totalIncome = ref("38.00");
-
-const writeOffList = ref([
-  {
-    id: 1,
-    couponName: "精品洗车优惠券",
-    writeOffTime: "2026-05-15 15:00:00",
-    user: "吴磊",
-    productName: "精品洗车",
-    storeName: "京东养车",
-    payAmount: "48.00",
-    commission: "48.00",
-  },
-  {
-    id: 2,
-    couponName: "精品洗车优惠券",
-    writeOffTime: "2026-05-15 15:00:00",
-    user: "吴磊",
-    productName: "精品洗车",
-    storeName: "京东养车",
-    payAmount: "48.00",
-    commission: "48.00",
-  },
-]);
+const listRef = ref();
+const id = ref();
+const getWriteOffListApi = (params: any) => {
+  return getWriteOffIncome({
+    couponId: id.value,
+  });
+};
+
+const totalAmount = ref();
+onLoad((options) => {
+  totalAmount.value = options.money;
+  id.value = options.couponId;
+});
 </script>
 </script>
 
 
 <template>
 <template>
@@ -41,201 +32,209 @@ const writeOffList = ref([
       :title-style="{ fontWeight: 'bold', color: '#000' }" leftIconColor="#000"></u-navbar>
       :title-style="{ fontWeight: 'bold', color: '#000' }" leftIconColor="#000"></u-navbar>
 
 
     <view class="write-off-content">
     <view class="write-off-content">
-      <view class="write-off-card">
-        <view class="card-header">
-          <view class="title-section">
-            <view class="title-line"></view>
-            <text class="title-text">核销奖励</text>
-          </view>
-          <view class="total-income">
-            <text class="total-label">总收益</text>
-            <view>
-              <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalIncome }}</text>
-            </view>
+
+      <view class="card-header">
+        <view class="title-section">
+          <view class="title-line"></view>
+          <text class="title-text">核销奖励</text>
+        </view>
+        <view class="total-income">
+          <text class="total-label">总收益</text>
+          <view>
+            <text class="total-symbol">¥</text>
+            <text class="total-amount">{{ totalAmount||0 }}</text>
           </view>
           </view>
         </view>
         </view>
+      </view>
 
 
-        <view class="header-divider"></view>
+      <view class="header-divider"></view>
 
 
-        <view class="records-list">
-          <view v-for="(item, index) in writeOffList" :key="item.id" class="record-item">
-            <view class="info-row">
-              <text class="info-label">优惠券名称</text>
-              <text class="info-value">{{ item.couponName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销时间</text>
-              <text class="info-value">{{ item.writeOffTime }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销用户</text>
-              <view class="income-person">
-                <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                  shape="circle">
-                </u--image>
-                <view>林雨欣</view>
+      <view class="records-list">
+        <LsvList ref="listRef" :api="getWriteOffListApi" :noPage='true'>
+          <template #list="{ data }">
+            <view v-for="(item, index) in data" :key="index" class="record-item">
+              <view class="info-row">
+                <text class="info-label">优惠券名称</text>
+                <text class="info-value">{{ item.couponName || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">核销时间</text>
+                <text class="info-value">{{ item.writeOffTime || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">核销用户</text>
+                <view class="income-person">
+                  <u--image class='income-phone' :src="item.writeOffUserUrl || getImageUrl('@img/me/head.png')"
+                    width="42rpx" height="42rpx" shape="circle">
+                  </u--image>
+                  <view>{{ item.writeOffUserNickName || '--' }}</view>
+                </view>
+              </view>
+              <view class="info-row">
+                <text class="info-label">联系方式</text>
+                <text class="info-value">{{ item.writeOffUserPhone || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">核销类型</text>
+                <text class="info-value">{{ item.commodityCategory || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">商品名称</text>
+                <text class="info-value">{{ item.productName || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">核销商家</text>
+                <text class="info-value">{{ item.writeOffMerchant || '--' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">实付金额</text>
+                <text class="info-value">¥{{ item.actualPaymentAmount || '0.00' }}</text>
+              </view>
+              <view class="info-row">
+                <text class="info-label">获得佣金</text>
+                <text class="info-value highlight">¥{{ item.commission || '0.00' }}</text>
               </view>
               </view>
-            </view>
-            <view class="info-row">
-              <text class="info-label">联系方式</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销类型</text>
-              <text class="info-value">{{ item.user }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">商品名称</text>
-              <text class="info-value">{{ item.productName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">核销商家</text>
-              <text class="info-value">{{ item.storeName }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">实付金额</text>
-              <text class="info-value">¥{{ item.payAmount }}</text>
-            </view>
-            <view class="info-row">
-              <text class="info-label">获得佣金</text>
-              <text class="info-value highlight">¥{{ item.commission }}</text>
-            </view>
 
 
-            <view v-if="index < writeOffList.length - 1" class="record-divider"></view>
-          </view>
-        </view>
+              <view v-if="index < data.length - 1" class="record-divider"></view>
+            </view>
+          </template>
+        </LsvList>
       </view>
       </view>
     </view>
     </view>
+
   </view>
   </view>
 </template>
 </template>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .write-off-container {
 .write-off-container {
-  min-height: 100vh;
+  height: 100vh;
   background: #f8f8fa;
   background: #f8f8fa;
+  display: flex;
+  flex-direction: column;
 
 
   .write-off-content {
   .write-off-content {
-    padding: 32rpx;
-  }
-
-  .write-off-card {
+    // flex: 1;
     background: #ffffff;
     background: #ffffff;
     border-radius: 32rpx;
     border-radius: 32rpx;
     padding: 32rpx;
     padding: 32rpx;
+    margin: 32rpx;
+    display: flex;
+    flex-direction: column;
+  }
 
 
-    .card-header {
-      display: flex;
-      justify-content: space-between;
-      align-items: flex-start;
-
-      .title-section {
-        display: flex;
-        align-items: center;
-        gap: 18rpx;
+  .card-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-start;
 
 
-        .title-line {
-          width: 6rpx;
-          height: 32rpx;
-          background: #ff5365;
-        }
+    .title-section {
+      display: flex;
+      align-items: center;
+      gap: 18rpx;
 
 
-        .title-text {
-          font-weight: 600;
-          font-size: 32rpx;
-          color: #333333;
-          line-height: 32rpx;
-        }
+      .title-line {
+        width: 6rpx;
+        height: 32rpx;
+        background: #ff5365;
       }
       }
 
 
-      .total-income {
-        display: flex;
-        align-items: baseline;
-        gap: 8rpx;
+      .title-text {
+        font-weight: 600;
+        font-size: 32rpx;
+        color: #333333;
+        line-height: 32rpx;
+      }
+    }
 
 
-        .total-label {
-          font-weight: 400;
-          font-size: 26rpx;
-          color: #2c2c2c;
-          line-height: 26rpx;
-        }
+    .total-income {
+      display: flex;
+      align-items: baseline;
+      gap: 8rpx;
+
+      .total-label {
+        font-weight: 400;
+        font-size: 26rpx;
+        color: #2c2c2c;
+        line-height: 26rpx;
+      }
 
 
-        .total-symbol {
-          font-weight: 600;
-          font-size: 26rpx;
-          color: #ff5365;
-          line-height: 26rpx;
-        }
+      .total-symbol {
+        font-weight: 600;
+        font-size: 26rpx;
+        color: #ff5365;
+        line-height: 26rpx;
+      }
 
 
-        .total-amount {
-          font-weight: 600;
-          font-size: 40rpx;
-          color: #ff5365;
-          line-height: 40rpx;
-        }
+      .total-amount {
+        font-weight: 600;
+        font-size: 40rpx;
+        color: #ff5365;
+        line-height: 40rpx;
       }
       }
     }
     }
+  }
 
 
-    .header-divider {
-      width: 100%;
-      height: 1rpx;
-      background: #eaeaea;
-      margin-top: 32rpx;
-      margin-bottom: 32rpx;
-    }
+  .header-divider {
+    width: 100%;
+    height: 1rpx;
+    background: #eaeaea;
+    margin-top: 32rpx;
+    margin-bottom: 32rpx;
+  }
 
 
-    .records-list {
-      .record-item {
-        padding: 0;
+  .records-list {
+    flex: 1;
+    overflow: hidden;
+    .record-item {
+      padding: 0;
 
 
-        .info-row {
-          display: flex;
-          justify-content: space-between;
-          margin-bottom: 30rpx;
-          align-items: center;
-          height: 30rpx;
-          line-height: 30rpx;
+      .info-row {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 30rpx;
+        align-items: center;
+        height: 30rpx;
+        line-height: 30rpx;
 
 
-          .info-label {
-            font-weight: 400;
-            font-size: 30rpx;
-            color: #666666;
-            line-height: 30rpx;
-          }
+        .info-label {
+          font-weight: 400;
+          font-size: 30rpx;
+          color: #666666;
+          line-height: 30rpx;
+        }
 
 
-          .info-value {
-            font-weight: 400;
-            font-size: 30rpx;
-            color: #333333;
-            line-height: 30rpx;
+        .info-value {
+          font-weight: 400;
+          font-size: 30rpx;
+          color: #333333;
+          line-height: 30rpx;
 
 
-            &.highlight {
-              color: #ff5365;
-            }
-          }
-          .income-person {
-            display: flex;
-            align-items: center;
-          }
-          .income-phone {
-            margin-right: 12rpx;
+          &.highlight {
+            color: #ff5365;
           }
           }
         }
         }
-
-        .record-divider {
-          width: 100%;
-          height: 1rpx;
-          background: #eaeaea;
-          margin-top: 32rpx;
-          margin-bottom: 32rpx;
+        .income-person {
+          display: flex;
+          align-items: center;
+        }
+        .income-phone {
+          margin-right: 12rpx;
         }
         }
       }
       }
-    }
-    .record-item:last-child {
-      .info-row:last-child {
-        margin-bottom: 0;
+
+      .record-divider {
+        width: 100%;
+        height: 1rpx;
+        background: #eaeaea;
+        margin-top: 32rpx;
+        margin-bottom: 32rpx;
       }
       }
     }
     }
   }
   }
+  .record-item:last-child {
+    .info-row:last-child {
+      margin-bottom: 0;
+    }
+  }
 }
 }
 </style>
 </style>

+ 87 - 22
src/pages-C/my/myGroup.vue

@@ -3,6 +3,13 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { computed, ref } from "vue";
 import { computed, ref } from "vue";
 import { getImageUrl } from "@/utils/imageUtil";
 import { getImageUrl } from "@/utils/imageUtil";
+import { getTeamStatistics, getTeamAmountStatistics,getTeamMembers } from "@/api/my";
+import {
+  usePagination,
+  useRequest,
+  actionDelegationMiddleware,
+} from "alova/client";
+
 definePage({
 definePage({
   style: {
   style: {
     navigationBarTitleText: "团队收益",
     navigationBarTitleText: "团队收益",
@@ -11,12 +18,12 @@ definePage({
 });
 });
 
 
 const activePanel = ref("list");
 const activePanel = ref("list");
-const activePeriod = ref("today");
+const activePeriod = ref("1");
 const activeTabs = ref("all");
 const activeTabs = ref("all");
 
 
 const periodTabs = [
 const periodTabs = [
-  { label: "今天", value: "today" },
-  { label: "近30天", value: "month" },
+  { label: "今天", value: "1" },
+  { label: "近30天", value: "2" },
 ];
 ];
 
 
 const incomeFilterTabs = [
 const incomeFilterTabs = [
@@ -25,17 +32,33 @@ const incomeFilterTabs = [
   { label: "二级收益", value: "level2" },
   { label: "二级收益", value: "level2" },
 ];
 ];
 
 
-const listSummary = [
-  { label: "团员总数(人)", value: "24" },
-  { label: "一级团员(人)", value: "24" },
-  { label: "二级团员(人)", value: "24" },
-];
+const listSummary = computed(() => {
+  const data = incomeData.value || {};
+  return [
+    { label: "团员总数(人)", value: data.totalNumber },
+    { label: "一级团员(人)", value: data.firstLevelMemberNumber },
+    { label: "二级团员(人)", value: data.secondLevelMemberNumber },
+  ];
+});
 
 
-const incomeSummary = [
-  { label: "累计收益(元)", value: "185" },
-  { label: "一级总收益(元)", value: "13" },
-  { label: "二级总收益(元)", value: "49" },
-];
+const incomeSummary = computed(() => {
+  const data = statisticsData.value || {};
+  return [
+    { label: "累计收益(元)", value: data.teamTotalAmount },
+    { label: "一级总收益(元)", value: data.teamFirstAmount },
+    { label: "二级总收益(元)", value: data.teamSecondAmount },
+  ];
+});
+
+const { send: sendIncomeData, data: incomeData } = useRequest(
+  getTeamStatistics,
+  { immediate: false }
+);
+
+const { send: sendAmountStatistics, data: statisticsData } = useRequest(
+  getTeamAmountStatistics,
+  { immediate: false }
+);
 
 
 const memberList = [
 const memberList = [
   {
   {
@@ -65,18 +88,47 @@ const memberList = [
 ];
 ];
 
 
 const summaryItems = computed(() =>
 const summaryItems = computed(() =>
-  activePanel.value === "list" ? listSummary : incomeSummary
+  activePanel.value === "list" ? listSummary.value : incomeSummary.value
 );
 );
 
 
 const showPicker = ref(false);
 const showPicker = ref(false);
-const defaultStart = "";
-const defaultEnd = "";
-
+const defaultStart = ref();
+const defaultEnd = ref();
+const listRef = ref();
 const handleConfirm = (value: { startDate: string; endDate: string }) => {
 const handleConfirm = (value: { startDate: string; endDate: string }) => {
-  console.log("选中的日期范围:", value);
-  // 处理业务逻辑
+  defaultStart.value = value.startDate;
+  defaultEnd.value = value.endDate;
+  //   reloadListRef();
+  sendIncomeData({
+    timeType: activePeriod.value,
+    startTime: defaultStart.value ? defaultStart.value + " 00:00:00" : "",
+    endTime: defaultEnd.value ? defaultEnd.value + " 23:59:59" : "",
+  });
+};
+const reloadListRef = () => {
+  listRef.value.reloadList({
+    startTime: defaultStart.value ? defaultStart.value + " 00:00:00" : "",
+    endTime: defaultEnd.value ? defaultEnd.value + " 23:59:59" : "",
+    timeType: activePeriod.value,
+  });
 };
 };
 
 
+onShow(async () => {
+  await sendIncomeData({
+    timeType: 1,
+  });
+
+  await sendAmountStatistics({
+    timeType: 1,
+  });
+});
+
+const dateRangeText = computed(() => {
+  if (defaultStart.value && defaultEnd.value) {
+    return `${defaultStart.value} - ${defaultEnd.value}`;
+  }
+  return "日期筛选";
+});
 const handleCancel = () => {
 const handleCancel = () => {
   console.log("取消选择");
   console.log("取消选择");
 };
 };
@@ -86,6 +138,19 @@ function goDetails(item) {
     url: `/pages-C/my/myGroupDetails`,
     url: `/pages-C/my/myGroupDetails`,
   });
   });
 }
 }
+
+const tabClick = (item) => {
+  activePeriod.value = item.value;
+  sendIncomeData({
+    timeType: activePeriod.value,
+    startTime: defaultStart.value ? defaultStart.value + " 00:00:00" : "",
+    endTime: defaultEnd.value ? defaultEnd.value + " 23:59:59" : "",
+  });
+};
+
+const leaveClick = (item) => {
+  activeTabs.value = item.value;
+};
 </script>
 </script>
 
 
 <template>
 <template>
@@ -110,20 +175,20 @@ function goDetails(item) {
         <view v-if="activePanel === 'list'" class="list-filter">
         <view v-if="activePanel === 'list'" class="list-filter">
           <view class="period-tabs">
           <view class="period-tabs">
             <view v-for="item in periodTabs" :key="item.value" class="period-tab"
             <view v-for="item in periodTabs" :key="item.value" class="period-tab"
-              :class="{ active: activePeriod === item.value }" @tap="activePeriod = item.value">
+              :class="{ active: activePeriod === item.value }" @tap="tabClick(item)">
               <text>{{ item.label }}</text>
               <text>{{ item.label }}</text>
             </view>
             </view>
           </view>
           </view>
           <view class="filter-divider" />
           <view class="filter-divider" />
           <view class="date-filter" @click='showPicker=true'>
           <view class="date-filter" @click='showPicker=true'>
-            <text>日期筛选</text>
+            <text>{{ dateRangeText }}</text>
             <view class="caret" />
             <view class="caret" />
           </view>
           </view>
         </view>
         </view>
 
 
         <view v-else class="income-filter">
         <view v-else class="income-filter">
           <view v-for="item in incomeFilterTabs" :key="item.value" class="period-tab"
           <view v-for="item in incomeFilterTabs" :key="item.value" class="period-tab"
-            :class="{ active: activeTabs==item.value  }" @tap="activeTabs = item.value">
+            :class="{ active: activeTabs==item.value  }" @tap="leaveClick(item)">
             <text>{{ item.label }}</text>
             <text>{{ item.label }}</text>
           </view>
           </view>
         </view>
         </view>

+ 10 - 9
src/pages-C/my/myNewUsers.vue

@@ -11,7 +11,6 @@ definePage({
   },
   },
 });
 });
 
 
-const totalAmount = ref();
 
 
 const tabList = ref([
 const tabList = ref([
   { label: "今天", value: "1" },
   { label: "今天", value: "1" },
@@ -58,8 +57,11 @@ const getCouponListApi = (params) => {
   });
   });
 };
 };
 
 
+const totalAmount = ref();
+const totalListAmount = ref();
+
 const afterFetch = (item) => {
 const afterFetch = (item) => {
-  totalAmount.value = item.totalAmount;
+  totalListAmount.value = item.totalAmount;
 };
 };
 
 
 const dateRangeText = computed(() => {
 const dateRangeText = computed(() => {
@@ -69,11 +71,10 @@ const dateRangeText = computed(() => {
   return "日期筛选";
   return "日期筛选";
 });
 });
 
 
-function goDetails(item) {
-  uni.navigateTo({
-    url: `/pages-C/my/myNewUsersDetails`,
-  });
-}
+
+onLoad((options) => {
+  totalAmount.value = options.money;
+});
 </script>
 </script>
 
 
 <template>
 <template>
@@ -118,7 +119,7 @@ function goDetails(item) {
             <text class="total-label">总收益</text>
             <text class="total-label">总收益</text>
             <view>
             <view>
               <!-- <text class="total-symbol">¥</text> -->
               <!-- <text class="total-symbol">¥</text> -->
-              <text class="total-amount">{{ totalAmount || 0 }}</text>
+              <text class="total-amount">{{ totalListAmount || 0 }}</text>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
@@ -127,7 +128,7 @@ function goDetails(item) {
           <template #list="{ data }">
           <template #list="{ data }">
             <view class="records-list">
             <view class="records-list">
               <view v-for="(item, index) in data" :key="item.id" class="record-item">
               <view v-for="(item, index) in data" :key="item.id" class="record-item">
-                <view class="record-bottom" @click='goDetails'>
+                <view class="record-bottom">
                   <view class="info-row">
                   <view class="info-row">
                     <text class="info-label">获得佣金</text>
                     <text class="info-label">获得佣金</text>
                     <text class="income-value">¥{{ item.earnings }}</text>
                     <text class="income-value">¥{{ item.earnings }}</text>

+ 0 - 292
src/pages-C/my/myNewUsersDetails.vue

@@ -1,292 +0,0 @@
-<script setup lang="ts">
-import { ref } from "vue";
-import { safeAreaInsets, menuButtonInfo } from "@/utils";
-import CustomNavigationBar from "@/components/CustomNavigationBar.vue";
-import { getImageUrl } from "@/utils/imageUtil";
-
-definePage({
-  style: {
-    navigationBarTitleText: "邀新收益",
-    navigationStyle: "custom",
-  },
-});
-
-const totalIncome = ref("38.00");
-
-const shareList = ref([
-  {
-    id: 1,
-    couponName: "某某某某某优惠券",
-    income: "2.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "林雨欣",
-  },
-  {
-    id: 2,
-    couponName: "某某某某某优惠券",
-    income: "17.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "吴雨桐",
-  },
-  {
-    id: 3,
-    couponName: "某某某某某优惠券",
-    income: "18.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "周昭宁",
-  },
-  {
-    id: 4,
-    couponName: "某某某某某优惠券",
-    income: "8.00",
-    receiveTime: "2026-05-18 19:00:00",
-    receiver: "周宇轩",
-  },
-]);
-
-function handleViewDetail(item) {
-  uni.showToast({
-    title: `查看 ${item.couponName} 详情`,
-    icon: "none",
-  });
-}
-
-// 定义tab列表
-const tabList = ref([
-  { label: "今天", value: "0" },
-  { label: "近30天", value: "1" },
-]);
-// 当前选中的tab
-const currentTab = ref("0");
-
-// 点击tab事件
-const handleTabClick = (value) => {
-  currentTab.value = value;
-  console.log("选中tab:", value);
-};
-
-const showPicker = ref(false);
-const defaultStart = "";
-const defaultEnd = "";
-
-const handleConfirm = (value: { startDate: string; endDate: string }) => {
-  console.log("选中的日期范围:", value);
-  // 处理业务逻辑
-};
-
-const handleCancel = () => {
-  console.log("取消选择");
-};
-</script>
-
-<template>
-  <view class="share-info-container">
-    <u-navbar title="邀新收益" :autoBack="true" :placeholder="true" :border-bottom="false"
-      :title-style="{ fontWeight: 'bold', color: '#000' }" leftIconColor='#000'></u-navbar>
-
-    <view class="share-info-content">
-      <view class="share-card">
-        <view class="card-header">
-          <view class="title-section">
-            <view class="title-line"></view>
-            <text class="title-text">邀请新人</text>
-          </view>
-          <view class="total-income">
-            <text class="total-label">总收益</text>
-            <view>
-              <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalIncome }}</text>
-            </view>
-          </view>
-        </view>
-
-        <view class="records-list">
-          <view v-for="(item, index) in shareList" :key="item.id" class="record-item">
-            <view class="record-bottom">
-              <view class="info-row">
-                <text class="info-label">用户名称</text>
-                <view class="income-person">
-                  <u--image class='income-phone' :src="getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                    shape="circle">
-                  </u--image>
-                  <view>林雨欣</view>
-                </view>
-              </view>
-              <view class="info-row">
-                <text class="info-label">获得佣金</text>
-                <text class="income-value">¥{{ item.income }}</text>
-              </view>
-              <view class="info-row">
-                <text class="info-label">联系方式</text>
-                <text class="info-value">{{ item.receiver }}</text>
-              </view>
-              <view class="info-row">
-                <text class="info-label">邀请时间</text>
-                <text class="info-value">{{ item.receiveTime }}</text>
-              </view>
-            </view>
-
-            <view v-if="index < shareList.length - 1" class="record-divider"></view>
-          </view>
-        </view>
-      </view>
-    </view>
-
-    <!-- 日期 -->
-    <DateRangePicker v-model:show="showPicker" :startDate="defaultStart" :endDate="defaultEnd" @confirm="handleConfirm"
-      @cancel="handleCancel" />
-  </view>
-</template>
-
-<style lang="scss" scoped>
-.share-info-container {
-  min-height: 100vh;
-  background: #f8f8fa;
-
-  .share-info-content {
-    padding: 32rpx 0;
-    box-sizing: border-box;
-  }
-
-  .share-card {
-    background: #ffffff;
-    border-radius: 32rpx;
-    padding: 32rpx 32rpx 0 32rpx;
-    margin: 0 32rpx;
-    .card-header {
-      display: flex;
-      justify-content: space-between;
-      align-items: flex-start;
-      padding-bottom: 32rpx;
-      border-bottom: 1rpx solid #eaeaea;
-
-      .title-section {
-        display: flex;
-        align-items: center;
-        gap: 18rpx;
-
-        .title-line {
-          width: 6rpx;
-          height: 32rpx;
-          background: #ff5365;
-        }
-
-        .title-text {
-          font-weight: 600;
-          font-size: 32rpx;
-          color: #333333;
-          line-height: 32rpx;
-        }
-      }
-
-      .total-income {
-        display: flex;
-        align-items: baseline;
-        gap: 4rpx;
-
-        .total-label {
-          font-weight: 400;
-          font-size: 26rpx;
-          color: #2c2c2c;
-          line-height: 26rpx;
-          margin-right: 4rpx;
-        }
-
-        .total-symbol {
-          font-weight: 600;
-          font-size: 26rpx;
-          color: #ff5365;
-          line-height: 26rpx;
-        }
-
-        .total-amount {
-          font-weight: 600;
-          font-size: 40rpx;
-          color: #ff5365;
-          line-height: 40rpx;
-        }
-      }
-    }
-
-    .records-list {
-      .record-item {
-        padding: 32rpx 0;
-
-        .record-top {
-          display: flex;
-          justify-content: space-between;
-          align-items: center;
-          margin-bottom: 40rpx;
-
-          .coupon-name {
-            font-weight: 500;
-            font-size: 28rpx;
-            color: #2c2c2c;
-            line-height: 28rpx;
-          }
-
-          .income-amount {
-            display: flex;
-            align-items: center;
-            gap: 12rpx;
-
-            .income-label {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #333333;
-              line-height: 30rpx;
-            }
-          }
-        }
-
-        .record-bottom {
-          .info-row {
-            display: flex;
-            justify-content: space-between;
-            margin-bottom: 30rpx;
-            align-items: center;
-            height: 30rpx;
-            line-height: 30rpx;
-
-            .info-label {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #86909c;
-            }
-
-            .info-value {
-              font-weight: 400;
-              font-size: 30rpx;
-              color: #333333;
-            }
-            .income-value {
-              font-weight: 500;
-              font-size: 30rpx;
-              color: #ff5365;
-            }
-            .income-person {
-              display: flex;
-              align-items: center;
-            }
-            .income-phone {
-              margin-right: 12rpx;
-            }
-          }
-        }
-
-        .record-divider {
-          width: 100%;
-          height: 1rpx;
-          background: #eaeaea;
-          margin-top: 32rpx;
-        }
-        .record-item:last-child {
-          .info-row:last-child {
-            margin-bottom: 0;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 8 - 3
src/pages-C/my/myShare.vue

@@ -67,9 +67,10 @@ const getCouponListApi = (params) => {
 };
 };
 
 
 const totalAmount = ref();
 const totalAmount = ref();
+const totalListAmount = ref();
 
 
 const afterFetch = (item) => {
 const afterFetch = (item) => {
-  totalAmount.value = item.totalAmount;
+  totalListAmount.value = item.totalAmount;
 };
 };
 
 
 const dateRangeText = computed(() => {
 const dateRangeText = computed(() => {
@@ -78,6 +79,10 @@ const dateRangeText = computed(() => {
   }
   }
   return "日期筛选";
   return "日期筛选";
 });
 });
+
+onLoad((options) => {
+  totalAmount.value = options.money;
+});
 </script>
 </script>
 
 
 <template>
 <template>
@@ -124,7 +129,7 @@ const dateRangeText = computed(() => {
             <text class="total-label">收益</text>
             <text class="total-label">收益</text>
             <view>
             <view>
               <!-- <text class="total-symbol">¥</text> -->
               <!-- <text class="total-symbol">¥</text> -->
-              <text class="total-amount">{{ totalIncome }}</text>
+              <text class="total-amount">{{ totalListAmount || 0 }}</text>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
@@ -288,7 +293,7 @@ const dateRangeText = computed(() => {
     border-radius: 32rpx;
     border-radius: 32rpx;
     padding: 32rpx 32rpx 0 32rpx;
     padding: 32rpx 32rpx 0 32rpx;
     margin: 0 32rpx;
     margin: 0 32rpx;
-    flex: 1;
+    // flex: 1;
     .card-header {
     .card-header {
       display: flex;
       display: flex;
       justify-content: space-between;
       justify-content: space-between;

+ 12 - 6
src/pages-C/my/myWriteOff.vue

@@ -11,7 +11,6 @@ definePage({
   },
   },
 });
 });
 
 
-const totalAmount = ref();
 
 
 const tabList = ref([
 const tabList = ref([
   { label: "今天", value: "1" },
   { label: "今天", value: "1" },
@@ -58,8 +57,11 @@ const getCouponListApi = (params) => {
   });
   });
 };
 };
 
 
+const totalAmount = ref();
+const totalListAmount = ref();
+
 const afterFetch = (item) => {
 const afterFetch = (item) => {
-  totalAmount.value = item.totalAmount;
+  totalListAmount.value = item.totalAmount;
 };
 };
 
 
 const dateRangeText = computed(() => {
 const dateRangeText = computed(() => {
@@ -68,6 +70,10 @@ const dateRangeText = computed(() => {
   }
   }
   return "日期筛选";
   return "日期筛选";
 });
 });
+
+onLoad((options) => {
+  totalAmount.value = options.money;
+});
 </script>
 </script>
 
 
 <template>
 <template>
@@ -113,7 +119,7 @@ const dateRangeText = computed(() => {
             <text class="total-label">总收益</text>
             <text class="total-label">总收益</text>
             <view>
             <view>
               <text class="total-symbol">¥</text>
               <text class="total-symbol">¥</text>
-              <text class="total-amount">{{ totalAmount || 0 }}</text>
+              <text class="total-amount">{{ totalListAmount || 0 }}</text>
             </view>
             </view>
           </view>
           </view>
         </view>
         </view>
@@ -134,8 +140,8 @@ const dateRangeText = computed(() => {
                   <view class="info-row">
                   <view class="info-row">
                     <text class="info-label">核销用户</text>
                     <text class="info-label">核销用户</text>
                     <view class="income-person">
                     <view class="income-person">
-                      <u--image class='income-phone' :src="item.writeOffUserUrl || getImageUrl('@img/me/head.png')" width="42rpx" height="42rpx"
-                        shape="circle">
+                      <u--image class='income-phone' :src="item.writeOffUserUrl || getImageUrl('@img/me/head.png')"
+                        width="42rpx" height="42rpx" shape="circle">
                       </u--image>
                       </u--image>
                       <view>{{ item.writeOffUserNickName }}</view>
                       <view>{{ item.writeOffUserNickName }}</view>
                     </view>
                     </view>
@@ -292,7 +298,7 @@ const dateRangeText = computed(() => {
     border-radius: 32rpx;
     border-radius: 32rpx;
     padding: 32rpx 32rpx 0 32rpx;
     padding: 32rpx 32rpx 0 32rpx;
     margin: 0 32rpx;
     margin: 0 32rpx;
-    flex: 1;
+    // flex: 1;
     .card-header {
     .card-header {
       display: flex;
       display: flex;
       justify-content: space-between;
       justify-content: space-between;

+ 197 - 132
src/pages/income/income.vue

@@ -15,6 +15,8 @@ import {
   actionDelegationMiddleware,
   actionDelegationMiddleware,
 } from "alova/client";
 } from "alova/client";
 import { getCategoryList } from "@/api/home";
 import { getCategoryList } from "@/api/home";
+import { queryByUserId, pageMap } from "@/api/income";
+import LsvList from "@/components/listScrollView/index.vue";
 
 
 definePage({
 definePage({
   style: {
   style: {
@@ -27,76 +29,87 @@ const userStore = useUserStore();
 const tokenStore = useTokenStore();
 const tokenStore = useTokenStore();
 const { hasLogin } = storeToRefs(tokenStore);
 const { hasLogin } = storeToRefs(tokenStore);
 
 
-const incomeList = ref([
-  {
-    id: 1,
-    type: "share",
-    title: "分享奖励",
-    amount: "38.00",
-    createTime: "2026-05-20 19:00:00",
-    couponName: "某某某某某优惠券",
-    status: "pending",
-  },
-  {
-    id: 2,
-    type: "share",
-    title: "分享奖励",
-    amount: "58.00",
-    createTime: "2026-05-20 19:00:00",
-    couponName: "某某某优惠券",
-    status: "settled",
-  },
-  {
-    id: 3,
-    type: "share",
-    title: "分享奖励",
-    amount: "58.00",
-    createTime: "2026-05-20 19:00:00",
-    couponName: "优惠券3",
-    status: "blue",
-  },
-]);
+const incomeList = ref([]);
+const listRef = ref();
+const isMounted = ref(false);
+const filterParams = ref({});
+
+// 定义 API 函数
+const getIncomeListApi = (params: any) => {
+  return pageMap({
+    pageNo: params.pageNo,
+    pageSize: params.pageSize,
+    // isToday:"",
+    isToday: 2,
+    status: classItem.value.set?.value || "",
+    couponClassification: classItem.value.type?.value || "",
+    classification: classification.value,
+    startTime: dateValue.value
+      ? dateValue.value.split(" - ")[0] + " 00:00:00"
+      : "",
+    endTime: dateValue.value
+      ? dateValue.value.split(" - ")[1] + " 23:59:59"
+      : "",
+  });
+};
+
+// 重新加载列表
+const reloadListRef = () => {
+  listRef.value?.reloadList({});
+};
+
+// 筛选处理
+const selectValue = (selected: any) => {
+  if (!isMounted.value) {
+    isMounted.value = true;
+    return;
+  }
+  filterParams.value = selected;
+  reloadListRef();
+};
 
 
 function handleViewDetail(item) {
 function handleViewDetail(item) {
+  //1-分享奖励, 2-核销奖励, 3-邀请新人 ,4-团员核销奖励
+  let page = ["shareInfo", "writeOff", "invitation", "teamWriteOff"];
+  let pageType = page[Number(item.classification) - 1];
   uni.navigateTo({
   uni.navigateTo({
-    url: "/pages-C/income/list/writeOff",
+    url: `/pages-C/income/list/${pageType}?couponId=${
+      item.couponId || ""
+    }&batchId=${item.batchId}&money=${item.changeAmount}`,
   });
   });
 }
 }
-const form = ref({});
 const visibleNoticeList = computed(() => {
 const visibleNoticeList = computed(() => {
-  const data = form.value || {};
+  const data = incomeData.value || {};
   return [
   return [
     {
     {
       title: "分享收益(元)",
       title: "分享收益(元)",
-      content: data.totalIncome || 0,
-      page: "/pages-C/share/shareInfo",
+      content: data.couponIssuanceEarnings || 0,
+      page: "/pages-C/my/myShare",
     },
     },
 
 
     {
     {
-      title: "核销收益()",
-      content: data.bankCards || 0,
+      title: "核销收益()",
+      content: data.writeOffIncome || 0,
       page: "/pages-C/my/myWriteOff",
       page: "/pages-C/my/myWriteOff",
     },
     },
     {
     {
       title: "邀新收益(元)",
       title: "邀新收益(元)",
-      content: data.inviteIncome || 0,
-      percentage: data.inviteIncomePercent || "45.38%",
+      content: data.inviteNew || 0,
       page: "/pages-C/my/myNewUsers",
       page: "/pages-C/my/myNewUsers",
     },
     },
     {
     {
       title: "团员收益(元)",
       title: "团员收益(元)",
-      content: data.shareIncome || 0,
+      content: data.memberIncome || 0,
       page: "/pages-C/my/myGroup",
       page: "/pages-C/my/myGroup",
     },
     },
     {
     {
       title: "累计提现(元)",
       title: "累计提现(元)",
-      content: data.totalWithdraw || 0,
-      percentage: data.totalWithdrawPercent || "76.76%",
+      content: data.totalWithdrawal || 0,
       page: "/pages-C/income/incomeMoney",
       page: "/pages-C/income/incomeMoney",
     },
     },
     {
     {
-      title: "银行卡()",
-      content: data.writeOffIncome || 0,
+      title: "银行卡()",
+      content: data.bankNumber || 0,
       page: "/pages-C/my/myWriteOff",
       page: "/pages-C/my/myWriteOff",
     },
     },
   ];
   ];
@@ -105,7 +118,7 @@ const visibleNoticeList = computed(() => {
 function listInfo(item) {
 function listInfo(item) {
   if (item.page) {
   if (item.page) {
     uni.navigateTo({
     uni.navigateTo({
-      url: item.page,
+      url: `${item.page}?money=${item.content}`,
     });
     });
   }
   }
 }
 }
@@ -123,25 +136,30 @@ const showMap = ref({
 
 
 const tabsIndex = ref(0);
 const tabsIndex = ref(0);
 const tabs = ref([
 const tabs = ref([
-  { label: "核销奖励", type: "0" },
-  { label: "邀请新人", type: "1" },
-  { label: "团员核销奖励", type: "2" },
-  { label: "分享奖励", type: "3" },
+  { label: "核销奖励", type: "2" },
+  { label: "邀请新人", type: "3" },
+  { label: "团员核销奖励", type: "4" },
+  { label: "分享奖励", type: "1" },
 ]);
 ]);
 
 
-function tabClick(index) {
+const classification = ref("2");
+function tabClick(index, item) {
   tabsIndex.value = index;
   tabsIndex.value = index;
+  classification.value = item.type;
+  reloadListRef();
 }
 }
 
 
 const settlementTabs = ref([
 const settlementTabs = ref([
-  { name: "待结算", value: "1" },
-  { name: "已结算", value: "2" },
+  { name: "待结算", value: "0" },
+  { name: "已结算", value: "1" },
+  { name: "已退款", value: "2" },
 ]);
 ]);
 
 
 function classClick(e, item, tabName) {
 function classClick(e, item, tabName) {
   indexMap.value[tabName] = e;
   indexMap.value[tabName] = e;
   showMap.value[tabName] = false;
   showMap.value[tabName] = false;
   classItem.value[tabName] = item;
   classItem.value[tabName] = item;
+  reloadListRef();
 }
 }
 
 
 //滚动
 //滚动
@@ -170,8 +188,7 @@ const dateValue = ref();
 const handleConfirm = (value: { startDate: string; endDate: string }) => {
 const handleConfirm = (value: { startDate: string; endDate: string }) => {
   console.log("选中的日期范围:", value);
   console.log("选中的日期范围:", value);
   dateValue.value = `${value.startDate} - ${value.endDate}`;
   dateValue.value = `${value.startDate} - ${value.endDate}`;
-
-  // 处理业务逻辑
+  reloadListRef();
 };
 };
 
 
 const handleCancel = () => {
 const handleCancel = () => {
@@ -186,119 +203,160 @@ const {
   immediate: false,
   immediate: false,
 });
 });
 
 
+const { send: sendIncomeData, data: incomeData } = useRequest(queryByUserId, {
+  immediate: false,
+});
+
 onShow(async () => {
 onShow(async () => {
   await sendCategoryList();
   await sendCategoryList();
+  await sendIncomeData();
 });
 });
+
+function goToWithdrawal() {
+  // 获取可提现余额
+  const money = incomeData.value?.withdrawableAmount || 0;
+  const bankNumber = incomeData.value?.bankNumber || 0;
+  uni.navigateTo({
+    url: `/pages-B/payment/withdrawal?m=${money}&bankNumber=${bankNumber}`,
+  });
+}
+
+const statusTypeMap: Record<string, string> = {
+  "1": "一级团员",
+  "2": "二级团员",
+  "3": "三级团员",
+};
+
+const couponTypeMap: Record<string, string> = {
+  "1": "分享奖励",
+  "2": "核销奖励",
+  "3": "邀请新人",
+  "4": "团员核销奖励",
+};
 </script>
 </script>
 
 
 <template>
 <template>
   <view class="page-container">
   <view class="page-container">
     <!-- 顶部蓝色渐变背景 -->
     <!-- 顶部蓝色渐变背景 -->
-    <view class="page-header-bg" :style="{
+    <view>
+      <view class="page-header-bg" :style="{
                     backgroundImage: `url(${getImageUrl('@img/income/bg.png')})`,
                     backgroundImage: `url(${getImageUrl('@img/income/bg.png')})`,
                     backgroundSize: 'cover',
                     backgroundSize: 'cover',
                     backgroundRepeat: 'no-repeat',
                     backgroundRepeat: 'no-repeat',
                     backgroundPosition: 'center'
                     backgroundPosition: 'center'
                 }">
                 }">
-    </view>
+      </view>
 
 
-    <u-navbar title="收益" :placeholder="true" :border-bottom="false"
-      :title-style="{ fontWeight: 'bold', color: scrollTop > 1 ? '#000' : '#fff' }"
-      :bgColor="scrollTop>1?'#fff':'transparent'" leftIcon=""></u-navbar>
+      <u-navbar title="收益" :placeholder="true" :border-bottom="false"
+        :title-style="{ fontWeight: 'bold', color: scrollTop > 1 ? '#000' : '#fff' }"
+        :bgColor="scrollTop>1?'#fff':'transparent'" leftIcon=""></u-navbar>
 
 
-    <!-- 页面主内容 -->
-    <view class="main-content">
-      <view class="income-card" :style="{
+      <!-- 页面主内容 -->
+      <view class="main-content">
+        <view class="income-card" :style="{
                     backgroundImage: `url(${getImageUrl('@img/income/bg2.png')})`,
                     backgroundImage: `url(${getImageUrl('@img/income/bg2.png')})`,
                     backgroundSize: 'cover',
                     backgroundSize: 'cover',
                     backgroundRepeat: 'no-repeat',
                     backgroundRepeat: 'no-repeat',
                     backgroundPosition: 'center'
                     backgroundPosition: 'center'
                 }">
                 }">
-        <view class="income-card__header">
-          <view class="income-card__balance">
-            <view class="income-card__balance-label">当前账户余额(元)</view>
-            <view class="income-card__balance-value">3859.00</view>
+          <view class="income-card__header">
+            <view class="income-card__balance">
+              <view class="income-card__balance-label">当前账户余额(元)</view>
+              <view class="income-card__balance-value">{{ incomeData?.balance }}</view>
+            </view>
+            <button class="income-card__withdraw-btn" @click='goToWithdrawal'>申请提现</button>
           </view>
           </view>
-          <button class="income-card__withdraw-btn">申请提现</button>
-        </view>
-        <view class="notice-container">
-          <view v-for="(item, index) in visibleNoticeList" :key="index" class="notice-item" @click='listInfo(item)'>
-            <view class="notice-title">{{ item.title }}</view>
-            <view class="notice-content">{{ item.content }}</view>
+          <view class="notice-container">
+            <view v-for="(item, index) in visibleNoticeList" :key="index" class="notice-item" @click='listInfo(item)'>
+              <view class="notice-title">{{ item.title }}</view>
+              <view class="notice-content">{{ item.content }}</view>
+            </view>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
-    </view>
 
 
-    <view class="filter-cont">
-      <view class="tabs-box">
-        <view class="tabs-list" v-for="(item,index) in tabs" :key="index" :class='{active:tabsIndex==index}'
-          @click=tabClick(index)>
-          {{item.label}}
+      <view class="filter-cont">
+        <view class="tabs-box">
+          <view class="tabs-list" v-for="(item,index) in tabs" :key="index" :class='{active:tabsIndex==index}'
+            @click=tabClick(index,item)>
+            {{item.label}}
+          </view>
         </view>
         </view>
-      </view>
 
 
-      <view class='income-select'>
-        <view class='income-time' @click='showPicker=true'>
-          <view class='income-today'>今天 </view>
-          <view class="stat-divider"></view>
-        </view>
-        <view class='income-time' @click='showPicker=true'>
-          <view class='income-time-name'>{{dateValue?dateValue:'日期筛选'}} </view>
-          <text class="caret" />
-          <view class="stat-divider"></view>
-        </view>
-        <view class='income-time' @click='showMap.type=true'>
-          <view class='income-time-name'>{{classItem.type.name?classItem.type.name:'选择分类'}} </view>
-          <text class="caret" />
-          <view class="stat-divider"></view>
-        </view>
-        <view class='income-time' @click='showMap.set=true'>
-          <view class='income-time-name'>{{classItem.set.name?classItem.set.name:'结算状态'}} </view>
-          <text class="caret" />
+        <view class='income-select'>
+          <view class='income-time' @click='reloadListRef'>
+            <view class='income-today'>今天 </view>
+            <view class="stat-divider"></view>
+          </view>
+          <view class='income-time' @click='showPicker=true'>
+            <view class='income-time-name'>{{dateValue?dateValue:'日期筛选'}} </view>
+            <text class="caret" />
+            <view class="stat-divider"></view>
+          </view>
+          <view class='income-time' @click='showMap.type=true'>
+            <view class='income-time-name'>{{classItem.type.name?classItem.type.name:'选择分类'}} </view>
+            <text class="caret" />
+            <view class="stat-divider"></view>
+          </view>
+          <view class='income-time' @click='showMap.set=true'>
+            <view class='income-time-name'>{{classItem.set.name?classItem.set.name:'结算状态'}} </view>
+            <text class="caret" />
+          </view>
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
     <!-- 列表 -->
     <!-- 列表 -->
     <view class="income-detail-content">
     <view class="income-detail-content">
-      <view v-for="item in incomeList" :key="item.id" class="income-card" @click="handleViewDetail(item)">
-        <view class="card-header">
-          <view class="title-tag">
-            <view class="tag-line"></view>
-            <text class="tag-text">{{ item.title }}</text>
-          </view>
-          <view class="view-detail">
-            <text class="detail-text">查看详情</text>
-            <u--image class='income-right' :src="getImageUrl('@img/income/arrow-right.png')" mode="aspectFit"
-              width="32rpx" height="32rpx">
-            </u--image>
-          </view>
-        </view>
-
-        <view class="card-divider"></view>
-
-        <view class="card-body">
-          <view class="amount-info">
-            <view class="amount-row">
-              <text class="amount-label">总收益</text>
-              <view class="amount-value">
-                <text class="currency-symbol">¥</text>
-                <text class="amount-number">{{ item.amount }}</text>
+      <LsvList ref="listRef" :api="getIncomeListApi" key-name="detailList">
+        <template #list="{ data }">
+          <view v-for="item in data" :key="item.id" class="income-card" @click="handleViewDetail(item)">
+            <view class="card-header">
+              <view class="title-tag">
+                <view class="tag-line"></view>
+                <text class="tag-text">{{ couponTypeMap[item.classification]  }}</text>
+              </view>
+              <view class="view-detail">
+                <text class="detail-text">查看详情</text>
+                <u--image class='income-right' :src="getImageUrl('@img/income/arrow-right.png')" mode="aspectFit"
+                  width="32rpx" height="32rpx">
+                </u--image>
               </view>
               </view>
             </view>
             </view>
-            <view :class="['status-tag', `status-${item.status}`]">
-              {{ item.status === 'pending' ? '待结算' : '已结算' }}
-            </view>
-          </view>
-          <view class="coupon-info">
-            <text class="coupon-name">{{ item.couponName }}</text>
-            <view class="time-row">
-              <text class="time-label">创建时间</text>
-              <text class="time-value">{{ item.createTime }}</text>
+
+            <view class="card-divider"></view>
+
+            <view class="card-body">
+              <view class="amount-info">
+                <view class="amount-row">
+                  <text class="amount-label">总收益</text>
+                  <view class="amount-value">
+                    <text class="currency-symbol">¥</text>
+                    <text class="amount-number">{{ item.changeAmount }}</text>
+                  </view>
+                </view>
+                <view v-if='item.classification==4' class="status-blue status-tag">
+                  {{ statusTypeMap[item.memberHierarchy] }}
+                </view>
+                <view v-else
+                  :class="['status-tag', item.status == 1 ? 'status-settled' :item.status == 2 ?'status-black': 'status-pending']">
+                  {{ item.status == 1 ? '已结算' :item.status == 2 ?'已退款' : '待结算' }}
+                </view>
+              </view>
+              <view class="coupon-info">
+                <text class="coupon-name">{{ item.couponName || '--' }}</text>
+                <view class="time-row" v-if='item.classification==1 || item.classification==3'>
+                  <text class="time-label">领取时间</text>
+                  <text class="time-value">{{ item.receiveTime || '--' }}</text>
+                </view>
+                <view class="time-row" v-else>
+                  <text class="time-label">核销时间</text>
+                  <text class="time-value">{{ item.useTime || '--' }}</text>
+                </view>
+              </view>
             </view>
             </view>
           </view>
           </view>
-        </view>
-      </view>
+        </template>
+      </LsvList>
     </view>
     </view>
   </view>
   </view>
 
 
@@ -338,6 +396,8 @@ onShow(async () => {
   min-height: 100vh;
   min-height: 100vh;
   background-color: #f8f8fa;
   background-color: #f8f8fa;
   padding-bottom: 32rpx;
   padding-bottom: 32rpx;
+  display: flex;
+  flex-direction: column;
   // 顶部渐变背景
   // 顶部渐变背景
   .page-header-bg {
   .page-header-bg {
     position: absolute;
     position: absolute;
@@ -501,6 +561,7 @@ onShow(async () => {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   gap: 20rpx;
   gap: 20rpx;
+  flex: 1;
 }
 }
 
 
 .income-card {
 .income-card {
@@ -649,6 +710,10 @@ onShow(async () => {
           background: #e8f7ff;
           background: #e8f7ff;
           color: #3491fa;
           color: #3491fa;
         }
         }
+        &.status-black {
+          background: #f2f3f5;
+          color: #1d2129;
+        }
       }
       }
     }
     }
   }
   }
@@ -664,8 +729,8 @@ onShow(async () => {
     font-size: 26rpx;
     font-size: 26rpx;
     padding-bottom: 32rpx;
     padding-bottom: 32rpx;
   }
   }
-  .active{
-    color:#FF536B;
+  .active {
+    color: #ff536b;
   }
   }
 }
 }
 </style>
 </style>