This commit is contained in:
GaoHao
2025-01-16 11:24:27 +08:00
6 changed files with 92 additions and 19 deletions

View File

@@ -5,7 +5,10 @@
<view class="row">类型{{ item.title }}</view>
<view class="row">内容{{ item.content }}</view>
<view class="row">时间{{ item.createTime }}</view>
<view class="btm">+{{ item.money }}</view>
<view class="btm">
<text class="add" v-if="item.type == 1">+{{ item.money }}</text>
<text class="sub" v-if="item.type == 2">-{{ item.money }}</text>
</view>
</view>
</view>
<emprty-card v-if="!listData.list.length && listData.status == 'nomore'" />
@@ -25,6 +28,11 @@ const listData = reactive({
status: 'loading'
});
onReachBottom(() => {
listData.page++;
getList();
});
async function getList() {
try {
const res = await queryUserMoneyDetails({
@@ -83,8 +91,13 @@ page {
.btm {
display: flex;
justify-content: flex-end;
color: rgb(253, 100, 22);
font-weight: bold;
.add {
color: rgb(253, 100, 22);
}
.sub {
color: #5aaf2e;
}
}
}
}

View File

@@ -111,7 +111,7 @@
<script setup>
import { ref, reactive } from 'vue';
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js';
import {
@@ -122,6 +122,10 @@ const userInfo = ref({});
// 获取最近的三条观看历史
const recordThree = ref([]);
onShow(()=>{
// 判断ios是否审核
$common.init()
})
async function selectByUserIdAjax() {
try {
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });