|
@@ -111,7 +111,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-loadmore :status="loadStatus" @loadmore="getList()" />
|
|
|
+ <u-loadmore :status="loadStatus" @loadmore="refreshList()" />
|
|
|
</view>
|
|
|
<u-empty v-else text="列表为空" mode="list"></u-empty>
|
|
|
</view>
|
|
@@ -160,7 +160,9 @@ export default {
|
|
|
this.getBannerList();
|
|
|
this.getVeteDegrEduc();
|
|
|
},
|
|
|
+ // 下拉刷新触发
|
|
|
onPullDownRefresh() {
|
|
|
+ // 开始
|
|
|
uni.startPullDownRefresh();
|
|
|
this.recruitmentJobList = [];
|
|
|
this.recommendList = [];
|
|
@@ -177,18 +179,20 @@ export default {
|
|
|
this.getBannerList();
|
|
|
this.getVeteDegrEduc();
|
|
|
setTimeout(() => {
|
|
|
+ // 停止下拉
|
|
|
uni.stopPullDownRefresh();
|
|
|
}, 1500);
|
|
|
},
|
|
|
+ /**
|
|
|
+ * @description: 往底部滑动触发
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
onReachBottom() {
|
|
|
- this.loadStatus = 'loading';
|
|
|
- setTimeout(() => {
|
|
|
- this.queryParams.pageNum = ++this.queryParams.pageNum;
|
|
|
- this.getRecruitmentJobList();
|
|
|
- }, 1000);
|
|
|
+ if (this.queryParams.pageNum >= this.totalPage) return;
|
|
|
+ this.refreshList();
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
+ refreshList() {
|
|
|
this.loadStatus = 'loading';
|
|
|
setTimeout(() => {
|
|
|
this.queryParams.pageNum = ++this.queryParams.pageNum;
|
|
@@ -286,7 +290,7 @@ export default {
|
|
|
.getRecommendList()
|
|
|
.then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
- this.recommendList = res.data || [];
|
|
|
+ this.recommendList = res?.data ?? [];
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -390,7 +394,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} catch (e) {
|
|
|
- label = e.label;
|
|
|
+ label = e?.label;
|
|
|
}
|
|
|
return label;
|
|
|
}
|