|
@@ -13,8 +13,8 @@
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<view class="zero thr">
|
|
|
- <view class="list" v-for="(item,index) in btnList" :key="index" @tap="toCommon(item.route)">
|
|
|
- <image class="image" :src="item.url" mode=""></image>
|
|
|
+ <view class="list" v-for="(item,index) in btnList" :key="index" @tap="toCommon(item.to)">
|
|
|
+ <image class="image" :src="item.url&&item.url.length>0?item.url[0].url:''" mode=""></image>
|
|
|
<view class="textOver name">
|
|
|
{{item.name}}
|
|
|
</view>
|
|
@@ -68,56 +68,6 @@
|
|
|
bannerList: [ // 轮播图
|
|
|
],
|
|
|
btnList: [ //功能按钮
|
|
|
- {
|
|
|
- name: '商品分类',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: 'pagesHome/market/type'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '首农专区',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '地方特产',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '进口食品',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '扶贫专区',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '自提门店',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '点到优选',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '活动专区',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '兑换中心',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: '员工中心',
|
|
|
- url: require('@/static/logo.png'),
|
|
|
- route: ''
|
|
|
- },
|
|
|
],
|
|
|
recomList: [ //推荐好物
|
|
|
{
|
|
@@ -222,8 +172,16 @@
|
|
|
res = await that.$api(`/banner`, 'GET', {
|
|
|
is_use: '0'
|
|
|
});
|
|
|
+ if (res.errcode == '0') that.$set(that, `bannerList`, res.data);
|
|
|
+ // 首页模块管理
|
|
|
+ res = await that.$api(`/indexModule`, 'GET', {
|
|
|
+ is_use: '0'
|
|
|
+ });
|
|
|
if (res.errcode == '0') {
|
|
|
- that.$set(that, `bannerList`, res.data);
|
|
|
+ let data = res.data.sort(function(a, b) {
|
|
|
+ return a.sort - b.sort
|
|
|
+ });
|
|
|
+ that.$set(that, `btnList`, data);
|
|
|
}
|
|
|
},
|
|
|
// 公共跳转
|