diff --git a/api/store.js b/api/store.js index a6cf661..80bf3e1 100644 --- a/api/store.js +++ b/api/store.js @@ -140,11 +140,12 @@ export function getBrandlist(data) { * 获取推荐产品 * */ -export function getProductHot(page, limit, sale_type, enLoad=false) { +export function getProductHot(page, limit, sale_type, rand=0, enLoad=false) { return request.get("product/spu/recommend", { page: page === undefined ? 1 : page, limit: limit === undefined ? 10 : limit, - sale_type: sale_type || null + sale_type: sale_type || null, + rand: rand }, { noAuth: true, enLoad: enLoad diff --git a/components/recommend/index.vue b/components/recommend/index.vue index 68efb0f..5058603 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -36,19 +36,22 @@ - - 更多资讯 + + 里海新闻 + 更多 - - - - - - {{item.title}} - {{item.synopsis}} - - + + + + + + + {{item.title}} + {{item.synopsis}} + + + @@ -161,7 +164,7 @@ getArticleList(){ getArticleList(20,{ page: 1, - limit: 3 + limit: 10 }).then(res=>{ this.list = res.data.list; }) @@ -312,9 +315,9 @@ } .information{ - display: flex; - justify-content: space-between; - margin-bottom: 20rpx; + // display: flex; + // justify-content: space-between; + // margin-bottom: 20rpx; .nav-item { width: 227rpx; diff --git a/manifest.json b/manifest.json index 160eb6b..e972334 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "惠农生活", "appid" : "__UNI__3A527D1", "description" : "", - "versionName" : "2.0.12", - "versionCode" : 2012, + "versionName" : "2.0.15", + "versionCode" : 2015, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages.json b/pages.json index b6aa7ec..3aa90c7 100644 --- a/pages.json +++ b/pages.json @@ -115,14 +115,13 @@ { "path": "pages/news_list/index", "style": { - "navigationBarTitleText": "资讯消息" + "navigationBarTitleText": "里海新闻" } }, { "path": "pages/news_details/index", "style": { "navigationBarTitleText": "" - // "navigationBarTitleText": "资讯详情" } }, diff --git a/pages/index/index.vue b/pages/index/index.vue index c45103d..b3033a7 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -464,7 +464,7 @@ hostProduct: [[],[],[],[]], hostIndex: 0, hotPage: 1, - hotLimit: 30, + hotLimit: 20, hotScroll: true, hotLoading: [false, false, false, false], hotTitle: '加载更多', @@ -1041,7 +1041,7 @@ if (that.hotLoading[e]) return; that.hotLoading[e] = true; that.hotTitle = '加载中'; - getProductHot(that.hotPage, that.hotLimit, 1).then(res => { + getProductHot(that.hotPage, that.hotLimit, 1, 1).then(res => { let list = res.data.list; let productList = that.hostProduct; if(!productList[e]) productList[e] = []; @@ -1050,6 +1050,7 @@ that.hotScroll = hotScroll; that.hotLoading[e] = false; that.hotTitle = !hotScroll ? '已全部加载' : '加载更多'; + that.$set(that, 'hostProduct', productList); if(this.hostIndex==e) this.$forceUpdate(); that.$set(that, 'hotPage', that.hotPage + 1); @@ -1068,6 +1069,7 @@ query.page = that.hotPage; query.limit = that.hotLimit; query.sale_type = 1; + query.rand = 1; getProductslist({ ...query }).then(res => { diff --git a/pages/news_list/index.vue b/pages/news_list/index.vue index 58f6433..dcaac7f 100644 --- a/pages/news_list/index.vue +++ b/pages/news_list/index.vue @@ -288,7 +288,7 @@ } .newsList .list .item .text { width: 420rpx; - height: 156rpx; + height: 160rpx; font-size: 24rpx; color: #999; }