Browse Source

2023-3-3

首页面 新品推荐 人气推荐
master
guoxing 2 years ago
parent
commit
7282f51387
  1. 38
      mallplusui-uniapp-app/pages/index/index.vue

38
mallplusui-uniapp-app/pages/index/index.vue

@ -191,10 +191,10 @@
<view class="image-wrapper"> <view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image> <image :src="item.pic" mode="aspectFill"></image>
</view> </view>
<text class="title clamp">{{ item.productName }}</text> <text class="title clamp">{{ item.name }}</text>
<view> <view>
<text class="price">惠农价{{ item.price }}</text> <text class="price">惠农价{{ item.originalPrice }}</text>
<text class="m-price">市场价{{ item.originalPrice }}</text> <text class="m-price">市场价{{ item.price }}</text>
</view> </view>
@ -217,10 +217,10 @@
<view class="image-wrapper"> <view class="image-wrapper">
<image :src="item.pic" mode="aspectFill"></image> <image :src="item.pic" mode="aspectFill"></image>
</view> </view>
<text class="title clamp">{{ item.productName }}</text> <text class="title clamp">{{ item.name }}</text>
<view> <view>
<text class="price">惠农价{{ item.price }}</text> <text class="price">惠农价{{ item.originalPrice }}</text>
<text class="m-price">市场价{{ item.originalPrice }}</text> <text class="m-price">市场价{{ item.price }}</text>
</view> </view>
</view> </view>
@ -308,7 +308,7 @@
onPullDownRefresh() { onPullDownRefresh() {
console.log("onPullDownRefresh") console.log("onPullDownRefresh")
this.pageNum = this.pageNum + 1; this.pageNum = 1;
this.getNewProductList('refresh'); this.getNewProductList('refresh');
this.loadData(); this.loadData();
@ -495,8 +495,15 @@
* 获取新品推荐 * 获取新品推荐
*/ */
async homeNewProduct() { async homeNewProduct() {
let params = {}; let params = {
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeNewProduct, params); pageNum: 1,
pageSize: 4,
productCategoryId: "",
type: 1,
newStatus:1,
productAttributeCategoryId: ""
};;
let groupHotGoodsList = await Api.apiCall('get', Api.goods.goodsList, params);
if (groupHotGoodsList) { if (groupHotGoodsList) {
console.log("新品推荐》》》》》", groupHotGoodsList.records) console.log("新品推荐》》》》》", groupHotGoodsList.records)
this.homeNewProductList = groupHotGoodsList.records; this.homeNewProductList = groupHotGoodsList.records;
@ -508,8 +515,15 @@
* 获取人气推荐 * 获取人气推荐
*/ */
async homeRecommendProduct() { async homeRecommendProduct() {
let params = {}; let params = {
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeRecommendProduct, 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) console.log("人气推荐》》》》》", groupHotGoodsList.records)
this.homeRecommendProductList = groupHotGoodsList.records; this.homeRecommendProductList = groupHotGoodsList.records;
}, },
@ -558,7 +572,7 @@
} }
}, },
/** /**
* 获取新品上市信息 * 获取商品列表信息
*/ */
async getNewProductList(type = 'add', loading) { async getNewProductList(type = 'add', loading) {
// //

Loading…
Cancel
Save