优化积分兑换记录

This commit is contained in:
gyq
2025-12-12 15:07:09 +08:00
parent d075a346b8
commit ade25a0880
5 changed files with 71 additions and 9 deletions

View File

@@ -6,10 +6,11 @@
</view>
</view>
<view class="list">
<view class="loader"></view>
<view class="item" v-for="item in listData.list" :key="item.id">
<view class="top">
<text class="t">{{ item.orderNo }}</text>
<u-tag :type="statusFilter(item.status).type" plain plainFill>{{ item.status }}</u-tag>
<u-tag :type="statusFilter(item.status).type" plain plainFill :text="item.status"></u-tag>
</view>
<view class="row">
<text class="name">用户{{ item.nickName }} {{ item.phone }}</text>
@@ -248,7 +249,7 @@ async function returnCostConfirmHandle() {
}
// 积分:积分商品:兑换记录
async function goodsRecordPageAjax(page = listData.page) {
async function goodsRecordPageAjax(page = listData.page, isPull = false) {
try {
const res = await goodsRecordPage({
page: page,
@@ -268,6 +269,15 @@ async function goodsRecordPageAjax(page = listData.page) {
} catch (error) {
console.log(error);
}
if (isPull) {
setTimeout(() => {
uni.showToast({
title: '刷新成功',
icon: 'none'
});
uni.stopPullDownRefresh();
}, 300);
}
}
defineExpose({
@@ -282,8 +292,36 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.loader {
width: 5px;
aspect-ratio: 1;
border-radius: 50%;
animation: l5 1s infinite linear alternate;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%) translateY(-80upx);
}
@keyframes l5 {
0% {
box-shadow: 20px 0 #000, -20px 0 #0002;
background: #000;
}
33% {
box-shadow: 20px 0 #000, -20px 0 #0002;
background: #0002;
}
66% {
box-shadow: 20px 0 #0002, -20px 0 #000;
background: #0002;
}
100% {
box-shadow: 20px 0 #0002, -20px 0 #000;
background: #000;
}
}
.container {
padding-top: 50px;
padding-top: 40px;
}
.tab-wrap {
$color: #318afe;
@@ -315,6 +353,7 @@ onMounted(() => {
}
.list {
padding-bottom: 28upx;
position: relative;
.item {
background-color: #fff;
border-radius: 20upx;

View File

@@ -72,12 +72,13 @@ async function pointUserPageAjax(page = listData.page) {
// 去积分详情
function toDetail(item) {
uni.navigateTo({
url: `/pageMarket/points/userPointDetail?id=${item.id}&nickName=${item.nickName}&phone=${item.phone}`
url: `/pageMarket/points/userPointDetail?id=${item.id}&nickName=${item.nickName}&phone=${item.phone}&point=${item.pointBalance}`
});
}
defineExpose({
reachBottom
reachBottom,
pointUserPageAjax
});
onMounted(() => {