这篇文章主要介绍了基于JS实现父组件的请求服务过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
父组件的请求服务方法:
queryCarApplyShareList() {
this.Load = true;
CarResources.methods.queryCarApplyShareList(this.http, this.pageNo, this.pageSize).then((res) => {
if (res && res.status === 200) {
if (this.pageNo === 1) { // 加载第一页数据
this.CarList = res.data || [];
} else { // 加载更多
this.CarList = this.CarList.concat(res.data);
}
this.IsLastPage = res.data.length === 0
}
this.Load = false;
}, () => {
this.Load = false;
console.log('接口报错');
});
},
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



