|
|
@@ -1,12 +1,15 @@
|
|
|
<template>
|
|
|
<view class="app-main app-content">
|
|
|
<app-swiper v-if="!$util.isEmpty(ad)" :list="ad" />
|
|
|
- <template v-if="!$util.isEmpty(category)">
|
|
|
+ <view style="margin-bottom:100upx;" v-if="!$util.isEmpty(category)">
|
|
|
<view class="goods-module" v-for="(item, index) in category" :key="index" >
|
|
|
<goods-list-big v-if="item.showRow == 1" :info="item" />
|
|
|
<goods-list-small v-if="item.showRow == 2" :info="item" />
|
|
|
</view>
|
|
|
- </template>
|
|
|
+ </view>
|
|
|
+ <block v-else>
|
|
|
+ <app-wrapper-empty title="暂无商品" is-empty="true" />
|
|
|
+ </block>
|
|
|
<tab-bar :current="0"></tab-bar>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -18,8 +21,9 @@ import goodsListBig from "@/pages/home/components/goods-list-big";
|
|
|
import goodsListMiddle from "@/pages/home/components/goods-list-middle";
|
|
|
import goodsListSmall from "@/pages/home/components/goods-list-small";
|
|
|
import { getMainIndex } from "@/api/home";
|
|
|
-import { getOrderShop } from "@/utils/config";
|
|
|
-import { share } from "@/mixins";
|
|
|
+import { getOrderShop } from "@/utils/config"
|
|
|
+import { share } from "@/mixins"
|
|
|
+import AppWrapperEmpty from '@/components/app-wrapper-empty'
|
|
|
export default {
|
|
|
name: "home",
|
|
|
components: {
|
|
|
@@ -27,7 +31,8 @@ export default {
|
|
|
AppTrademark,
|
|
|
goodsListBig,
|
|
|
goodsListMiddle,
|
|
|
- goodsListSmall
|
|
|
+ goodsListSmall,
|
|
|
+ AppWrapperEmpty
|
|
|
},
|
|
|
mixins: [share],
|
|
|
data () {
|
|
|
@@ -67,6 +72,7 @@ export default {
|
|
|
});
|
|
|
this.pageTitle = res.data.sj.name
|
|
|
uni.setNavigationBarTitle({ title: this.pageTitle })
|
|
|
+ console.log('this.category',this.category)
|
|
|
this.category = res.data.category;
|
|
|
this.columnStyle = res.data.columnStyle;
|
|
|
});
|