From 1830820613ecd314585efa2834a8e6c7b602609a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=B1=AA?= <781521347@qq.com> Date: Wed, 29 Dec 2021 18:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/demandHall/enterpriseServer/index.vue | 88 +++++++++++---- pages/demandHall/index.vue | 10 +- pages/demandHall/supplyHall/index.vue | 114 +++++++++----------- 3 files changed, 117 insertions(+), 95 deletions(-) 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 @@