Files
hnxdcount-uniapp/pages/mine/incomeList.vue
PC-202306242200\Administrator dac42e3b0c first commit
2026-03-28 23:09:02 +08:00

164 lines
3.5 KiB
Vue

<template>
<view class="earnings p30">
<z-paging ref="paging" v-model="dataList" use-page-scroll @query="queryList">
<view class="mt30 wallet_list" v-for="(item, index) in dataList" :key="index">
<view class="wallet_list_left">
<view>{{ item.recordName || '-' }}</view>
<view>{{ item.createTime }}</view>
</view>
<view class="wallet_list_right" style="display: flex; flex-direction: column; align-items: flex-end">
<view style="margin-bottom: 10rpx; width: 130rpx">
<view></view>
<up-tag v-if="item.pointType == 2" size="mini" text="增值收益" type="warning" plain plainFill></up-tag>
<up-tag v-if="item.pointType == 1" size="mini" text="基础收益" plain plainFill></up-tag>
</view>
<view>{{ item.amount }}</view>
</view>
</view>
</z-paging>
</view>
</template>
<script setup>
import { reactive, ref, computed } from 'vue';
import { onPullDownRefresh, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
import { timeFormat } from '@/uni_modules/uview-plus';
import { getUsersPointRecord } from '@/api/api.js';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { useNav } from '@/hooks/useNav.js';
import moneyJson from '@/common/money.json';
let range = computed(() => {
return moneyJson.map((item, index) => {
return {
text: item.name,
value: item.id
};
});
});
const changeSele = (e) => {
paging.value.reload();
};
const { nav, navTo } = useNav();
let getInfo = ref({});
const paging = ref(null);
let dataList = ref([]);
let dataFrom = reactive({
type: ''
});
let isPagingRefNotFound = () => {
return !paging.value;
};
let result = (e) => {
console.log(e);
};
onPullDownRefresh(() => {
if (isPagingRefNotFound()) return;
paging.value.reload().catch(() => {});
});
onPageScroll((e) => {
if (isPagingRefNotFound()) return;
paging.value.updatePageScrollTop(e.scrollTop);
e.scrollTop < 10 && paging.value.doChatRecordLoadMore();
});
onReachBottom(() => {
if (isPagingRefNotFound()) return;
paging.value.pageReachBottom();
});
const queryList = (pageNo, pageSize) => {
const params = {
current: pageNo,
pageSize: pageSize,
...dataFrom
};
getUsersPointRecord(params)
.then((res) => {
paging.value.complete(res);
})
.catch((res) => {
paging.value.complete(false);
});
};
</script>
<style scoped lang="scss">
.wallet_pall {
width: 690rpx;
height: 272rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 40rpx;
background: #ffffff;
&_header {
font-weight: bold;
font-size: 26rpx;
color: #002ea4;
}
&_ye {
display: flex;
align-items: center;
justify-content: space-between;
height: 70%;
view:nth-child(1) {
font-weight: bold;
font-size: 68rpx;
color: #002ea4;
}
view:nth-child(2) {
width: 128rpx;
height: 58rpx;
background: rgba(0, 46, 164, 0.07);
border-radius: 32rpx 32rpx 32rpx 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #002ea4;
}
}
}
.wallet_list {
width: 690rpx;
// height: 120rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 15rpx 30rpx;
@include flex($space: space-between);
&_left {
view:nth-child(1) {
font-weight: bold;
font-size: 28rpx;
color: #232323;
margin-bottom: 10rpx;
}
view:nth-child(2) {
font-size: 24rpx;
color: #232323;
}
view:nth-child(3) {
font-size: 24rpx;
color: #232323;
}
view:nth-child(4) {
font-size: 24rpx;
color: #232323;
}
}
&_right {
font-weight: bold;
font-size: 28rpx;
color: #ff2727;
}
}
</style>