-
-
- 更新时间:{{ item.updateTime || "--" }} ( {{ item.diffTime || "--" }} )
-
-
-
服务费
-
{{ item.servetype }}
-
-
-
+
+
+ {{ speed == 1 ? '加载中' : '加载完成' }}
+
+
@@ -854,6 +873,8 @@ export default {
data() {
return {
isFetching: false, // 标志位,防止重复加载
+ speed:0,// 加载进度0 未加载 1加载中 2加载完成
+ isStop:false,// 是否停止加载
jobMainList: [], // 职位列表
jobNum:0,
recordShow: false,
@@ -1167,9 +1188,12 @@ export default {
const windowHeight = document.documentElement.clientHeight;
const scrollHeight = document.documentElement.scrollHeight;
- if (scrollTop + windowHeight >= scrollHeight - 100 && !this.isFetching) { // 100 是一个阈值,可以根据需要调整
+ if (scrollTop + windowHeight >= scrollHeight - 100 && !this.isFetching && !this.isStop) { // 100 是一个阈值,可以根据需要调整
this.isFetching = true;
- this.loadMoreData();
+ // setTimeout(() => {
+ this.speed = 0;
+ this.loadMoreData();
+ // }, 10*1000);
}
},
loadMoreData() {
@@ -1248,6 +1272,15 @@ export default {
if (this.isLogin) {
const { data } = await JobListApi(newdata);
if (data.status === 200) {
+ if(data.data.recordList.length < 8){
+ // 停止加载
+ this.isStop = true;
+ this.speed = 2;
+ }else{
+ // 继续加载
+ this.isStop = false;
+ this.speed = 1;
+ }
this.jobMainList = this.jobMainList.concat(disposeJobListData(data.data.recordList)); // 追加数据
this.formvalue.total = data.data.recordCount;
} else {
@@ -3568,4 +3601,20 @@ p {
color: rgb(24, 144, 255);
}
}
+ .b-footer{
+ div {
+ text-align: center;
+ // margin-top: 16px;
+ color: #4d575e;
+ font-size: 12px;
+ i {
+ display: inline-block;
+ vertical-align: middle;
+ width: 1px;
+ height: 16px;
+ margin: 0 10px;
+ background-color: #4d575e;
+ }
+ }
+ }