|
|
@@ -164,7 +164,7 @@
|
|
|
<view class="body_list">
|
|
|
<!-- 每一个特产区域 -->
|
|
|
<view class="item_goods" v-for="item in goodsList" :key="item.id">
|
|
|
- <img class="goods_img" mode="acpectFill" :src="item.imgUrl" />
|
|
|
+ <img class="goods_img" mode="acpectFill" :src="item.imgs.split(',')[0]" />
|
|
|
<view class="goods_name">{{ item.name }}</view>
|
|
|
|
|
|
<view class="goods_detail">
|
|
|
@@ -311,33 +311,10 @@ export default {
|
|
|
border: 'none',
|
|
|
selectedBorder: 'none'
|
|
|
},
|
|
|
+ // 招商资讯轮播图当前索引值
|
|
|
current: 0,
|
|
|
- goodsList: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- imgUrl: 'https://img0.baidu.com/it/u=598641720,3978772869&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=447',
|
|
|
- name: '靖安白茶',
|
|
|
- price: 180
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- imgUrl: 'https://img0.baidu.com/it/u=598641720,3978772869&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=447',
|
|
|
- name: '靖安白茶',
|
|
|
- price: 180
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- imgUrl: 'https://img0.baidu.com/it/u=598641720,3978772869&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=447',
|
|
|
- name: '靖安白茶',
|
|
|
- price: 180
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- imgUrl: 'https://img0.baidu.com/it/u=598641720,3978772869&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=447',
|
|
|
- name: '靖安白茶',
|
|
|
- price: 180
|
|
|
- }
|
|
|
- ]
|
|
|
+ // 特产甄选列表
|
|
|
+ goodsList: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -382,6 +359,9 @@ export default {
|
|
|
this.page = 1
|
|
|
this.getLocation()
|
|
|
this.getResidueCount()
|
|
|
+ this.getBestNews()
|
|
|
+ this.getNews()
|
|
|
+ this.getGoodsList()
|
|
|
setTimeout(() => {
|
|
|
uni.stopPullDownRefresh()
|
|
|
}, 1000)
|
|
|
@@ -393,6 +373,8 @@ export default {
|
|
|
this.getBestNews()
|
|
|
// 获取招商资讯列表
|
|
|
this.getNews()
|
|
|
+ // 获取特产列表
|
|
|
+ this.getGoodsList()
|
|
|
// 获取定位
|
|
|
this.getLocation()
|
|
|
},
|
|
|
@@ -422,6 +404,20 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ async getGoodsList() {
|
|
|
+ const res = await this.$myRequest_shop({
|
|
|
+ url: '/cloud-mall/goods/open/page',
|
|
|
+ data: {
|
|
|
+ curPage: 1,
|
|
|
+ pageSize: 4,
|
|
|
+ hot: 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.log(res)
|
|
|
+ if (res.code === '1') {
|
|
|
+ this.goodsList = res.data.list
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取用户当前位置
|
|
|
getLocation() {
|
|
|
uni.getSetting({
|
|
|
@@ -1081,12 +1077,16 @@ export default {
|
|
|
.goods_img {
|
|
|
width: 335rpx;
|
|
|
height: 223rpx;
|
|
|
+ border-bottom: 1rpx solid #eee;
|
|
|
}
|
|
|
|
|
|
.goods_name {
|
|
|
- margin: 18rpx 0 18rpx 30rpx;
|
|
|
+ margin: 18rpx 5rpx 18rpx 30rpx;
|
|
|
font-size: 28rpx;
|
|
|
font-weight: bold;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
|
|
|
.goods_detail {
|