From a37709dd65f6038eb4779d3a48c09634175ce0e9 Mon Sep 17 00:00:00 2001 From: guoweilong Date: Mon, 23 Oct 2023 18:31:23 +0800 Subject: [PATCH] feat: 首页列表联调 --- api/infoMarketInformation.js | 4 ++++ common/config.js | 3 ++- components/news-list/news-list.vue | 13 +++++++------ pages/market/index.vue | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- pages/market/newsDetails.vue | 18 +++++++++++------- utils/request/responseInterceptors.js | 5 +++-- 6 files changed, 93 insertions(+), 25 deletions(-) create mode 100644 api/infoMarketInformation.js diff --git a/api/infoMarketInformation.js b/api/infoMarketInformation.js new file mode 100644 index 0000000..8e6fee7 --- /dev/null +++ b/api/infoMarketInformation.js @@ -0,0 +1,4 @@ +const { http } = uni.$u +// 列表和条件筛选 +export const getInfoMarketInformationlist = params => http.get('/infoMarketInformation/list', { params }) + diff --git a/common/config.js b/common/config.js index 66cf4a9..ebe5e3a 100644 --- a/common/config.js +++ b/common/config.js @@ -1,6 +1,7 @@ module.exports = { //后端接口地址 - baseUrl: 'http://127.0.0.1:48080/app-api', + baseUrl: 'http://10.11.38.240:9001', //内网开发环境 + // baseUrl: 'http://127.0.0.1:48080/app-api', // baseUrl: 'http://api-dashboard.yudao.iocoder.cn/app-api', // 超时 timeout: 30000, diff --git a/components/news-list/news-list.vue b/components/news-list/news-list.vue index 06bb0d5..49fa762 100644 --- a/components/news-list/news-list.vue +++ b/components/news-list/news-list.vue @@ -3,13 +3,12 @@ - 壳液牌发布最新版《液化天燃 - 气(LNS)前景》 + {{newItem.title}} - 行业动态 + {{ newItem.plate_name }} - 中国燃气控股有限公司 + {{newItem.organizeName}} @@ -23,7 +22,9 @@ export default { name: "news-list", props: { - + newItem:{ + type:Object + } }, data() { return { @@ -34,7 +35,7 @@ newsDetails(){ console.log("跳转"); uni.navigateTo({ - url:'/pages/market/newsDetails' + url:'/pages/market/newsDetails?detailsContent=' + JSON.stringify(this.newItem) }) } } diff --git a/pages/market/index.vue b/pages/market/index.vue index c001f14..0d432d2 100644 --- a/pages/market/index.vue +++ b/pages/market/index.vue @@ -4,14 +4,22 @@ + lineHeight="4rpx" lineColor="#cf000d" @click="tabChange"> - + +