From 7282f51387f4a9c82f606e7212493f6d3bdf82ba Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Fri, 3 Mar 2023 18:07:09 +0800 Subject: [PATCH] =?UTF-8?q?2023-3-3=20=E9=A6=96=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E6=96=B0=E5=93=81=E6=8E=A8=E8=8D=90=20=E4=BA=BA=E6=B0=94?= =?UTF-8?q?=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallplusui-uniapp-app/pages/index/index.vue | 38 ++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/mallplusui-uniapp-app/pages/index/index.vue b/mallplusui-uniapp-app/pages/index/index.vue index f16c6ea..d289048 100644 --- a/mallplusui-uniapp-app/pages/index/index.vue +++ b/mallplusui-uniapp-app/pages/index/index.vue @@ -191,10 +191,10 @@ - {{ item.productName }} + {{ item.name }} - 惠农价¥{{ item.price }} - 市场价¥{{ item.originalPrice }} + 惠农价¥{{ item.originalPrice }} + 市场价¥{{ item.price }} @@ -217,10 +217,10 @@ - {{ item.productName }} + {{ item.name }} - 惠农价¥{{ item.price }} - 市场价¥{{ item.originalPrice }} + 惠农价¥{{ item.originalPrice }} + 市场价¥{{ item.price }} @@ -308,7 +308,7 @@ onPullDownRefresh() { console.log("onPullDownRefresh") - this.pageNum = this.pageNum + 1; + this.pageNum = 1; this.getNewProductList('refresh'); this.loadData(); @@ -495,8 +495,15 @@ * 获取新品推荐 */ async homeNewProduct() { - let params = {}; - let groupHotGoodsList = await Api.apiCall('get', Api.index.homeNewProduct, params); + let params = { + pageNum: 1, + pageSize: 4, + productCategoryId: "", + type: 1, + newStatus:1, + productAttributeCategoryId: "" + };; + let groupHotGoodsList = await Api.apiCall('get', Api.goods.goodsList, params); if (groupHotGoodsList) { console.log("新品推荐》》》》》", groupHotGoodsList.records) this.homeNewProductList = groupHotGoodsList.records; @@ -508,8 +515,15 @@ * 获取人气推荐 */ async homeRecommendProduct() { - let params = {}; - let groupHotGoodsList = await Api.apiCall('get', Api.index.homeRecommendProduct, params); + let params = { + pageNum: 1, + pageSize: 4, + productCategoryId: "", + type: 1, + recommandStatus:1, + productAttributeCategoryId: "" + };; + let groupHotGoodsList = await Api.apiCall('get', Api.goods.goodsList, params); console.log("人气推荐》》》》》", groupHotGoodsList.records) this.homeRecommendProductList = groupHotGoodsList.records; }, @@ -558,7 +572,7 @@ } }, /** - * 获取新品上市信息 + * 获取商品列表信息 */ async getNewProductList(type = 'add', loading) { //没有更多直接返回