|
@ -1,19 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
<!-- 小程序头部兼容 --> |
|
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
|
<nav-bar>汇融云链</nav-bar> |
|
|
|
|
|
<view class="MP-search" @click="search()" style=""><input class="MP-search-input" type="text" disabled="true" |
|
|
|
|
|
placeholder="输入关键字搜索" /></view> |
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 头部轮播 --> |
|
|
|
|
|
<!-- #ifdef MP --> |
|
|
|
|
|
<view class="carousel-section" style="margin-top: 80upx;"> |
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
<!-- #ifndef MP --> |
|
|
|
|
|
<view class="carousel-section"> |
|
|
<view class="carousel-section"> |
|
|
<!-- #endif --> |
|
|
|
|
|
<!-- 标题栏和状态栏占位符 --> |
|
|
<!-- 标题栏和状态栏占位符 --> |
|
|
<view class="titleNview-placing"></view> |
|
|
<view class="titleNview-placing"></view> |
|
|
<!-- 背景色区域 --> |
|
|
<!-- 背景色区域 --> |
|
@ -34,11 +21,11 @@ |
|
|
<!-- 分类 --> |
|
|
<!-- 分类 --> |
|
|
<view class="cate-section"> |
|
|
<view class="cate-section"> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/list?isFenxiao=1')"> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/list?isFenxiao=1')"> |
|
|
<image src="/static/temp//antFill-gift.png"></image> |
|
|
<image src="/static/nywz_icon.png"></image> |
|
|
<text>农业物资</text> |
|
|
<text>农业物资</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/list?isVip=1')"> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/list?isVip=1')"> |
|
|
<image src="/static/temp/fasfausers.png"></image> |
|
|
<image src="/static/shwz_icon.png"></image> |
|
|
<text>生活物资</text> |
|
|
<text>生活物资</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/groupList')"> |
|
|
<view class="cate-item" @click="navToTabPage('../../pagesA/product/groupList')"> |
|
@ -46,7 +33,7 @@ |
|
|
<text>拼团特价</text> |
|
|
<text>拼团特价</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="cate-item" @click="navToTabPage('/pagesU/notice/subjectList')"> |
|
|
<view class="cate-item" @click="navToTabPage('/pagesU/notice/subjectList')"> |
|
|
<image src="/static/temp/antFill-home.png"></image> |
|
|
<image src="/static/njfw_icon.png"></image> |
|
|
<text>农机服务</text> |
|
|
<text>农机服务</text> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <view class="cate-item" @click="navToTabPage('../../pagesA/build/communityList')"> |
|
|
<!-- <view class="cate-item" @click="navToTabPage('../../pagesA/build/communityList')"> |
|
@ -206,7 +193,7 @@ |
|
|
<text class="title clamp">{{ item.productName }}</text> |
|
|
<text class="title clamp">{{ item.productName }}</text> |
|
|
<view> |
|
|
<view> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
<text class="m-price"> 县区商超价¥{{ item.price }}</text> |
|
|
<!-- <text class="m-price"> 县区商超价¥{{ item.price }}</text> --> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -229,10 +216,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.name }}</text> |
|
|
<text class="title clamp">{{ item.productName }}</text> |
|
|
<view> |
|
|
<view> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
<text class="m-price">县区商超价¥{{ item.price }}</text> |
|
|
<!-- <text class="m-price">县区商超价¥{{ item.price }}</text> --> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
@ -254,14 +241,13 @@ |
|
|
<image :src="item.pic" mode="aspectFill"></image> |
|
|
<image :src="item.pic" mode="aspectFill"></image> |
|
|
</view> |
|
|
</view> |
|
|
<text class="title clamp">{{ item.name }}</text> |
|
|
<text class="title clamp">{{ item.name }}</text> |
|
|
<text class="label">【{{ item.storeName }}】</text> |
|
|
<!-- <text class="label">【{{ item.storeName }}】</text> --> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
<text class="price">惠农价¥{{ item.price }}</text> |
|
|
</view> |
|
|
</view> |
|
|
<uni-load-more :status="loadingType"></uni-load-more> |
|
|
<uni-load-more :status="loadingType"></uni-load-more> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <mallplusCopyright></mallplusCopyright> --> |
|
|
<!-- <mallplusCopyright></mallplusCopyright> --> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
@ -314,6 +300,7 @@ |
|
|
this.getNewProductList(); |
|
|
this.getNewProductList(); |
|
|
}, |
|
|
}, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
|
|
|
|
|
|
console.log("onPullDownRefresh") |
|
|
console.log("onPullDownRefresh") |
|
|
this.pageNum = this.pageNum + 1; |
|
|
this.pageNum = this.pageNum + 1; |
|
|
this.getNewProductList('refresh'); |
|
|
this.getNewProductList('refresh'); |
|
@ -446,6 +433,7 @@ |
|
|
* 加载首页数据 |
|
|
* 加载首页数据 |
|
|
*/ |
|
|
*/ |
|
|
async loadData() { |
|
|
async loadData() { |
|
|
|
|
|
|
|
|
this.getBanner(); |
|
|
this.getBanner(); |
|
|
this.getHotGoodsList(); |
|
|
this.getHotGoodsList(); |
|
|
//this.getFlashPromotion(); |
|
|
//this.getFlashPromotion(); |
|
@ -453,6 +441,18 @@ |
|
|
this.getStoreList(); |
|
|
this.getStoreList(); |
|
|
this.homeNewProduct(); |
|
|
this.homeNewProduct(); |
|
|
this.homeRecommendProduct(); |
|
|
this.homeRecommendProduct(); |
|
|
|
|
|
|
|
|
|
|
|
uni.getSystemInfo({ |
|
|
|
|
|
success: res => { |
|
|
|
|
|
console.log("屏幕宽度", res.windowWidth) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
uni.createSelectorQuery().in(this).select(".carousel-section").boundingClientRect(data => { |
|
|
|
|
|
console.log("屏幕宽度", data.height) |
|
|
|
|
|
// {"id":"","dataset":{},"left":12,"right":308,"top":12,"bottom":315,"width":296,"height":303} |
|
|
|
|
|
}).exec(function(res) { |
|
|
|
|
|
// 注意:exec方法必须执行,即便什么也不做,否则不会获取到任何数据 |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -462,7 +462,7 @@ |
|
|
let params = {}; |
|
|
let params = {}; |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeNewProduct, params); |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeNewProduct, params); |
|
|
if (groupHotGoodsList) { |
|
|
if (groupHotGoodsList) { |
|
|
console.log("新品推荐》》》》》",groupHotGoodsList.records) |
|
|
console.log("新品推荐》》》》》", groupHotGoodsList.records) |
|
|
this.homeNewProductList = groupHotGoodsList.records; |
|
|
this.homeNewProductList = groupHotGoodsList.records; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -474,7 +474,7 @@ |
|
|
async homeRecommendProduct() { |
|
|
async homeRecommendProduct() { |
|
|
let params = {}; |
|
|
let params = {}; |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeRecommendProduct, params); |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.index.homeRecommendProduct, params); |
|
|
console.log("人气推荐》》》》》",groupHotGoodsList.records) |
|
|
console.log("人气推荐》》》》》", groupHotGoodsList.records) |
|
|
this.homeRecommendProductList = groupHotGoodsList.records; |
|
|
this.homeRecommendProductList = groupHotGoodsList.records; |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
@ -573,7 +573,7 @@ |
|
|
async getHotGoodsList() { |
|
|
async getHotGoodsList() { |
|
|
let params = {}; |
|
|
let params = {}; |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.goods.groupHotGoodsList, params); |
|
|
let groupHotGoodsList = await Api.apiCall('get', Api.goods.groupHotGoodsList, params); |
|
|
console.log("团购信息》》》》》",groupHotGoodsList) |
|
|
console.log("团购信息》》》》》", groupHotGoodsList) |
|
|
this.groupHotGoodsList = groupHotGoodsList; |
|
|
this.groupHotGoodsList = groupHotGoodsList; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|