Merge branch 'develop' of http://123.57.20.168:4000/admin/ys-app into develop
This commit is contained in:
@@ -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"
|
||||
@@ -112,7 +112,7 @@ const upOption = ref({
|
||||
noMoreSize: 5,
|
||||
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 */
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
class="scroll-h" :class="{ 'loading-scroll': cssFlag }">
|
||||
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
|
||||
@longpress="touchstart(item)"
|
||||
@tap="touchend"
|
||||
longpress-time="1500"
|
||||
@tap="touchend(item)"
|
||||
>
|
||||
<view>
|
||||
<view class="report-list">
|
||||
@@ -257,7 +258,11 @@ function touchstart(item) {
|
||||
|
||||
}
|
||||
let isLongPressed = ref(false);
|
||||
function touchend() {
|
||||
function touchend(item) {
|
||||
visistId.value = item.visistId
|
||||
cusName.value = item.cusName
|
||||
cusId.value = item.cusId
|
||||
status.value = item.status
|
||||
// 如果未触发长按,则执行点击逻辑
|
||||
if (!isLongPressed.value) {
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user