Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
wangyang
2025-09-16 14:20:50 +08:00

View File

@@ -17,12 +17,12 @@
<view class="all-body">
<!-- 搜索-->
<view class="search">
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"-->
<!-- />-->
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"-->
<!-- />-->
<view class="custom-search"></view>
</view>
</view>
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
@@ -110,9 +110,9 @@ let list = ref([]);
const upOption = ref({
page: {num: 0, size: 10},
noMoreSize: 5,
empty: {
empty: {
tip: '~ 空空如也 ~',
icon: "../../static/images/mescroll-empty.png"
icon: "../../../../static/images/mescroll-empty.png"
},
textLoading: '加载中...',
textNoMore: '已经到底了'
@@ -133,10 +133,11 @@ const mescrollInit = (mescroll) => {
// 下拉刷新
const downCallback = async (mescroll) => {
try {
uni.showLoading();
cssFlag.value = true;
setTimeout(async () => {
uni.showLoading();
cssFlag.value = true;
setTimeout(async () => {
try {
// 重置页码为第一页
const res = await getList(1, mescroll.size || upOption.page.size);
@@ -144,17 +145,21 @@ const downCallback = async (mescroll) => {
// 正确传递 total 参数
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
uni.hideLoading();
} catch (error) {
console.log(error)
mescroll.endErr();
} finally {
cssFlag.value = false;
}, 500);
} catch (error) {
console.log(error)
mescroll.endErr();
}
}
}, 500);
}
// 上拉加载更多
const upCallback = async (mescroll) => {
try {
setTimeout(async () => {
setTimeout(async () => {
try {
// 使用 mescroll 提供的页码和大小参数
const res = await getList(mescroll.num, mescroll.size);
if (mescroll.num === 1) {
@@ -165,11 +170,11 @@ const upCallback = async (mescroll) => {
mescroll.endBySize(res.list.length, res.total);
// 正确判断是否还有更多数据
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
}, 500);
} catch (error) {
console.log(error)
mescroll.endErr();
}
} catch (error) {
mescroll.endErr();
}
}, 500);
}
// 获取数据列表
@@ -180,12 +185,17 @@ const getList = (pageIndex, pageSize) => {
pageSize,
searchContent: searchValue.value
}
let res = await getCusUserApprovalList(param);
resolve({
list: res.rows,
total: res.total
});
try {
let res = await getCusUserApprovalList(param);
resolve({
list: res.rows,
total: res.total
});
} catch (e) {
console.log(e, "客户人员审核任务列表获取失败");
} finally {
uni.hideLoading();
}
});
}
@@ -210,12 +220,12 @@ let handleDetail = (item) => {
<style scoped>
.all-body {
/* #ifdef APP-PLUS */
top: 150rpx;
height: calc(100vh - 75px);
top: 160rpx;
height: calc(100vh - 160rpx);
/* #endif */
/* #ifndef APP-PLUS */
top: 120rpx;
height: calc(100vh);
top: 116rpx;
height: calc(100vh - 116rpx);
/* #endif */
}