diff --git a/pages/demandHall/enterpriseServer/index.vue b/pages/demandHall/enterpriseServer/index.vue index ba7b51c..f8cb951 100644 --- a/pages/demandHall/enterpriseServer/index.vue +++ b/pages/demandHall/enterpriseServer/index.vue @@ -21,32 +21,31 @@ - - - + + {{item.enterpriseType == 1 ? '企业' : '个人'}} - + - APP开发平台搭建外卖小程序返现H5定制一站式解决 + {{item.title}} - 商务合作 - 场地租赁 + {{item.cname}} + - ¥20,000 + ¥{{item.totalMoney}} - 查看详情 + 查看详情 - + {{item.enterpriseType == 1 ? '企业' : '个人'}} @@ -62,10 +61,10 @@ {{item.enterpriseTitle}} - + - + @@ -115,12 +114,17 @@ choseCagetory: '', choseBusiness: '', cName: "", - + + resourceList: [], companyList: [], + loading: true, + pageSize: 10, + pageNumber: 0, } }, onLoad: function(options) { - this.getCagetoryList(); + // this.getCagetoryList(); + this.getPageData(); }, methods: { tabClick(e) { @@ -129,6 +133,8 @@ }); if (e.currentTarget.dataset.i == 2) { this.getCompanyList(); + } else{ + this.getPageData(); } }, getCompanyList() { @@ -196,6 +202,43 @@ choseCagetory: '', }); }, + //获取服务列表 + getPageData() { + if (this.loading) { + app.http('post', `Resources/listResources?page=${this.pageNumber}&size=${this.pageSize}`, { + resourceType: 1, + resourceCagetoryId: this.resourceCagetoryId, + enterpriseType: this.enterpriseType + }).then(res => { + if (res.data.success) { + uni.stopPullDownRefresh(); + if (res.data.data.content.length < this.pageSize) { + this.setData({ + loading: false + }); + } + + if (this.pageNumber > 0) { + this.setData({ + resourceList: this.resourceList.concat(res.data.data.content) + }); + } else { + this.setData({ + resourceList: res.data.data.content + }); + } + } + }); + } else { + uni.stopPullDownRefresh(); + } + }, + toResourceDetail(e) { + let id = e.currentTarget.dataset.id; + uni.navigateTo({ + url: '/pages/demandHall/resourcesDetail/index?id=' + id + }); + }, // 企业列表 toCompanyDetail(e) { let id = e.currentTarget.dataset.id; @@ -208,11 +251,15 @@