fix: 优化体验
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m37s

This commit is contained in:
sexygoat
2026-05-09 16:14:06 +08:00
parent c798cdba7f
commit 3f997063f4
27 changed files with 1191 additions and 62 deletions

View File

@@ -62,7 +62,9 @@
</view> -->
<view v-if="item.payment_status === 1" class="card-footer">
<button class="btn-pay" @tap="handleOrderPayment(item)">立即支付</button>
<button class="btn-pay" :disabled="orderPayingId !== null" @tap="handleOrderPayment(item)">
{{ isOrderPaying(item) ? '处理中...' : '立即支付' }}
</button>
</view>
</view>
</view>
@@ -97,6 +99,7 @@
let loading = ref(false);
let noMore = ref(false);
let page = ref(1);
let orderPayingId = ref(null);
const pageSize = 10;
let filterIndex = ref(0);
let filterOptions = [{
@@ -188,7 +191,12 @@
}
};
const isOrderPaying = (order) => orderPayingId.value === order.order_id;
const handleOrderPayment = async (order) => {
if (orderPayingId.value !== null || !order?.order_id) return;
orderPayingId.value = order.order_id;
uni.showLoading({
title: '处理中...',
mask: true
@@ -230,6 +238,8 @@
title: errorMsg,
icon: 'none'
});
} finally {
orderPayingId.value = null;
}
};
@@ -445,6 +455,10 @@
font-weight: 500;
width:100%;
&[disabled] {
opacity: 0.7;
}
&::after {
border: none;
}
@@ -486,4 +500,4 @@
color: #999;
font-size: 24rpx;
}
</style>
</style>