From ceb42b24c0ef7b2b24081989481d3b13ff98886e 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 15:25:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/article.js | 22 ++++ pages/demandHall/business/index.vue | 36 ++++-- pages/demandHall/resourcesDetail/index.vue | 2 +- pages/home/index.vue | 4 +- pages/information/index.vue | 136 ++++++++------------- pages/life/articleList/index.vue | 57 +++++---- 6 files changed, 135 insertions(+), 122 deletions(-) create mode 100644 api/article.js diff --git a/api/article.js b/api/article.js new file mode 100644 index 0000000..3625202 --- /dev/null +++ b/api/article.js @@ -0,0 +1,22 @@ +import request from '@/utils/request' + +// 资讯主页 +export function articleIndex(data){ + return request.get('/article/index', data, { + login: false, + }) +} + +// 资讯分类 +export function articleCategory(data){ + return request.get('/article/listArticleCategory', data, { + login: false, + }) +} + +// 资讯分类查询 +export function getArticleList(data){ + return request.get('/article/list', data, { + login: false, + }) +} \ No newline at end of file diff --git a/pages/demandHall/business/index.vue b/pages/demandHall/business/index.vue index 10a47f6..29d2898 100644 --- a/pages/demandHall/business/index.vue +++ b/pages/demandHall/business/index.vue @@ -69,24 +69,24 @@ - + {{supplyList[0].title}} {{supplyList[0].detailedDescription}} - + {{supplyList[1].title}} {{supplyList[1].detailedDescription}} - + {{supplyList[2].title || '广告位招租'}} {{supplyList[2].detailedDescription}} - + {{item.cagetoryName}} @@ -152,8 +152,11 @@ }) }, toArticleDetail(id){ - uni.navigateTo({ - url:"/pages/life/articleDetail/index?id=" + id + this.$yrouter.push({ + path: '/pages/life/articleDetail/index', + query: { + id: id + } }) }, //获取供应 @@ -162,6 +165,19 @@ this.supplyList = res.data }) }, + toResourcesDetail(id){ + console.log(id,'id') + return + if(id){ + this.$yrouter.push({ + path: '/pages/demandHall/resourcesDetail/index', + query: { + id: id + } + }) + } + + }, //获取分类 getCagetoryList(){ listResourcesCagetory().then((res)=>{ @@ -177,7 +193,7 @@ }, toCompanyDetail(id){ uni.navigateTo({ - url:"/pages/life/articleDetail/index?id=" + id + url:"/pages/demandHall/companyDetail/index?id=" + id }) }, //换一批 @@ -188,15 +204,15 @@ } }, // 供需大厅 - toSupplyHall(e){ + toSupplyHall(id){ uni.navigateTo({ url:"/pages/demandHall/supplyHall/index" }) }, // 企业服务 - toEnterpriseServer(e){ + toEnterpriseServer(id){ uni.navigateTo({ - url:"/pages/demandHall/enterpriseServer/index" + url:"/pages/demandHall/enterpriseServer/index?typeId="+ id }) }, // 项目投融 diff --git a/pages/demandHall/resourcesDetail/index.vue b/pages/demandHall/resourcesDetail/index.vue index 038e1c3..8fe626f 100644 --- a/pages/demandHall/resourcesDetail/index.vue +++ b/pages/demandHall/resourcesDetail/index.vue @@ -50,7 +50,7 @@ - + 立即沟通 diff --git a/pages/home/index.vue b/pages/home/index.vue index f20bb93..2ebb4ae 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -1,7 +1,7 @@ @@ -212,7 +187,6 @@ .vote-box { width: 670rpx; height: 358rpx; - /* background: #FFFFFF; */ box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16); border-radius: 16rpx; margin: 0 auto; @@ -227,26 +201,24 @@ } .news { - width: 100%; - height: 358rpx; - border-radius: 16rpx 16rpx 0 0; - color: #FFF; + width: 590rpx; + height: 94rpx; + background: rgba(0, 0, 0, 0.2); + border-radius: 14rpx; position: absolute; - padding: 0 40rpx; + bottom: 6rpx; + left: 50%; + margin-left: -295rpx; + color: #fff; + padding: 14rpx; } .news-title-h { - width: 590rpx; font-size: 28rpx; - position: absolute; - bottom: 65rpx; } .news-title-s { - width: 590rpx; font-size: 20rpx; - position: absolute; - bottom: 25rpx; } /* .vote { @@ -393,11 +365,14 @@ } .hotspot-con { - width: 588rpx; - height: 130rpx; - bottom: 34rpx; - left: 24rpx; + width: 670rpx; + height: 94rpx; + background: rgba(0, 0, 0, 0.2); + border-radius: 0px 0px 8rpx 8rpx; + padding: 8rpx 32rpx; + color: #fff; position: absolute; + bottom: 0; } .hotspot-icon { @@ -406,6 +381,7 @@ background: #FE3737; border-radius: 12rpx 2rpx 12rpx 0; position: absolute; + top:-46rpx; font-size: 22rpx; color: #fff; text-align: center; @@ -414,12 +390,8 @@ .hotspot-title-h { width: 588rpx; - height: 80rpx; font-size: 28rpx; color: #FFFFFF; - position: absolute; - bottom: 0; - white-space: pre-wrap; } /* 值得关注 */ diff --git a/pages/life/articleList/index.vue b/pages/life/articleList/index.vue index 0d52640..e89dcb6 100644 --- a/pages/life/articleList/index.vue +++ b/pages/life/articleList/index.vue @@ -10,14 +10,11 @@ 搜一下 - 今日大事 - 商业资讯 - 政府政策 - 生活资讯 + {{item.name}} - + @@ -29,7 +26,7 @@ {{item.author}} {{item.createTime.split(' ')[0]}} - 200 + {{item.visit}} @@ -39,21 +36,13 @@ - - 2 - - - 3 - - - 4 -