diff --git a/pages/category/storeCategory.vue b/pages/category/storeCategory.vue index 40dd26e..60bfcb6 100644 --- a/pages/category/storeCategory.vue +++ b/pages/category/storeCategory.vue @@ -14,8 +14,8 @@ {{ item.name }} - - + + {{ item.name }} @@ -26,6 +26,11 @@ 该分类暂无店铺数据 + 暂无分类数据 @@ -62,14 +67,16 @@ export default { success(data, status, msg, code) { const items = data.items _this.categoryMenu = items; - _this.categoryList = items[_this.categoryMenuIndex]?.sub; + _this.categoryList = items[_this.categoryMenuIndex]?.sub || []; }, }); }, methods: { categoryMenuClick(index) { this.categoryMenuIndex = index; - this.categoryList = this.categoryMenu[index]?.sub; + this.categoryList = this.categoryMenu[index]?.sub || []; + console.log(this.categoryList,'categoryList'); + }, }, }; @@ -92,13 +99,24 @@ export default { text-overflow: ellipsis; color: #333; font-size: 28rpx; - padding: 16rpx 0; + padding: 24rpx 0; box-sizing: border-box; text-align: center; &.current { color: #fe411b; background: #f4f4f4; font-weight: bold; + position: relative; + &::after{ + display: block; + content: " "; + width: 4rpx; + height: 100%; + position: absolute; + left:0; + top: 0; + background: #fe411b; + } } } } @@ -146,12 +164,34 @@ export default { text-overflow: ellipsis; } } + } + .nodata{ text-align: center; color: #999; padding: 50rpx; font-size: 24rpx; + background: #fff; } - } } + .nodata2{ + width: calc(100vw - 212rpx - 10rpx); + position: absolute; + top: 12rpx; + bottom: 12rpx; + left: 212rpx; + z-index: 1; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + color: #999; + font-size: 24rpx; + background: #fff; + .icon_nodata{ + display: block; + width: 300rpx; + } + } +