This commit is contained in:
2025-06-25 20:25:44 +08:00
parent 346471ab91
commit 5147d79bff
5 changed files with 45 additions and 30 deletions

View File

@@ -1,7 +1,6 @@
<script setup>
import {reactive, ref} from 'vue';
import {reactive, ref, watch} from 'vue';
import XNav from "../../components/XNav.vue";
import SETTING from "../../static/icons/setting.png";
import useTableQuery from "../../hooks/useTableQuery.js";
import Api from "../../api/index.js";
import dropDown from "../../static/icons/drop-down.svg";
@@ -13,7 +12,7 @@ import XConfirmModal from "../../components/XConfirmModal.vue";
const showModal = ref(false);
const po = reactive({
type: 0,
datetime: dayjs().format("YYYY-MM"),
time: dayjs().format("YYYY-MM"),
});
const vo = reactive({
page: '',
@@ -23,12 +22,18 @@ const vo = reactive({
all_money: 0,
});
const {loading, pagination, initFetchData} = useTableQuery({
api: Api.system.getWithdrawLog,
api: Api.system.getUserIncome,
parameter: po,
callback: (data) => {
Object.assign(vo, data);
}
});
watch(
() => [po.type, po.time],
() => initFetchData(),
{deep: true}
)
</script>
<template>
@@ -44,22 +49,21 @@ const {loading, pagination, initFetchData} = useTableQuery({
@click="po.type=1">
团队收益
</view>
<view>
<view class="top-filter transition-[500ms] !flex items-center gap-[20rpx] h-full" @click="showModal=true">
<image class="!w-[22rpx] !h-[22rpx]" :src="SETTING"></image>
活动收益
</view>
<x-confirm-modal
width="500rpx"
title="拉新奖励"
info="邀请新用户并完成首个任务,可以获得拉新奖励"
:cancel="false"
confirmText="知道了"
v-model:show="showModal">
</x-confirm-modal>
<view :class="['top-filter transition-[500ms] !flex items-center', po.type === 2 ? 'top-filter-cur' : '']"
@click="() => {po.type=2; showModal=true}">
活动收益
</view>
</view>
<x-confirm-modal
width="500rpx"
title="拉新奖励"
info="邀请新用户并完成首个任务,可以获得拉新奖励"
:cancel="false"
confirmText="知道了"
v-model:show="showModal">
</x-confirm-modal>
<scroll-view
scroll-y
@refresherpulling="initFetchData()"
@@ -76,10 +80,10 @@ const {loading, pagination, initFetchData} = useTableQuery({
<view class="test-24r">累计收益</view>
</view>
<view class="flex-shrink-0">
<x-date-time v-model:model-value="po.datetime" fields="month" type="3">
<x-date-time v-model:model-value="po.time" fields="month" type="3">
<view
class="rounded-full bg-[#E8F3FF] text-[var(--primary-color)] px-[32rpx] py-[8rpx] !flex items-center gap-[14rpx]">
{{ po.datetime }}
{{ po.time }}
<image class="!w-[18rpx]" mode="widthFix" :src="dropDown"></image>
</view>
</x-date-time>
@@ -90,13 +94,15 @@ const {loading, pagination, initFetchData} = useTableQuery({
<view class="p-[20rpx] rounded-[12rpx] bg-[#fff] !flex justify-between items-center">
<view class="!flex flex-col gap-[24rpx]">
<view class="!flex items-center gap-[16rpx]">
<view>提现退回</view>
<x-tag type="success">收入</x-tag>
<view>个人收益</view>
</view>
<view class="text-[#86909C] test-24r">收益日期:{{
dayjs(item.createtime).format('YYYY-MM-DD HH:mm:ss')
}}
</view>
<view class="text-[#86909C] test-24r">{{ dayjs().format('YYYY-MM-DD HH:mm:ss') }}</view>
</view>
<view class="test-36r font-bold HarmonyOS">
+95.88
+{{ item.money.toFixed(2) }}
</view>
</view>
</view>